At Selection Screen output is a selection-screen event, which is used to manipulate dynamic changes on selection-screen.
Loop At Screen. Screen is structure with Name, Group1, Group2, Group3, Group4, invisible, active, intensified etc fields, this holds the screen information at run time, Loop at Screen...Endloop.
is used to loop through screen elements, and based on the values in above structure (SCREEN) we can manipulate changes.
MODIF ID : MODIF ID is a three character id (without quotes), we can process a screen elements group using this MODIF ID, this will be stored in SCREEN-GROUP1.
All Screen modifications should be done under AT SELECTION-SCREEN OUTPUT
event only.
MODIFY SCREEN is keyword which is used to apply screen modification.
The below is the sample code for dynamic screen modification .
When ever we check enable input field check box, one input field will be enabled.
REPORT ZSPN_SELECTION_SCREEN_OUTPUT. PARAMETERS P_ENABLE AS CHECKBOX USER-COMMAND UC1. PARAMETERS: INPUT(5) TYPE C MODIF ID IN1 . "Based on modif id we will perform dynamic operations AT SELECTION-SCREEN OUTPUT. LOOP AT SCREEN. IF P_ENABLE = 'X' . " If check box is selected IF SCREEN-GROUP1 = 'IN1' . SCREEN-ACTIVE = 1. MODIFY SCREEN. ENDIF. ELSE. IF SCREEN-GROUP1 = 'IN1' . SCREEN-ACTIVE = 0. MODIFY SCREEN. ENDIF. ENDIF. ENDLOOP.