The form object Form Interface defines the entire set of data fields whose values can be transferred to a form by an application program. You can also define a form interface for multiple application programs. The form interface forms the basis for defining the form templates, which the application program supplies with data.
The Form Builder supports the following interface types:
Interface Type |
Description |
Special Features when Editing the Form Interface |
Special Features when Creating the Form Template |
---|---|---|---|
ABAP Dictionary-based |
Defines which data an application can insert into a form |
Creating and editing in the Form Builder |
Definition of the form context based on the form interface |
Smart Forms-compatible |
As above, but with Smart Forms-specific parameters |
Only for migrated Smart Forms |
|
XML-schema-based |
Based on an XML schema, which is constructed in accordance with the W3C standard |
You create the XML schema as a local XSD-type file in an appropriate editor on your front end, and load it to the Form Builder. You cannot edit XML-schema-based interfaces in the Form Builder. |
Definition of form context unnecessary (contained in XML schema) |
You have programmed the selection of data for the form in the application program, and know the internal tables, structures, or variables in which the data is saved.
The semantics of the valid parameter types match the semantics of a function module.
More information:
Interface Parameters of a Function Module
Overview of Function Modules (in ABAP Workbench Tools )
Creating Function Modules (in ABAP Programming (BC-ABA) )
You have called the Form Builder.
More information: Calling Form Builder to Edit Form Objects
Select the form object Interface and enter the name of the form interface.
Choose the editing function Create or Change .
If you are creating the interface, enter the properties (description and interface type) and save.
Define the interface parameters as described in the following sections .
Make sure that the application program provides the defined parameter values at runtime. Since an application program can serve multiple form templates, it is not necessary to include all parameters provided in the application program in the form template. The naming sequence can also differ from that in the code of the application program.
Activate the interface.
Defining Import and Export Parameters of the Form Interface
Choose
.You can use the standard parameter /1BCDWB/DOCPARAMS to transfer the value for the language setting, for example, to your application program. You can open the corresponding structure in the ABAP Dictionary by double-clicking the type SFPDOCPARAMS.
Define the import parameters.
For ABAP Dictionary-based and Smart Forms-based interfaces: If necessary, add additional import parameters.
The parameter names are valid for the whole form template and do not have to match the variable names in the data collection program. All data types are valid. TYPE can be selected under Type Assignment .
For XML-schema-based interfaces: Use the standard parameter /1BCDWB/DOCXML of type XSTRING for the transfer of runtime data from the application program.
Choose
.You use the standard parameter /1BCDWB/FORMOUTPUT to output the form in your application program, for example, as a PDF file for further processing.
Only for Smart Forms-compatible interfaces: If necessary, add additional parameters.
If you are editing the interface of a migrated Smart Form or an interface that is compatible with Smart Forms, the Tables option gives you an extra parameter. The system also provides the Smart Forms standard parameters . If you have a Smart Forms-compatible interface, you can use the existing application program of this Smart Form without making any modifications.
More information: Migrating Smart Forms , Switching Runtime section
Defining Your Own Form Fields (Global Definitions)
To insert additional fields in the form interface (for example Total fields), choose
and make the required entries.To insert data types that are not available in the ABAP Dictionary, choose
and create the data types as ABAP code.To use field symbols as pointers when reading from internal tables, choose
and make the required entries.More information: Field Symbols
Initializing Global Data Before Form Processing
You can initialize Global Data before you start to process the form, for example, to convert selected application data. You can also select additional data without having to make changes in the application program.
Use the ABAP Editor to write the program code (under Code Initialization ) that is to be executed before the form is processed. You can include subroutines ( Form Routines ).
Defining Currency and Quantity Fields in the Form Interface
In the ABAP Dictionary you can assign the appropriate quantity unit or currency to quantity or currency fields. When these fields are output, the system can insert the assigned currency or unit in the PDF form.
If the value field and the currency or quantity field are in different tables, you must make sure that the system recognizes this relation in the form, to ensure that the value field is correctly formatted when output.
To do this, choose
.Enter the following information for each entry:
Under Field Name enter the value field to be output (for example, the field VALTAB-VALUE, where VALTAB is the table name).
Under Reference Field enter the currency field (for example, the field CURTAB-CURRENCY, where CURTAB is the table name).
Under Data Type , specify whether the data type is a currency or quantity.
More information: Reference Field and Reference Table (ABAP Dictionary documentation)