ABAP Keyword Documentation → ABAP − Reference → SAP GUI User Dialogs → General Dynpros → ABAP Statements for Dynpros
LOOP AT SCREEN
Other versions: 7.31 | 7.40 | 7.54
Syntax
LOOP AT SCREEN INTO wa.
...
ENDLOOP.
Effect
The statement LOOP AT SCREEN ... ENDLOOP
define a loop around a statement block. For every screen element of the current dynpro to which a
dynpro field is assigned, one loop pass is executed. wa
can be specified as the following:
- an existing work area of the data type SCREEN from ABAP Dictionary,
-
an inline declaration
DATA(var)
, where a work area of the type SCREEN is declared.
After the statement LOOP
, the work area contains the properties of the screen element in question.
When a table control or a
step loop is processed (that is, within a LOOP
of the
dynpro flow logic),
the current properties are determined for its screen elements in the current row or group. Outside of
the processing of a table control or step loop, the statically predefined properties of all rows or groups are determined for its screen elements.
Notes
-
The statement
LOOP AT SCREEN
behaves like the statementLOOP
in a loop across an internal table, where a system table is used instead of an internal table. -
In particular, the statement
LOOP AT SCREEN
can be used for selection screens during selection screen processing. -
This statement also has an obsolete short form,
which works with an obsolete built-in structure
screen
. -
The obsolete built-in structure
screen
should not be specified explicitly afterINTO
.
Executable Example
Dynpros, Dynamic Screen Modifications