Show TOC

Printing Several Forms in One Print RequestLocate this document in the navigation structure

Context

You want to print multiple forms in a single print request.

Print Request vs. Spool Request

SAP Smart Forms allows you to bundle several forms to form one output unit. This output unit is called a print request. A print request is different from a spool request:

  • Whether a new spool job is created in the spool depends on the settings in the spool dialog.

  • Whether a new print request starts depends on the standard parameters of the generated function module you set in SAP Smart Forms. For each print request, the spool dialog is called only once. If you suppress the dialog, you can pass parameters for spool processing only at the beginning of the print request.

This means that a print request gathers several forms before submitting them to spool processing. Thus they cannot be spread over several spool requests. Vice versa however, you can include several print requests into one spool request.

Procedure


  1. Use function module SSF_FUNCTION_MODULE_NAME to retrieve the name of the function module generated from the Smart Form (see also: Integrating the Smart Form Into the Application).

  2. Call the Smart Form for the first time and set the NO_CLOSE parameter of the control structure. This prevents the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request as well. Leave the NO_OPEN parameter empty.

    Note

    Instead of calling the Smart Form for the first time you can also call function module SSF_OPEN.

    Note

    If you want to start a new spool request for the print request, set the TDNEWID field of the Output Options in this first call.

  3. For all other form output of the application program that you want to include into the print request, use a loop to set both the NO_OPEN field and the NO_CLOSE field of the control structure.

  4. To close the print request, in the call of the last Smart Form set the NO_OPEN parameter and unmark the NO_CLOSE parameter.

    Note

    Instead of calling the Smart Form for the last time, you can also call function module SSF_CLOSE.

Results

You have placed the selected forms in a print request. If in the first step you started a new spool request, you can now view its status in the spool request overview (transaction SP01).