If you need to print several forms with the same print job request, first you need to retrieve the name of the function module generated from the Smart Form, by using the SSF_FUNCTION_MODULE_NAME.
Then, call the function fm_name setting the components of the CONTROL_PARAMETERS structure using the following rule:
1st call:
NO_OPEN = SPACE.
NO_CLOSE = ‘X’.
nth call:
NO_OPEN = ‘X’.
NO_CLOSE = ‘X’.
last call:
NO_OPEN = ‘X’.
NO_CLOSE = SPACE .
data: control_parameters type ssfctrlop .
*You must set the following parameters before the 1st call:
control_parameters-no_open = space .
control_parameters-no_close = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME' (...)
call function fm_name (...)
*Supposing this is the last call, you must set parameters like this:
control_parameters-no_open = 'X' .
control_parameters-no_close = space .
call function 'SSF_FUNCTION_MODULE_NAME' (...)
call function fm_name (...)
If you follow this procedure, all smartforms will be associated to the same spool request.
You can check it on SP01 transaction.
Last Comments