Entering content frame

PBO of the Selection Screen Locate the document in its SAP Library structure

In the PBO of the selection screen, the

AT SELECTION-SCREEN OUTPUT

event is triggered. This event block allows you to modify the selection screen and its fields directly before it is displayed.

Initializations of selections screen fields at this moment always take effect, whereas at the execution of an executable program, initializations at moment INITIALIZATION only take effect at the first program start, and are otherwise overwritten by the previous user inputs at the beginning of AT SELECTION-SCREEN OUTPUT.

Example

REPORT demo_at_selection_screen_pbo.

PARAMETERS: test1(10) TYPE c MODIF ID sc1,
            test2(10) TYPE c MODIF ID sc2,
            test3(10) TYPE c MODIF ID sc1,
            test4(10) TYPE c MODIF ID sc2.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 = 'SC1'.
      screen-intensified = '1'.
      MODIFY SCREEN.
      CONTINUE.
    ENDIF.
    IF screen-group1 = 'SC2'.
      screen-intensified = '0'.
      
MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

The parameters test1 and test3 are assigned to the modification group sc1, while test2 and test4 are assigned to group sc2. During the AT SELECTION-SCREEN OUTPUT event, the INTENSIFIED field of internal table screen is set to 1 or 0, depending on the contents of the group1 field. On the standard selection screen, the lines for test1 and test3 are highlighted while those for test2 and test4 are not, as shown below:

This graphic is explained in the accompanying text

 

Leaving content frame