To scroll through a list vertically by the size of the current window and independent of the page length, use the following statement:
Syntax
SCROLL LIST FORWARD|BACKWARD [INDEX <idx>].
If you do not use the INDEX addition, the statement scrolls forward or backward by one whole window in the current list. If you use the INDEX <idx> addition, the system scrolls in the list with the level <idx>. For more information on scrolling in list levels, see
Scrolling through Interactive Lists.REPORT demo_list_scroll_1 NO STANDARD PAGE HEADING LINE-SIZE 40.
TOP-OF-PAGE.
WRITE: 'Top of Page', sy-pagno, 'SY-SROWS:', sy-srows.
ULINE.
START-OF-SELECTION.
DO 100 TIMES.
WRITE / sy-index.
ENDDO.
DO 3 TIMES.
SCROLL LIST FORWARD.
ENDDO.
This executable program (report) creates a list of one endless page. Within the DO loop, the system executes the SCROLL statement three times. If the current window has a length of 12 lines (stored in SY-SROWS), the output of the program appears as below:
Note that the actual list is scrolled by SY-SROWS minus the number of header lines. The user can continue scrolling into both directions.