To modify the attributes of screen fields at run time you loop through the
fields of the screen. When you find the name of a screen field you want to
modify, set attributes for the field and use MODIFY SCREEN to update the
attribtes.
You can find the attributes in the internal table SCREEN.
This loop makes some of the screen fields invisible ind a selection screen:
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_VERAB' OR
screen-name = 'P_STXT1' OR
screen-name = 'P_STXT2' OR
screen-name = '%_P_VERAB_%_APP_%-TEXT' OR
screen-name = '%_P_STXT1_%_APP_%-TEXT' OR
screen-name = '%_P_STXT2_%_APP_%-TEXT'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.