The Form Interface

You define it with reference to the interfacei_oi_form.

Use

This interface is particularly appropriate for using form fields in documents. The data table is passed separately from the link server and table collection using the SAP Data Provider. The effect of this is that the data is transferred first, then placed into the document. User-defined fields are used in the office application.

This has the following advantages:

  1. The value replacement is fully controlled by the SAP system.

  2. Values can be saved directly in the document. You can therefore edit the document even without a connection to the SAP system.

  3. This is a very flexible solution as no Office-own functions are used, but instead the data fields that are to be changed are edited directly.

However, the inter-process communication does mean that the replacement is slower than if you were to use the built-in mail merge functions in the desktop office application. However, since the main reason for introducing the function was that the data must be modifiable within the document, solutions like mail merge are not suitable.

Structure

Data is exchanged between the SAP system and the office application using a table with the data type soi_form_list. This table covers the following functions:

  • Setting the fields in the document with up to date entries.

  • Getting the fields from the fields in the document.

  • Setting new values for certain entries (delta management).

The table contains the following fields:

Field Name

Description

Possible values

type

Type of field in document

C:

Checkbox

T:

Text Field

L:

List box

P:

Property: Field should only be displayed.

name

Name of field in document. The data transfer always takes place using fields with the same name.

number

This field is only relevant for list boxes. If a list box contains more than one identical entry, this field distinguishes them.

value

This field contains the current value of the field. For checkboxes, the Boolean representation is simulated using 0 and 1.

code

You can use this field to control entries in the document directly. This only plays a part when data is transferred from the SAP system to the office application. In the opposite direction, all entries are set to 0.

0:

No effect

1:

Only for list boxes: The entry is selected.

2:

Only for list boxes: All entries in the list box are deleted.

3:

All types: The field contents cannot be changed.

Integration

Before creating thei_oi_form instance, you must create the instance for managing the document.

The interface currently supports Microsoft Word and Excel, and Lotus Word Pro.