Chapter 08_Default Values and Cursor Position
-
Upload
raul-thomas -
Category
Documents
-
view
214 -
download
0
Transcript of Chapter 08_Default Values and Cursor Position
-
8/12/2019 Chapter 08_Default Values and Cursor Position
1/16
IBM Global Services
2005 IBM CorporationDefault Values and Cursor Position |6.08 March-2005
Default Values and Cursor Position
-
8/12/2019 Chapter 08_Default Values and Cursor Position
2/16
IBM Global Services
2005 IBM Corporation2 March-2005Default Values and Cursor Position | 6.08
Objectives
The participants will be able to:Default field values with the following methods:
PBO module
Parameter ids
Hold data
Position the cursor using two different methods.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
3/16
IBM Global Services
2005 IBM Corporation3 March-2005Default Values and Cursor Position | 6.08
Overview
In this chapter, we will learn how to set default field values upon entering a screenand how to set default cursor position on screen fields.
Academy Awards
Year
Category
1994
PIC
.
Academy Awards
Year
Category
Winner Forrest Gump
Notes The Shawshank Redemption should have won
1994
PIC
Default
Values
Cursor
Positioning
Executetransaction
-
8/12/2019 Chapter 08_Default Values and Cursor Position
4/16
IBM Global Services
2005 IBM Corporation4 March-2005Default Values and Cursor Position | 6.08
Defaulting Field Values
Method #1
Method #2
Method #3
PBO Module: Before the screen is displayed to
the user ,assign values to screen fields
Parameter Ids: For ABAP Dictionary fields using
SET/GET PARAMETER ID ABAP statement or
SPA/GPA field attributes
Hold Data: Use Hold Data function for the screen
-
8/12/2019 Chapter 08_Default Values and Cursor Position
5/16
IBM Global Services
2005 IBM Corporation5 March-2005Default Values and Cursor Position | 6.08
PBO Module
** MZA04O01 - PBO Modules **
MODULE INITIALIZE OUTPUT.
CLEAR YMOVIE.
YMOVIE- AAYEAR = 1994.
YMOVIE- CATEGORY = PIC.
ENDMODULE.
PROCESS BEFORE OUTPUT.
MODULE INITIALIZE.
Screen 9000
Academy Awards
Year
Category
1994
PIC
PBO Module
Executetransaction
-
8/12/2019 Chapter 08_Default Values and Cursor Position
6/16
IBM Global Services
2005 IBM Corporation6 March-2005Default Values and Cursor Position | 6.08
Parameter IDs
Parameter ID MemoryAAYEAR Data Element
CATEGORY Data Element
Parameter
ID YYR
Parameter
ID YCT
YYR =
YCT =
This memory is
user and logon
specific
-
8/12/2019 Chapter 08_Default Values and Cursor Position
7/16
IBM Global Services
2005 IBM Corporation7 March-2005Default Values and Cursor Position | 6.08
Using Parameter IDs
OR
SET/GET PARAMETER ID
ABAP Statement
SPA/GPA
Field Attributes
-
8/12/2019 Chapter 08_Default Values and Cursor Position
8/16
IBM Global Services
2005 IBM Corporation8 March-2005Default Values and Cursor Position | 6.08
** MZA04O01 - PBO Modules **
MODULE INITIALIZE OUTPUT.
YMOVIE- AAYEAR = 1994.
YMOVIE- CATEGORY = PIC.
GET PARAMETER ID YYR FIELD YMOVIE -AAYEAR.
GET PARAMETER ID YCT FIELD YMOVIE -CATEGORY.
ENDMODULE.
** MZA04I01 - PAI Modules **MODULE SELECT_LISTING INPUT.
* code to select record from YMOVIE
SET PARAMETER ID YYR FIELD YMOVIE -AAYEAR.
SET PARAMETER ID YCT FIELD YMOVIE -CATEGORY.
ENDMODULE.
Academy Awards
Year
Category
G E T S
E T
SET/GET PARAMETER ID Statement
1994
PIC
YYR = 1994
YCT = PIC
Parameter ID Memory
-
8/12/2019 Chapter 08_Default Values and Cursor Position
9/16
IBM Global Services
2005 IBM Corporation9 March-2005Default Values and Cursor Position | 6.08
SPA/GPA Field Attributes
Notice the
parameterID name
You can check the GPA
field attribute instead ofcoding the GETPARAMETER ID
statement in aPBO module.
You can check the SPA fieldattribute instead of coding the
SET PARAMETER IDstatement in a PAI module.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
10/16
IBM Global Services
2005 IBM Corporation10 March-2005Default Values and Cursor Position | 6.08
Hold Data
Academy Awards
Year
Category
1994
PIC
System > User profile > Hold data
menu path
If the user selects the System > User profile > Hold data menu path on a screenand the screen has been set up for Hold data in the screen attributes, the valueson the screen will be saved by the system for the next time the user comes to the
screen during the current logon.
Screen Attributes
Short Description
Screen Type
Hold DataX
-
8/12/2019 Chapter 08_Default Values and Cursor Position
11/16
IBM Global Services
2005 IBM Corporation11 March-2005Default Values and Cursor Position | 6.08
Cursor Position
Academy Awards
Year
Category
1994
PIC
Winner Forrest Gump
Notes The Shawshank Redemption should have won.
Upon entering a screen, the cursor willautomatically be positioned in the first input/output
template open for input unless you position thecursor in a different field using the screen attributesor a PBO module.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
12/16
IBM Global Services
2005 IBM Corporation12 March-2005Default Values and Cursor Position | 6.08
Positioning the Cursor
Academy Awards
Year
Category
1994
PIC
Winner Forrest Gump
Notes The Shawshank Redemption should have won.
Screen Attributes
Short Description
Screen Type
Cursor position YMOVIE-NOTES
** PBO Module **
MODULE INITIALIZE OUTPUT.
SET CURSOR FIELD
YMOVIE-NOTES.
ENDMODULE.
OR
New Cursor Position
-
8/12/2019 Chapter 08_Default Values and Cursor Position
13/16
IBM Global Services
2005 IBM Corporation13 March-2005Default Values and Cursor Position | 6.08
Demonstration
Setting default values for fields in a screen.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
14/16
IBM Global Services
2005 IBM Corporation14 March-2005Default Values and Cursor Position | 6.08
Practice
Setting default values for fields in a screen.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
15/16
IBM Global Services
2005 IBM Corporation15 March-2005Default Values and Cursor Position | 6.08
Summary
You can set default values for screen fields using three methods:In a PBO module
Assign values to screen fields using Parameter IDs for ABAP Dictionary fields
Use Hold Data function for the screen.
By default, the cursor will be positioned in the first field open for input on a
screen. You can change this position two ways: Set the cursor position in the Screen Attributes
Use the SET CURSOR FIELD ABAP statement in a PBO module.
-
8/12/2019 Chapter 08_Default Values and Cursor Position
16/16
IBM Global Services
2005 IBM Corporation16 March-2005Default Values and Cursor Position | 6.08
Questions
What are the different methods for setting default values in a screen ?What are Parameter IDs ?
Where is the cursor positioned in the screen by default ?