To scroll through a list vertically by the size of the current window and independent of the page length, use the following statement:
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 INDEXaddition, 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.
WRITE: 'Top of Page', sy-pagno, 'SY-SROWS:',
DO 100 TIMES.
WRITE / sy-index.
DO 3 TIMES.
SCROLL LIST FORWARD.
This executable program creates a list of one endless page. Within the DO loop, the system executes the SCROLLstatement 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-scolsminus the number of header lines. The user can continue scrolling into both directions.