Entering content frameDefining Where the User Can Scroll on a Page Locate the document in its SAP Library structure

You can restrict the area of a page that can be scrolled horizontally by the user with the scrollbars or from within the program. You can also combine the following two techniques.

Excluding Lines from Horizontal Scrolling

To exclude a line (for example, a header or comment line) from horizontal scrolling, define the line feed for that line as follows:

Syntax

NEW-LINE NO-SCROLLING.

The line following the statement cannot be scrolled horizontally. However, it can be scrolled vertically.

To undo the above statement, use:

Syntax

NEW-LINE SCROLLING.

This statement only makes sense if no line was output after NEW-LINE NO-SCROLLING.

Example

REPORT sapmztst NO STANDARD PAGE HEADING
                LINE-COUNT 3 LINE-SIZE 140.

START-OF-SELECTION.

DO 3 TIMES.
  WRITE: / 'SY-INDEX:'.
  DO 10 TIMES.
    WRITE sy-index.
  ENDDO.
ENDDO.

NEW-LINE NO-SCROLLING.
ULINE AT 20(20).
NEW-LINE NO-SCROLLING.
WRITE AT 20 '| **** Fixed! **** |'.
NEW-LINE NO-SCROLLING.
ULINE AT 20(20).

DO 3 TIMES.
WRITE: / 'SY-INDEX:'.
  DO 10 TIMES.
    WRITE sy-index.
  ENDDO.
ENDDO.

This program creates three pages of three lines each without page header or footer. The three lines of the second page cannot be scrolled due to NEW-LINE NO-SCROLLING. The program output looks like this:

This graphic is explained in the accompanying text

If the user scrolls to the right, the output may look like this:

This graphic is explained in the accompanying text

The lines of the first and third pages scroll past the fixed lines.

Left Boundary for Horizontal Scrolling

To determine the left boundary of the horizontally scrollable area, use:

Syntax

SET LEFT SCROLL-BOUNDARY [COLUMN <col>].

If you do not use the COLUMN option, the left boundary of the scrollable area of the current page is set to the current output position; if you use the COLUMN option, the left boundary is set to position <col>. Now, only the part to the right of this area can be scrolled horizontally.

Caution

The above statement applies to the entire current page, and only to it. You must repeat the statement for each new page, otherwise the system uses the default value (left list margin).

To set the same scrollable area for all pages of a list, you can execute the statement, for example, at the TOP-OF-PAGE event.

Example

REPORT sapmztst NO STANDARD PAGE HEADING
                LINE-COUNT 3 LINE-SIZE 140.

START-OF-SELECTION.

DO 3 TIMES.
  WRITE: /10 'SY-INDEX:'.
  DO 10 TIMES.
    WRITE sy-index.
  ENDDO.
ENDDO.

SET LEFT SCROLL-BOUNDARY COLUMN 20.

DO 3 TIMES.
WRITE: / 'SY-INDEX:'.
  DO 10 TIMES.
    WRITE sy-index.
  ENDDO.
ENDDO.

SET LEFT SCROLL-BOUNDARY COLUMN 10.

This program creates two pages of three lines each without page header or footer. The first SET statement affects the first page, since the automatic page break does not occur until the first WRITE statement of the second DO loop. The second SET statement affects the second page. The program output looks like this:

This graphic is explained in the accompanying text

If the user scrolls to the right, the output may look like this:

This graphic is explained in the accompanying text

The scrollable area of the first page disappears at a different position beneath the fixed area at the left margin than the scrollable area of the second page.

 

Leaving content frame