The Application Program
Designing the layout of a form is the most time-consuming part of creating a form scenario. However, a form itself cannot be run; it can only be previewed with test data in the SFP.
An ABAP program is required to create a form. This lesson will walk you through the basic details of writing an ABAP application that integrates a PDF-based form.
There are five relevant steps during the forms creation process:
In an offline scenario, the one created form of course can “live” without connection to an SAP system. That is exactly the purpose of an offline form! The offline form can be “started” or opened and filled with data.
The name of the function module generated for the form must be determined, as the name differs depending on the form and system.
Call the function module FP_FUNCTION_MODULE_NAME and pass the form name to it.
In this example, the parameter GV_FORMNAME could be filled with “Z_##_LAYOUT ” and the result parameter GV_FMNAME could be filled with “/1BCDWB/SM00000095” (this is the generated function module; see SE37).
In the application that calls a form template, you can use the function module FP_JOB_OPEN to make settings for the form output and spool control with Adobe Document Services (ADS). You control the output by using the parameters (IE_OUTPUTPARAMS) of the structure SFPOUTPUTPARAMS.
This structure has many fields that allow you to determine printer settings, spool settings, settings for Adobe Document Services, and so on.
Some relevant parameters for print scenarios and interactive scenarios include:
When the program is called, the system creates a PDF form with the specified change options. The form is encrypted with a random password. The usage rights cannot be changed. To create a form with changed usage rights, you must run your application program again with new parameter values.