Show TOC

 Step LoopsLocate this document in the navigation structure

Use

You use step loops to group together screen elements. A step loop is a repeated series of loop blocks. A loop block consists of one or more loop lines of graphical screen elements.

Note

Step loops are considerably less flexible than table controls .

Features

In a fixed loop, the lower limit of the loop area always remains as originally defined. In a variable loop, the number of repetitions is adjusted dynamically to fit the size of the current window. To be able to react to the variable loop size, the system always places the current number of loop blocks in the system field SY-LOOPC. If the screen includes several step loops, you can define only one of them as variable.

Note

The step loop method is not recommended for formatting lists. We recommend that you use a report program instead.

Activities

Creating a Step Loop

  1. Open a screen in the graphical mode of the Screen Painter.
  2. Create the elements you want to include in the loop.
  3. Select all the elements as a group.
  4. Choose Edit → Grouping → Step Loop → Define.

    The block includes the original elements with their attributes and a predefined number of repetition blocks. Each repetition contains a copy of the first block without attributes. The repetition blocks have consecutive numbers and you can establish a reference to a particular line.

Editing a Step Loop

  • To remove an element from a block, select the element and choose Delete. If you delete all the elements, the block is deleted as well.
  • To dissolve a loop block, choose Edit Step Loop Undefine. The individual elements then become normal screen elements again.
  • To define a step loop as fixed or variable, choose Edit → Grouping → Step Loop → Fix or Variable. Remember that a variable loop is adjusted dynamically with the screen size and a fixed loop is not.
  • To convert a step loop, choose Edit → Convert → Table Control.
    Note

    If you want to convert the step loop headings as well, select them before converting the step loop into a table control.

For more information about programming step loops, see the ABAP User Guide .

For more information about creating a step loop in the alphanumeric mode of the Screen Painter, see Creating a Step Loop .