LOOP AT SCREEN

Short Reference

Syntax

LOOP AT SCREEN [INTO wa].
  ...
ENDLOOP.

Effect

The statements 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. After the LOOP statement either the predefined workarea screen or the workarea wa (when using INTO) contains the properties of the respective screen element. wa must have the same data type as screen.

While processing a table control or a step loop (that is, within a LOOP loop of the dynpro flow logic), for its screen elements the current properties are determined in the current row or group. Outside of the processing of a table control or step loop, for its screen elements the statically predefined properties of all rows or groups are determined.

The table below shows the components of screen and their assignment to the field properties in the dynpro.

Component Length Type Attribute Description
name 132 c Name Name
group1 3 c Group1 Modification group
group2 3 c Group2 Modification group
group3 3 c Group3 Modification group
group4 3 c Group4 Modification group
required 1 c Required-entry field Mandatory field
input 1 c Input input-enabled field
output 1 c Output display field
intensified 1 c Intensified intensified field
invisible 1 c Invisible invisible element
length 1 x visLength Field length
active 1 c Input/Output/Invisible active field
display_3d 1 c Two-dimensional Box
value_help 1 c Input help Input help key
request 1 c - Input exists
values_in_combo 1 c Dropdown listbox Value help exists

The component name in the loop contains the name of the current dynpro field. The components group1 to group4 can contain three-character IDs, which were assigned to the current screen element in its definition. These IDs allow you to combine the screen elements in up to four different modification groups. In the statement block after LOOP AT SCREEN, these can be queried in logical expressions in order to process several elements in the same way.

The other components of table screen represent the display properties of the current screen element. With the exception of length, they can contain 0 or 1, where 1 is "active" and 0 is "inactive".

Except active, all components of structure screen directly correspond to one attribute of the current screen element. The component active has no match in the attributes. If you change its content with MODIFY SCREEN, this affects the attributes Input, Output and Invisible and thus the components input, output and invisible of structure screen.

Notes