ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Classic Lists → Create lists → WRITE → WRITE - list_elements
Lists, Line Elements
The example illustrates line elements on lists.
Other versions: 7.31 | 7.40 | 7.54
Source Code
    DATA: x0 TYPE i VALUE 10,
          y0 TYPE i VALUE 10,
          n  TYPE i VALUE 16,
          i  TYPE i VALUE 0.
    x = x0.
    y = y0.
    pos( ).
    WHILE i LE n.
      WRITE line_bottom_left_corner AS LINE.
      x = x + 1. pos( ).
      ULINE AT x(i).
      x = x + i. pos( ).
      WRITE line_bottom_right_corner AS LINE.
      y = y - 1. pos( ).
      DO i TIMES.
        WRITE '|'.
        y = y - 1. pos( ).
      ENDDO.
      WRITE line_top_right_corner AS LINE.
      i = i + 1.
      x = x - i. pos( ).
      ULINE AT x(i).
      x = x - 1. pos( ).
      WRITE line_top_left_corner AS LINE.
      y = y + 1. pos( ).
      DO i TIMES.
        WRITE '|'.
        y = y + 1. pos( ).
      ENDDO.
      i = i + 1.
    ENDWHILE.
Description
Displaying a spiral using line elements and linking these automatically on a list.