Start of Content Area

Determining the List Width  Locate the document in its SAP Library structure

To determine the width of the output list, use the LINE-SIZE option of the REPORTstatement.

Syntax

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-linszcontains 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 ULINEstatement (without the AT option) automatically adapt to the self-defined list width.

Example

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:

This graphic is explained in the accompanying text

The example uses the standard page header. If you replace the LINE-SIZE value 40 with 60, the output looks as follows:

This graphic is explained in the accompanying text

The standard page header and the underscores automatically conform to the list width.

 

 

 

End of Content Area