Printing Lists from a Called Program

To send the output of reports you call from within your program using SUBMIT to the spool system, you must use the SUBMIT statement with the TO SAP-SPOOL addition:

Syntax

SUBMIT rep TO SAP-SPOOL
   [params|SPOOL PARAMETERS pripar]
   [ARCHIVE PARAMETERS arcpar]
   [WITHOUT SPOOL DYNPRO].

The SUBMIT statement is described in detail in the section Calling Executable Programs. If you use the TO SAP-SPOOL option, the list is formatted for printing while it is being created, and then sent to the spool system. The remaining additions set the print parameters.

Setting the Print Parameters

To define the print parameters, proceed as described with the NEW-PAGE PRINT ON statement:

You may set each print parameter individually using one of the params additions (see keyword documentation) or use the SUBMIT statement to execute a user dialog; however, to determine the print parameters, use the function module GET_PRINT_PARAMETERS only. The function module GET_PRINT_PARAMETERS decouples the user dialog from the SUBMIT statement, and guarantees a complete parameter set even without executing the user dialog. To determine the parameters, use only the additions SPOOL PARAMETERS and ARCHIVE PARAMETERS and, to suppress the user dialog of the SUBMIT statement, use the WITHOUT SPOOL DYNPRO option.