SET LEFT SCROLL-BOUNDARY.
... COLUMN col
When you create a list, the current write position (system field SY-COLNO,
see WRITE) is set as the
left boundary of the movable area (fixing lead columns). When this list page is displayed on the screen,
you can scroll horizontally with the scrollbar only from this list column - all list column to the left of this are fixed at the left edge.
The SET RIGHT SCROLL BOUNDARY variant is not currently supported. Using the statement has no effect at present.
... COLUMN col
Sets the column col as the left boundary of the movable area.
The last value set by SET SCROLL-BOUNDARY affects the
entire page display and must be reset for each list page (usually in the event
TOP-OF-PAGE) - although it can be different for each list
page.
The NEW-LINE NO-SCROLLING
statement allows you to exclude individual list lines from horizontal scrolling (e.g. title lines and indented comment blocks).
Fix the lead column
DATA: NUMBER TYPE I,
SUB_NUMBER TYPE
I.
NEW-PAGE NO-TITLE NO-HEADING.
DO 10 TIMES.
NUMBER = SY-INDEX.
DO
10 TIMES.
SUB_NUMBER = SY-INDEX.
WRITE: /(10)
NUMBER, '|',
(10) SUB_NUMBER, '|'.
SET LEFT SCROLL-BOUNDARY.
Not really necessary here because it was already set in the event TOP-OF-PAGE.
WRITE: 'Data 1', '|', 'Data 2', '|', 'Data 3', '|'. " ... 'Data n'
ENDDO.
ENDDO.
ULINE.
TOP-OF-PAGE.
ULINE.
WRITE:
/(10) 'No', '|',
(10)
'Sub_No', '|'.
SET LEFT SCROLL-BOUNDARY.
WRITE: 'DATA 1', '|', 'DATA 2', '|', 'DATA 3', '|'. " ... 'DATA n'
ULINE.
This produces the following list:
------------------------------------------------------
No | Sub_No | DATA 1 |
DATA 2 | DATA 3 |
------------------------------------------------------
1 | 1 |
Data 1 | Data 2 | Data 3 |
1 |
2 | Data 1 | Data 2 | Data 3 |
1 |
3 | Data 1 | Data 2 | Data 3 |
...
10 | 8 | Data 1 | Data
2 | Data 3 |
10 |
9 | Data 1 | Data 2 | Data 3 |
10 | 10 | Data 1 | Data 2 | Data 3 |
------------------------------------------------------
Only the columns DATA 1, DATA
2 and DATA 3 are moved with horizontal scrolling.
Reset the lead column for a new page:
NEW-PAGE.
SET LEFT SCROLL-BOUNDARY COLUMN 0.
Program-Driven Scrolling