SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → User Dialogs → Classic Lists → Creating Lists →Syntax
POSITION pos.
Effect
This statement places the list
cursor at the position in the current line in the list buffer specified in pos.
The program expects a data object of the type i for pos.
If the value of pos is 0 or less or is greater than the page length in
sy-linsz defined with the addition LINE-SIZE
to the program initiating statement or NEW-PAGE,
all subsequent output statements do not create any output until the list cursor is positioned within a line again.
Notes
Example
Definition and use of a macro write_frame to draw frames around WRITE output. The POSITION statement positions the list cursor for subsequent output.
DATA: x TYPE i,
y TYPE i,
l TYPE i.
DEFINE write_frame.
x = sy-colno. y = sy-linno.
WRITE: '|' NO-GAP, &1 NO-GAP, '|' NO-GAP.
l = sy-colno - x.
y = y - 1. SKIP TO LINE y.
ULINE AT x(l).
y = y + 2. SKIP TO LINE y.
ULINE AT x(l).
y = y - 1. x = sy-colno. SKIP TO LINE y. POSITION x.
END-OF-DEFINITION.
SKIP.
WRITE 'Demonstrating'.
write_frame 'dynamic frames'.
WRITE 'in'.
write_frame 'ABAP'.
WRITE 'output lists.'.