Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  User Dialogs →  Classic Lists →  printing lists →  Print Parameters 

Setting Print Parameters in a Program

You can only set print and archiving parameters in a program using the following function module: GET_PRINT_PARAMETERS. If you directly change the corresponding structures and then use the parameters in NEW-PAGE PRINT ON or SUBMIT TO SAP-SPOOL, a runtime error occurs. You can use the GET_PRINT_PARAMETERS function module to execute the following functions:

  • Generate a complete record of print and archiving parameters
  • Determine the print parameters that are currently valid during the print process
  • Change individual print parameters
  • Call print parameters interactively in the print dialog box

The interface parameters for the function module are listed in Overview of All Print Parameters.

The print dialog box is displayed by default and can be switched off using the NO_DIALOG parameter. The values passed to the function module are used as the default values in the print dialog box and can be overwritten there.

The function module gets all parameters that have not been set from the system, taking some values from the user master record. Dependent parameters are set automatically. If the function module is unable to generate a record with valid print and archiving parameters, it generates an exception. The generated records are either complete or empty. The VALID output parameter (if the print dialog box is being used) tells you whether or not a complete record could be generated.

Other versions: 7.31 | 7.40 | 7.54


Notes

  • For GET_PRINT_PARAMETERS, the completeness of the parameter records and the run capability of the spool request are of primary importance. The function module does not carry out a complete consistency test like the print dialog box. Consistency is only established in cases where it is significant for the run capability of the spool request. Inconsistent entries are sometimes ignored and sometimes replaced. For example:

  • The LINE_SIZE or LINE_COUNT input parameter can be used to set values that are not compatible with the LAYOUT parameter and lead to truncated printouts. Such inconsistencies are recognized in the print dialog box.

  • Even if invalid values are passed to DESTINATION, it is still possible to set IMMEDIATELY to "X". The function module replaces the output device with a standard value (LP01) and initializes IMMEDIATELY. This saves the request in the spool system with settings compatible with the default printer.

  • You can call the GET_PRINT_PARAMETERS function module several times consecutively. For example, the print dialog box can be called at the start of a program if the user enters the basic setting. When it is called again, the parameter records created in this way can be passed collectively to the PRI_PARAMS and ARC_PARAMS import parameters of the function module and overwritten there. This allows you to print wide lists in landscape format or narrow lists in portrait format with otherwise unchanged settings.