ARTICLE
Selection Screens, Display Properties for Parameters
The example shows how to use the select_options additions of the
PARAMETERS statement.
ABAP_SOURCE_CODE
ABAP_EXEC
ABAP_DESCRIPTION
This example program consists of six parts, each illustrating one of the
screen_options additions of the
statement PARAMETERS . Each example corresponds to a block on the
selection screen 100.
Part 1: If the cursor is not on the input field, a symbol appears in the
input field of the parameter p which tells the user that an entry
in this field is required and that the program cannot continue if no
entry is made in this field.
Part 2: The three parameters p1 , p2 , and p3 have
the same length of 10 but are displayed with a different length on the
selection screen. The user can nevertheless enter 10 characters in each
field.
Part 3: Two checkboxes are displayed on the left side of the selection
screen with the selection text appearing to the right of the boxes. The
checkbox b has the default value "X". The elements of the
modification groups sc1 and sc2 (see part 6) can be shown
and hidden together with the two checkboxes. The display is switched
immediately since the event AT SELECTION-SCREEN is triggered if
one of the checkboxes is chosen. The function code is not needed.
Instead, the content of a or b is evaluated at PBO .
Part 4: The radio buttons r1 , r2 , and r3 form the
group rad1 ; s1 , s2 , and s3 constitute the
group rad2 . Only r2 and s3 are selected on the
selection screen, all others are not selected.
Part 5: The parameter p_carrid is displayed with a length of 20
and filled with the label "Lufthansa". The user can select another
airline; in this case, the three-character airline ID is assigned to the
parameter. Assigning the function code onli which is assigned to
the Execute function in the GUI status of the selection screen
triggers first the event AT SELECTION-SCREEN and then
START-OF-SELECTION .
Part 6: The parameters test1 and test3 are assigned to the
group sc1 ; test2 and test4 to the group sc2 .
At the event AT SELECTION-SCREEN OUTPUT , the field
INTENSIFIED of the internal table screen is set to 1 or 0,
depending on the contents of the field group1 . On the selection
screen, the lines for test1 and test3 are highlighted
whereas those for test2 and test4 are not.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved