To determine the width of the output list, use the LINE-SIZE option of the REPORT statement.
REPORT rep LINE-SIZE width .
This statement determines the width of the output list of program rep as width characters. If you set width to zero, the system uses the width of the standard list .
A line can be up to 255 characters long. However, if you intend to print the list, note that most printers cannot print lists wider than 132 characters. If you want to print the list directly while creating it, the page width must comply with one of the existing print formats. Otherwise, the system will not print the list (see Print Parameters ). Make sure not to choose a list width exceeding 132 characters, unless you create the list for display only.
While creating the list, the system field sy-linsz contains the current line width. To adapt the list width to the current window width, see Lists with Several Pages .
Horizontal lines that you create using the ULINE statement (without the AT option) automatically adapt to the self-defined list width.
REPORT demo_list_line_size LINE-SIZE 40. WRITE: 'SY-LINSZ:', sy-linsz. ULINE. DO 20 TIMES. WRITE sy-index. ENDDO.
This program creates the following output:
The example uses the standard page header. If you replace the LINE-SIZE value 40 with 60, the output looks as follows:
The standard page header and the underscores automatically conform to the list width.