Mentor SAP
Two relevant formal parameters are necessary in the form creation process They are based on the ABAP Dictionary structures: /1bcdwb/docparams and /1bcdwb/formoutput.

 

In the above example, these formal parameters belong to the actual parameters GS_DOCPARAMS and GS_FORMOUTPUT.

 

The variable GS_DOCPARAMS holds parameters to influence the form creation process:

 

 

The variable GS_FORMOUTPUT holds the results of the function call:

 

RequestFP_JOB_CLOSE will tell you whether the output was produced successfully. You can also query the spool IDs.

 

If you are familiar with SAPscript, FP_JOB_OPEN and FP_JOB_CLOSE are roughly equivalent to function modules OPEN_FORM and CLOSE_FORM.

 

After the form creation process, further processing steps can be coded like downloading the form.

Sending the form via e-mail is another possibility. See useful SAP examples in the package SBCOMS.

 

You can find download utilities in the FP_UTILITIES include.