... [WITH-TITLE|NO-TITLE]
[WITH-HEADING|NO-HEADING]
[LINE-COUNT page_lines]
[LINE-SIZE width]
[NO-TOPOFPAGE] ... .
1. ... WITH-TITLE|NO-TITLE
2. ... WITH-HEADING|NO-HEADING
3. ... LINE-COUNT page_lines
4. ... LINE-SIZE width
5. ... NO-TOPOFPAGE
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 addtions overrule the identically named additions of the program introduction statement.
... WITH-TITLE|NO-TITLE
... WITH-HEADING|NO-HEADING
These additions determine which components of the standard page header are output for the subsequent pages of the current list level. The standard page header consists of a standard title and of column headings.
The additions WITH-TITLE and 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 detail lists NO-TITLE.
The additions WITH-HEADING and
NO-HEADING switch 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 detail lists NO-HEADING.
For the basic list, these additions overrule the setting made in the program introduction statement.
The addition NO STANDARD PAGE HEADING you can use there,
is identical to simultaneously using NO-TITLE and
NO-HEADING, except that the latter do not influence the system field sy-wtitl.
... LINE-COUNT page_lines
This addition determines the page length of the subsequent pages of the current list level in page_length and sets sy-linct to this value. For page_length, a data object of type i is expected. If the value of page_lines is less than or equal to 0 or greater than 60.000, then the page length is set to 60.000. For the basic list, the addition overrules the page length determined in the program introduction statement.
The page length determines how many lines including
page header and
page footer can be written to a list
page. If an output would write into a line outside the current page length or would write into the area reserved for the page footer of a basic list, a new page is automatically created.
The lines reserved in the program introduction statement for the page footer of the basic list cannot be changed with addition LINE-COUNT of the NEW-PAGE statement. For detail lists, you cannot create a page footer.
Demonstration of automatic page breaks on a basic list. The pages have two-line page headers and page footers defined after TOP-OF-PAGE and END-OF-PAGE. The page length is determined after NEW-PAGE. The program outputs 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 width and sets sy-linsz to this value. The line width determines the number of characters in the list buffer and the number of columns in the displayed list. For width, a data object of type i is expected. The value of width must not be negative. If the value of width is equal to 0 or greater than 1.023, the line width is set to a default width, which depends on the window width of the current dynpro (sy-scols), but is at least as wide as the width of an SAP window in standard size. For the basic list, the addition overrules the page width determined in the program introduction statement.
The addition is effective only if no output has yet been sent to the current list level. The page width of a written list cannot be changed.
The currently valid maximum value for the line width is stored in the constant slist_max_linesize of the
type group SLIST. There, also a type
slist_max_listline of type c and length slist_max_linesize is defined.
Creation of basic list and detail list with different page width values. Of the standard page header, only the standard title 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'.
... NO-TOPOFPAGE
This addition suppresses on the new page and on all pages of the current list level that are automatically
created, up to the next NEW-PAGE statement, the event
TOP-OF-PAGE. If addition
NO-TOPOFPAGE is not specified, the event TOP-OF-PAGE is triggered before the output to a new page.
The program below creates six pages. The event TOP-OF-PAGE 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'.