In the following comments, the list just generated is referred to as the current list
(and thus pages and lines in that list as the current page and the current line). The list just displayed
as a result of any interactive events is referred to as the displayed list.
Here,
absolute means that the specification refers to the list itself and not to any special
features of the screen display (e.g. screen size, scroll status, ...)
After an interactive event
(AT LINE-SELECTION, AT
USER-COMMAND, ...), any line of the displayed list that has been selected (or contains the
cursor) or any line read with READ LINE is known as the selected line.
The system field report for lists allows you to display and modify the current values of system fields. You can, for example, scroll, modify the window size or select a list line (by double-clicking or by selecting the pushbutton Next list level with cursor positioning).
SY-PAGNO - Number of current page of current list;
counting begins at 1;
SY-LINNO - Number of current line on current page;
counting begins at 1;
SY-COLNO - Number of column where cursor is positioned in current list;
counting begins at 1;
SY-LINCT - Number of lines per page in current list, if specified by LINE-COUNT in the REPORT statement or by NEW-PAGE; otherwise, SY-LINCT has the value zero and the length of the page is determined by its contents alone;
SY-LINSZ - Line width
of current list;
Can be manipulated by LINE-SIZE in
the REPORT statement or by
NEW-PAGE;
the maximum
line width is 1023 characters. However, you should not set the list width wider than you need. This makes the list easier to read, easier to print, and improves system performance.
SY-TITLE - Title that
appears in the title bar of the display window;
can be manipulated by maintaining the text elements
of the report or by SET TITLEBAR;
maximum length: 70 characters;
SY-SROWS - Current number of lines in display window;
counting begins at 1;
SY-SCOLS - Current number of columns in display window;
counting begins at 1;
After each interactive event, the following system fields are set automatically:
SY-LSIND - Index of
current list; (basic list: 0, first details list: 1, ..., twentieth details list: 20);
if you reduce
the value of SY-LSIND (to n), the list at level n is replaced
by the current list when this list has been generated. (For this reason, any modifications to
SY-LSIND should always be made at the end of the relevant processing block.)
SY-LILLI - Absolute number of a selected
line in displayed list;
the addition CURRENT
LINE of READ LINE
or MODIFY LINE always
refers to the line SY-LILLI in the list SY-LISTI;
counting begins at 1;
SY-LISTI - Index of
displayed list after line selection (normally, SY-LISTI = SY-LSIND
- 1);
modifications should only be made by READ LINE;
SY-LISEL - Contents of a selected line;
SY-CUROW - Number of line
in window on which the cursor was last positioned in the displayed list;
modifications should only
be made by SET CURSOR for the next screen change;
counting begins at 1;
SY-CUCOL - Number of column
in window on which the cursor was last positioned in the displayed list;
to determined tbe absolute
position of the cursor, you can use GET
CURSOR instead;
modifications should only be made by SET CURSOR;
counting begins at 2;
SY-CPAGE - Number of top displayed page
in displayed list;
modifications should only be made by SCROLL LIST TO...PAGE... or through interactive scrolling;
counting begins at 1;
SY-STARO - Number of top line
on top displayed page (SY-CPAGE) of the displayed list;
modifications should only be made by SCROLL
LIST TO...PAGE...LINE... or through interactive scrolling;
counting begins at 1 and lines of the page header are included;
SY-STACO - Number of first displayed
column
in the displayed list;
modifications should only be made by SCROLL LIST LEFT/RIGHT/TO COLUMN or through interactive scrolling;
counting begins at 1;
Incidentally:
SCROLL LIST INDEX SY-LSIND TO: PAGE SY-CPAGE LINE SY-STARO,
COLUMN
SY-STACO.
positions the current list in exactly the same position as the list just displayed;
SY-UCOMM - Function code
that triggered the event in the displayed list;
Modifications should be made by SET USER-COMMAND.
SY-PFKEY - Status of
displayed list;
,,Modifications should be made by SET PF-STATUS;