Defining Form Interfaces

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 .

  5. Activate the interface.

Defining Import and Export Parameters of the Form Interface

  1. Choose Start of the navigation pathForm Interface Next navigation step ImportEnd of the navigation path.

  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 pathForm Interface Next navigation step ExportEnd of the navigation path.

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

Defining Your Own Form Fields (Global Definitions)

  • To insert additional fields in the form interface (for example Total fields), choose Start of the navigation pathGlobal Definitions Next navigation step Global DataEnd 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 pathGlobal Definitions Next navigation step TypesEnd 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 pathGlobal Definitions Next navigation step Field SymbolsEnd 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 pathCurrency/Quantity FieldsEnd 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)