NEW-PAGE - page_options
These additions set properties of the list for all subsequent pages of the current list level, until
they are set again in another
NEW-PAGE statement. The additions override additions of the same name in the introductory program statement.
These additions specify which components of the standard page header are produced for the subsequent pages of the current list level. The standard page header consists of a standard title and column headings.
NO-TITLE switch the
output of the standard title on or off for the subsequent pages. The predefined default setting for basic lists is
WITH-TITLE, and for details lists is
the output of the column headings on or off for all subsequent pages. The predefined default setting
for basic lists is
WITH-HEADING, and for details lists is
For basic lists, these additions override the setting made in the introductory program statement. The
NO STANDARD PAGE HEADING used there functions in the same way as
NO-HEADING are used simultaneously,
with the exception that the latter do not have an impact on the system field
... LINE-COUNT page_lines
This addition sets the page length of the subsequent pages of the current list level to the value in
page_lines and sets
sy-linct to this value.
page_lines expects a data object of type
i. If the value of
page_lines is less than or equal to 0 or greater than 60000, the page length is set to 60000. For the basic list, the addition overrides the page length specified in the introductory program statement.
The page length determines how many lines including page header and page footer can be written to a list page. If output is written to a line outside the current page length or in the area reserved for the page footer of a basic list, a new page is created automatically.
The lines reserved in the introductory program statement for the page footer of the basic list cannot
be changed with the addition
LINE-COUNT of the statement
NEW-PAGE. Page footers cannot be created for details lists.
The default value should be used for screen lists since, as a rule, page breaks specified using
LINE-COUNTare not adjusted to the window size.
- The default value should also be used for spool lists, so that the page size can be selected on a printer-specific basis. A spool list should be created in such a way that it provides satisfactory results for any page size.
Specifying a fixed line count is only useful for form-like lists with a fixed page layout. Here, however, always check whether these forms can be created by other means. For example, search the
SAP Help Portal for the term "form".
The following code demonstrates automatic page breaks in a basic list. The pages have two-line page
headers and page footers defined after
END-OF-PAGE. The page length is specified after
NEW-PAGE. The program displays five pages.
REPORT NO STANDARD PAGE HEADING LINE-COUNT 0(2). TOP-OF-PAGE. WRITE sy-pagno. ULINE. END-OF-PAGE. ULINE. WRITE 'Footer'. START-OF-SELECTION. NEW-PAGE LINE-COUNT 6. DO 10 TIMES. WRITE / sy-index. ENDDO.
... LINE-SIZE width
This addition sets the page width of the current list level to the value in
sy-linsz to this value. The line width determines the number of
characters in the line buffer as well as the number of columns in the list displayed.
expects a data object of type
i. The value of
must not be negative. If the value of
width is equal to 0 or greater than 1023, the line width is set to a default width, which is based on the window width of the current
sy-scols), but is at least as wide as the width of a standard sized GUI window. For the basic list, the addition overrides the page width specified in the introductory program statement.
The addition has an effect only if no output has yet been sent to the current list level. The page width of a list that has already been written cannot be changed.
The current maximum line width is stored in the constants
slist_max_linesize of the
type group SLIST.
slist_max_listline of type
c and length
slist_max_linesize is also defined there.
Creates a basic list and details lists with various page widths. Only the standard title of the standard page header is displayed.
REPORT demo NO STANDARD PAGE HEADING. START-OF-SELECTION. NEW-PAGE WITH-TITLE LINE-SIZE 40. WRITE 'Basic list'. AT LINE-SELECTION. NEW-PAGE WITH-TITLE LINE-SIZE 20. WRITE 'Secondary list'.
This addition suppresses the event
on the new page and on all automatically created pages of the current list level up to the next statement
NEW-PAGE. If the addition
NO-TOPOFPAGE is not specified, the
TOP-OF-PAGE event is triggered before the output to a new page.
The following program generates six pages. The
TOP-OF-PAGE event is triggered only on the first page.
REPORT demo NO STANDARD PAGE HEADING. START-OF-SELECTION. ULINE. NEW-PAGE NO-TOPOFPAGE LINE-COUNT 2. DO 10 TIMES. WRITE / sy-index. ENDDO. TOP-OF-PAGE. WRITE 'Basic list'.