Parameters in ABAP
- Parameters keyword allows the user to provide values for variables through the input screen.
- The input screen can be generated by the keywords Parameters or Select-options.
- Technically input screen is known as Selection Screen. It's screen number is standard and is 1000.
Ex. PARAMETERS A TYPE I. PARAMETERS file_name(40) TYPE C DEFAULT 'c:sample.txt'.
- The data types F(Float), STRING and XSTRING are not allowed with parameters.
Parameters keyword can be used to generate Check boxes and Radio buttons on the selection screen.
- A check box or a radio button is always identified programmatically as single character variables.
- if a check box or radio button is selected by the user then the corresponding variable contains value 'X' otherwise a SPACE.
- SPACE is keyword in ABAP that represents a single space character.
Logically related radio buttons must be grouped together.
Example:
PARAMETERS CH TYPE C AS CHECKBOX. PARAMETERS RB1 TYPE C RADIOBUTTON GROUP G1. PARAMETERS RB2 TYPE C RADIOBUTTON GROUP G1. PARAMETERS RB3 TYPE C RADIOBUTTON GROUP G1.
- The length of a parameter or select-option must not exceed 8 characters.
- On the selection screen, user defined text can be displayed in place of parameters and select-options names. These texts are known as Selection texts.
- To provide selection texts for selection screen elements use the menu path
Goto -> Text Elements -> Selection Texts
Comments
Post a Comment