Program-driven scrolling in lists
1. SCROLL
LIST TO FIRST PAGE.
2.
SCROLL LIST TO LAST PAGE.
3.
SCROLL LIST TO PAGE pag.
4.
SCROLL LIST TO COLUMN col.
5.
SCROLL LIST FORWARD.
6.
SCROLL LIST BACKWARD.
7.
SCROLL LIST LEFT.
8. SCROLL LIST RIGHT.
The Return Code is set as follows:
If used when generating the basic list, the SCROLL statement without INDEX refers to the basic list itself. If used when generating a details list, it refers to the directly subordinate list just displayed. The statement is only effective within list processing (after a WRITE, SKIP, or similar statement).
System fields that are useful for interactive reporting are documented in System Fields for Lists.
SCROLL LIST TO FIRST PAGE.
1. ... INDEX
idx
2. ... LINE line
Scrolls up to the first page (this corresponds the command field entry, P-- or PP--).
... INDEX idx.
Scrolls to the list level
idx. idx corresponds
to the value of system field SY-LSIND when creating the corresponding list.
Scroll to the beginning of the list at list level 1.
SCROLL LIST INDEX 1 TO FIRST PAGE.
If a new list (which is to replace the last list displayed) is created at an event (
AT USER-COMMAND, AT LINE-SELECTION...),
and if you want to scroll to a particular place in this new list, note the following: A change made
to the system field SY-LSIND is only ever taken into account
after the event. Therefore, SY-LSIND should be manipulated
using the last statement belonging to the event (e.g. SY-LSIND =
SY-LSIND - 1). A SCROLL statement with the
addition ...INDEX idx must be used for scrolling in this new list. In this way, scrolling in the old list (instead of the new list) is avoided.
... LINE line
Displays the list from the line line (corresponds to the
command field entry PLnn). The standard page header and TOP-OF-PAGE
area are not moved vertically and are therefore ignored when line line is determined.
SCROLL LIST TO LAST PAGE.
1. ... INDEX idx (see addition 1 of variant 1) 2. ... LINE line (see addition 2 of variant 1)
Scrolls to the last page of the list displayed on the screen (corresponds to the command field entry PP++).
SCROLL LIST TO PAGE pag.
1. ... INDEX idx (see addition 1 of variant 1) 2. ... LINE line (see addition 2 of variant 1)
Scrolls to the specified page of the list displayed on the screen (corresponds to the command field entry PPnn).
Scroll list on list level 1 to page 7.
SCROLL LIST INDEX 1 TO PAGE 7.
Scroll list on list level 1 to page 7 and display from line 5.
SCROLL LIST INDEX 1 TO PAGE 7 LINE 5.
Although the list is now displayed from page 7 and line 5, it is precisely this line which is overlayed
by the page header, if a header exists for page 7 (standard header and/or
TOP-OF-PAGE lines).
If you want to display a particular
line immediately after the page header, you can use the function module
LIST_SCROLL_LINE_TOPMOST which makes the necessary
calculations (according to DESCRIBE LIST ...).
SCROLL LIST TO COLUMN col.
1. ... INDEX idx (see addition 1 of variant 1) 2. ... LINE line (see addition 2 of variant 1)
Displays the list from the column col (this corresponds to the command field entry PSnn).
Scroll to page 5 of current list and display this page from column 20.
SCROLL LIST TO PAGE 5.
SCROLL LIST TO COLUMN 20.
SCROLL LIST FORWARD.
1.
... INDEX idx (see addition 1 of variant 1)
2. ... n PAGES
Scrolls the list down by one screen page (but no further than the last page; corresponds to the command field entry P+).
Scroll list last displayed one page down.
SCROLL LIST FORWARD.
... n PAGES
Scrolls n pages forwards (corresponds to the command field entry PP+n).
When you use the addition ... n PAGES, scrolling is by physical page, not by screen page.
SCROLL LIST BACKWARD.
1.
... INDEX idx (see addition 1 of variant 1)
2. ... n PAGES (see addition 2 of variant 5)
Scrolls one screen page back (but no further than the first page; corresponds to the command field entry P-).
... n PAGES
Scrolls n pages backwards (corresponds to the command field entry PP-n).
When you use the addition ... n PAGES, scrolling is by page, not by screen section.
SCROLL LIST LEFT.
1.
... INDEX idx (see addition 1 of variant 1)
2. ... BY n PLACES
The display begins with column 1 of the list (i.e. left-justified; corresponds to the command field entry PS--).
... BY n PLACES
Shifts the list display n columns. You determine the direction
using the parameters
...LEFT... or ...RIGHT...
(corresponds to the command field entries PS+n and PS-n).
Scroll list at last list level displayed 2 columns to the left.
SCROLL LIST LEFT BY 2 PLACES.
SCROLL LIST RIGHT.
1. ... INDEX idx (see addition 1 of variant 1) 2. ... BY n PLACES (see addition 2 of variant 7)
Shifts the display to the right until the right side of the list so far not visible on the screen is
fully visible (i.e. right-justified). This only makes sense with reports that are defined wider than
the standard screen size by REPORT ... LINE-SIZE (this corresponds to the command field entry PS++).
Horizontal scrolling is also affected by the area boundaries set ( SET SCROLL-BOUNDARY) and by "unmovable" lines (NEW-LINE NO-SCROLLING).
Manipulating Details Lists