SCROLL

SCROLL Syntax Diagram

Program-driven scrolling in lists

Variants:

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.

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.


1. ... INDEX idx
2. ... LINE line

Effect

Scrolls up to the first page (this corresponds the command field entry, P-- or PP--).

Effect

Scrolls to the list level idx. idx corresponds to the value of system field SY-LSIND when creating the corresponding list.

SCROLL LIST INDEX 1 TO FIRST PAGE.

Note

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.

Effect

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.


1. ... INDEX idx (see addition 1 of variant 1)
2. ... LINE line (see addition 2 of variant 1)

Effect

Scrolls to the last page of the list displayed on the screen (corresponds to the command field entry PP++).


1. ... INDEX idx (see addition 1 of variant 1)
2. ... LINE line (see addition 2 of variant 1)

Effect

Scrolls to the specified page of the list displayed on the screen (corresponds to the command field entry PPnn).

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.

Note

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 ...).


1. ... INDEX idx (see addition 1 of variant 1)
2. ... LINE line (see addition 2 of variant 1)

Effect

Displays the list from the column col (this corresponds to the command field entry PSnn).

Example

Scroll to page 5 of current list and display this page from column 20.

SCROLL LIST TO PAGE 5.
SCROLL LIST TO COLUMN 20.


1. ... INDEX idx (see addition 1 of variant 1)
2. ... n PAGES

Effect

Scrolls the list down by one screen page (but no further than the last page; corresponds to the command field entry P+).


SCROLL LIST FORWARD.

Effect

Scrolls n pages forwards (corresponds to the command field entry PP+n).

Note

When you use the addition ... n PAGES, scrolling is by physical page, not by screen page.


1. ... INDEX idx (see addition 1 of variant 1)
2. ... n PAGES (see addition 2 of variant 5)

Effect

Scrolls one screen page back (but no further than the first page; corresponds to the command field entry P-).

Effect

Scrolls n pages backwards (corresponds to the command field entry PP-n).

Note

When you use the addition ... n PAGES, scrolling is by page, not by screen section.


1. ... INDEX idx (see addition 1 of variant 1)
2. ... BY n PLACES

Effect

The display begins with column 1 of the list (i.e. left-justified; corresponds to the command field entry PS--).

Effect

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).

Example

Scroll list at last list level displayed 2 columns to the left.

SCROLL LIST LEFT BY 2 PLACES.


1. ... INDEX idx (see addition 1 of variant 1)
2. ... BY n PLACES (see addition 2 of variant 7)

Effect

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++).

Note

Horizontal scrolling is also affected by the area boundaries set ( SET SCROLL-BOUNDARY ) and by "unmovable" lines ( NEW-LINE NO-SCROLLING).