LOOP - Loops on screen fields


Basic form

LOOP AT SCREEN.

Effect

All fields of the current screen are stored in the system table SCREEN with their attributes.
The " LOOP AT SCREEN " statement places this information in the header line of the system table.
If you want to change the attributes, you must put back the changed header line with MODIFY SCREEN . However, you can only do this in the PBO module of a screen .
If you use this statement for step loop processing, the information (and any changes) apply only to the current steploop line. Outside step loop processing, the information for a step loop field applies to the complete column.
Step loop fields should never be changed after the corresponding step loop processing has been performed.
You can use the CONTINUE statement to leave the current loop pass prematurely and continue with the next loop pass.
Overview of all SCREEN fields:

Field Length Type Meaning

SCREEN-NAME 30 C Field name
SCREEN-GROUP1 3 C Evaluation of
modification group 1
SCREEN-GROUP2 3 C Evaluation of
modification group 2
SCREEN-GROUP3 3 C Evaluation of
modification group 3
SCREEN-GROUP4 3 C Evaluation of
modification group 4
SCREEN-REQUIRED 1 C Field input mandatory
SCREEN-INPUT 1 C Field ready to accept input
SCREEN-OUTPUT 1 C Field will be displayed
SCREEN-INTENSIFIED 1 C Field highlighted
SCREEN-INVISIBLE 1 C Field invisible
SCREEN-LENGTH 1 X Field length
SCREEN-ACTIVE 1 C Field active

Example

Make all fields display only:
CONSTANTS OFF VALUE '0'. LOOP AT SCREEN. SCREEN-INPUT = OFF. MODIFY SCREEN. ENDLOOP.

Related MODIFY SCREEN , LOOP AT itab

Index
© SAP AG 1996