Show TOC

Defining Form InterfacesLocate this document in the navigation structure

Use

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)

Prerequisites
Procedure
  1. Select the form object Interface and enter the name of the form interface.

  2. Choose the editing function Create or Change .

  3. If you are creating the interface, enter the properties (description and interface type) and save.

  4. Define the interface parameters as described in the following sections .

    Note

    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.

  5. Activate the interface.

Defining Import and Export Parameters of the Form Interface

  1. Choose Start of the navigation path Form Interface Next navigation step Import End of the navigation path.

    Note

    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.

  2. 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.

  3. Choose Start of the navigation path Form Interface Next navigation step Export End of the navigation path.

    Note

    You use the standard parameter /1BCDWB/FORMOUTPUT to output the form in your application program, for example, as a PDF file for further processing.

  4. Only for Smart Forms-compatible interfaces: If necessary, add additional parameters.

Note

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 Start of the navigation path Global Definitions Next navigation step Global Data End of the navigation path and make the required entries.

  • To insert data types that are not available in the ABAP Dictionary, choose Start of the navigation path Global Definitions Next navigation step Types End of the navigation path and create the data types as ABAP code.

  • To use field symbols as pointers when reading from internal tables, choose Start of the navigation path Global Definitions Next navigation step Field Symbols End of the navigation path 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.

  1. To do this, choose Start of the navigation path Currency/Quantity Fields End of the navigation path.

  2. 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)