NEW-PAGE - page_options
Short Reference
ABAP Syntax ... [WITH-TITLE|NO-TITLE]
[WITH-HEADING|NO-HEADING]
[LINE-COUNT page_lines]
[LINE-SIZE width]
[NO-TOPOFPAGE] ... .
ABAP_ADDITIONS:
1 ... WITH-TITLE|NO-TITLE
2 ... WITH-HEADING|NO-HEADING
3 ... LINE-COUNT page_lines
4 ... LINE-SIZE width
5 ... NO-TOPOFPAGE
What does it do? 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.
ABAP_ADDITION_1 ... WITH-TITLE|NO-TITLE
ABAP_ADDITION_2 ... WITH-HEADING|NO-HEADING
What does it do? These additions specify 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 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 details
lists is 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 details lists is NO-HEADING .
Latest notes: For basic lists, these additions override the setting made
in the introductory program statement. The
NO STANDARD PAGE HEADING
addition used there functions in the same way as when you use
NO-TITLE and NO-HEADING simultaneously, with the exception
that the latter do not have an impact on the system field sy-wtitl
.
ABAP_ADDITION_3 ... LINE-COUNT page_lines
What does it do? 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.
Latest notes: The lines reserved in the introductory program statement
for the page footer of the basic list cannot be changed with addition
LINE-COUNT of the NEW-PAGE statement. 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-COUNT are 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 .
Example ABAP Coding The following code demonstrates automatic page breaks in
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 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.
ABAP_ADDITION_4 ... LINE-SIZE width
What does it do? 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 line
buffer as well as the number of columns in the list displayed. width
expects a data object of type i . The value of width
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 dynpro
( sy-scols ), but is at least as wide as the width of a
standard sized SAP 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.
Latest notes: The current maximum line width is stored in the constants
slist_max_linesize of the type group
SLIST . A type
slist_max_listline of type c and length slist_max_linesize
is also defined there.
Example ABAP Coding 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'.
ABAP_ADDITION_5 ... NO-TOPOFPAGE
What does it do? This addition suppresses the
TOP-OF-PAGE event on the new page and on all automatically created
pages of the current list level up to the next NEW-PAGE
statement. If the addition NO-TOPOFPAGE is not specified, the
TOP-OF-PAGE event is triggered before the output to a new page.
Example ABAP Coding 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'.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved