Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  SAP GUI User Dialogs →  Classic Lists →  Creating Lists →  WRITE →  WRITE - list_elements 

Lists, Line Elements

This example demonstrates 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 += 1. pos( ).
      ULINE AT x(i).
      x += i. pos( ).
      WRITE line_bottom_right_corner AS LINE.
      y -= 1. pos( ).
      DO i TIMES.
        WRITE '|'.
        y -= 1. pos( ).
      ENDDO.
      WRITE line_top_right_corner AS LINE.
      i += 1.
      x -= i. pos( ).
      ULINE AT x(i).
      x -= 1. pos( ).
      WRITE line_top_left_corner AS LINE.
      y += 1. pos( ).
      DO i TIMES.
        WRITE '|'.
        y += 1. pos( ).
      ENDDO.
      i += 1.
    ENDWHILE.

Description

Displays a spiral using line elements and joins these automatically in a list.