NEW-PAGE
Additions
7. ... PRINT ON ...
... DESTINATION dest
... COPIES cop
... LIST NAME name
... LIST DATASET dsn
... COVER TEXT text
... LIST AUTHORITY auth
... IMMEDIATELY flag
... KEEP IN SPOOL flag
... NEW LIST IDENTIFICATION flag
... DATASET EXPIRATION days
... LINE-COUNT lin
... LINE-SIZE col
... LAYOUT layout
... SAP COVER PAGE mode
... RECEIVER rec
... DEPARTMENT dep
... ARCHIVE MODE armode
... ARCHIVE PARAMETERS arparams
... NEW-SECTION
... NO DIALOG
8. ... PRINT ON ...
... PARAMETERS params
... ARCHIVE PARAMETERS arparams
... NEW-SECTION
... NO DIALOG
9. ... PRINT OFF
Addition 7
... PRINT ON ...
... DESTINATION dest (Output device)
... COPIES cop (Number of copies printed)
... LIST NAME name (Name of the list)
... LIST DATASET dsn (Name of the spool dataset)
... COVER TEXT text (Title of the spool request)
... LIST AUTHORITY auth (Authorization required
for display)
... IMMEDIATELY flag (Print immediately?)
... KEEP IN SPOOL flag (Keep list after
printing?)
... NEW LIST IDENTIFICATION flag (New spool request?)
... DATASET EXPIRATION day (Keep the list for
day days)
... LINE-COUNT lin ( lin lines per
page)
... LINE-SIZE col ( col columns
per line)
... LAYOUT layout (Print layout)
... SAP COVER PAGE mode (Print SAP cover sheet?)
... RECEIVER rec (SAP user name of
recipient)
... DEPARTMENT dep (Name of department)
... ARCHIVE MODE armode (Archiving mode)
... ARCHIVE PARAMETERS arparams (Structure with achiving
parameters)
... NEW-SECTION (Start of a new section)
... NO DIALOG (Omit print control screen)
In the case of the IMMEDIATELY , KEEP IN SPOOL and
NEW LIST IDENTIFICATION parameters, the flag must be a
literal or character field of length 1. If the flag contains no
value, the parameter is switched off. Any other character switches the
parameter on. Any of the sub-parameters for PRINT ON can be
omitted. The specification mode for SAP COVER PAGE can
take any of the values ' ', 'X' and 'D' . These values
have the following meanings:
' ' : Do not output cover sheet.
'X' : Output cover sheet.
'D' : Printer setting determines whether cover sheet is printed.
The specification armode for ARCHIVE MODE can take any of
the values '1', '2' and '3' . These values have the
following meanings:
'1' : Print only.
'2' : Archive only.
'3' : Print and archive.
The specification arparams for ARCHIVE PARAMETERS must
have the structure of ARC_PARAMS . This parameter should be
edited only using the function module GET_PRINT_PARAMETERS .
Effect
New page.
All WRITE statements (similarly SKIP, ULINE, ... ) from
the new page onwards are interpreted as printer instructions. Before
the first page is printed, the user sees a screen for determining the
print parameters, provided NO DIALOG was not specified. The
values defined in NEW-PAGE PRINT ON for LINE-SIZE and
LINE-COUNT are used by this screen. Default values are also
available if no others exist. The specifications for LINE-COUNT
and LINE-SIZE in the report header have no meaning here. The
various print parameters can be proposed or (in the case of NO
DIALOG ) determined for the specifications of the other additions. If
you use NEW-SECTION , the page numbering is set back to 1. If
printing is currently in progress, the current spool request is closed.
If the newly specified print parameters are compatible with the
previously specified print parameters, the new spool request is added
to the end of the request just closed.
Notes
-
Records cannot be placed in the spool across events
( AT LINE-SELECTION , AT PFx , AT USER-COMMAND )! In
this case, a new NEW-PAGE PRINT OFF statement (see addition 8)
is be executed, even if it is not programmed!
-
For LINE-SIZE , you should not specify values greater than 132
because most printers cannot handle wider lists.
Addition 8
... PRINT ON ...
... PARAMETERS params (Structure with print
parameters)
... ARCHIVE PARAMETERS arparams (Structure with archiving
parameters)
... NEW-SECTION (Start of a new section)
... NO DIALOG (Omits print control
screen)
Effect
New page.
All WRITE statements (similarly SKIP, ULINE, ... ) from
the new page onwards are interpreted as printer instructions. Before
the first page is printed, the user sees a screen for determining the
print parameters, provided NO DIALOG was not specified. The
print parameters are passed via the field string params which
must have the same structure as PRI_PARAMS . The field string can
be filled and modified with the function module
GET_PRINT_PARAMETERS . The specification arparams for
ARCHIVE PARAMETERS must have the same structure as
ARC_PARAMS . This parameter should only be edited with the
function module GET_PRINT_PARAMETERS . See addition 7 for
information on the meaning of NEW-SECTION
Note
-
Records cannot be placed in the spool across events
( AT LINE-SELECTION , AT PFx , AT USER-COMMAND )! In
this case, a new NEW-PAGE PRINT OFF statement (see addition 8)
is be executed, even if it is not programmed!
Example
-
* Printing without archiving
DATA PARAMS LIKE PRI_PARAMS.
DATA: DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LT50'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'Test NEW-PAGE PRINT ON'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
VALID = VALID.
IF VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS PARAMS NO DIALOG.
WRITE / 'First line'.
ENDIF.
Example
-
* Printing with archiving
DATA: PARAMS LIKE PRI_PARAMS,
ARPARAMS LIKE ARC_PARAMS,
DAYS(1) TYPE N VALUE 2,
COUNT(3) TYPE N VALUE 1,
VALID TYPE C.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING DESTINATION = 'LT50'
COPIES = COUNT
LIST_NAME = 'TEST'
LIST_TEXT = 'Test NEW-PAGE PRINT ON'
IMMEDIATELY = 'X'
RELEASE = 'X'
NEW_LIST_ID = 'X'
EXPIRATION = DAYS
LINE_SIZE = 79
LINE_COUNT = 23
LAYOUT = 'X_PAPER'
SAP_COVER_PAGE = 'X'
RECEIVER = 'SAP*'
DEPARTMENT = 'System'
SAP_OBJECT = 'RS'
AR_OBJECT = 'TEST'
ARCHIVE_ID = 'XX'
ARCHIVE_INFO = 'III'
ARCHIVE_TEXT = 'Description'
NO_DIALOG = ' '
IMPORTING OUT_PARAMETERS = PARAMS
OUT_ARCHIVE_PARAMETERS = ARPARAMS
VALID = VALID.
IF VALID <> SPACE.
NEW-PAGE PRINT ON PARAMETERS PARAMS
ARCHIVE PARAMETERS ARPARAMS
NO DIALOG.
WRITE / 'First line'.
ENDIF.
Addition 9
... PRINT OFF
Effect
New page.
From the new page onwards, all WRITE statements are again output
to the screen. The completed page is output to the spool file.
Index
© SAP AG 1996