Dynamically Activating XSF Output
Use
Independent of the static settings on XSF output, you may want to print a form in XSF format or select a different output mode or output device for the form output.
Prerequisites
If you want to use spool processing for XSF output, in the system at least one printer of type 'XSF' must be set up. SAP Smart Forms stores XDF in the spool in binary format to ensure that no information is lost during a conversion (see also: Output of XML Documents).
Procedure
-
Define a structure for the output options (type: SSFCOMPOP) and provided you want the form to be returned as table a structure of type SSFCRESCL (to contain the output results):
data: output_options type SSFCOMPOP, job_output_info type SSFCRESCL.
-
If in the form the output format XDF is set, you must overwrite this setting. In addition, set XSFCMODE to activate the XSF settings of the standard parameters:
output_options-xdfcmode = 'X'. output_options-xdf = SPACE. output_options-xsfcmode = 'X'.
-
Use the parameters XSF, XSFOUTMODE, and XSFOUTDEV to determine the XSF settings. The parameters correspond to the static form attributes (the possible values are described under Output Options)
output_options-XSF = 'X'. output_options-XSFOUTMODE = 'S'. output_options-XSFOUTDEV = 'P863'.

If the TDDEST parameter of the output options contains a value, SAP Smart Forms ignores XSFOUTDEV.
-
Call the generated function module and pass the structures output_options and job_output_info to the standard parameters of the same names.
Result
Since the XSFCMODE field is set, the value of field XSF determines whether OTF or XSF is generated (you cannot have both in the same call):
-
If XSF is set, the form output is in XSF format
-
If XSF is not set, the form output is in OTF format
With output mode 'A' SAP Smart Forms returns the form as table. The table is returned using the XSFDATA parameter of the formal parameter JOB_OUTPUT_INFO of the generated function module.
With output mode 'S' SAP Smart Forms sends the form to spool processing.