ABAP Keyword Documentation → ABAP - Reference → User Dialogs → Classic Lists → printing lists
Print List Levels and Spool Requests
Every output to a print list is assigned to exactly one spool request. For every spool request, print parameters have been determined that can no longer be changed. Print lists can be stacked in print list levels. To every print list level, a spool request is assigned.
Other versions: 7.31 | 7.40 | 7.54
Print List Levels
The following operations create a new print list level:
- Choose Execute + Print on the selection screen
- Call program with
SUBMIT TO SAP-SPOOL
- Execute a program in a background job
- Call a screen sequence
with
CALL SCREEN
, when a spool request is already open.
- Execute the statement
NEW-PAGE PRINT ON
. This statement, however, does not create a randomly stackable print list level.
- In a print list level created with
NEW-PAGE PRINT ON
no other print list level can be created withNEW-PAGE PRINT ON
. However, the other operations for creating print list levels are still valid. When you use the additionNEW SECTION
inNEW-PAGE PRINT ON
, the existing request is used further or it is closed implicitly before a new one is opened.
- In a print list level not created with
NEW-PAGE PRINT ON
or while creating a screen list, you can create no more than one print list level usingNEW-PAGE PRINT ON
.
NEW-PAGE PRINT ON
can thus be stacked only
upon a print list level that has not been created with NEW-PAGE PRINT ON
or into the creation of a screen list.
Up to 20 print list levels can be stacked.
Open Spool Requests
The first output statement within a print list level opens a new spool request, whose number is placed
into system field sy-spono
. If another spool request is already open, it
remains open and is used further after the print list level has been left. In a print list level that
has been created by the call of a screen sequence, the spool request takes over the print parameters of the preceding spool request. In all other cases, the explicitly specified print parameters apply.
Close Spool Requests
When leaving a print list level that was not opened with NEW-PAGE PRINT ON
,
i.e. at the end of the program or when leaving a screen sequence, the spool request related to the print
list level is closed. If a spool request stacked upon the print list level with NEW-PAGE
PRINT ON has not yet been closed using NEW-PAGE PRINT OFF
, it will
also be closed. Subsequent output statements continue to write to the print list of the previous spool request or to the current screen list.
The statement NEW-PAGE PRINT OFF
closes only spool requests for which printing
was switched on using NEW-PAGE PRINT ON
. If after that no previous spool
request is open, printing is switched off again, i.e. subsequent output statements continue to write
to the screen list. If a previous spool request existed, printing remains switched on and the output
is again written into its print list. NEW-PAGE PRINT OFF
has no effect on a spool request that has not been opened with NEW-PAGE PRINT ON
.
After closing a spool request, the number of the closed spool request remains in system field
sy-spono until an output statement again writes into a print list. This may be a new print list
or the list of a previous spool request. If after closing a spool request a previous spool request exists,
the number in sy-spono
differs from the number of that request until another output into its print list is performed.
Note
We recommend to always close a spool request that has been opened with NEW-PAGE
PRINT ON explicitly using NEW-PAGE PRINT OFF
, before it is closed implicitly at the end of the program or when leaving a screen sequence.
Example
See Lists, print.