Generate Update and INCLUDE Objects

The generation creates INCLUDE objects, which contain general and specific data definitions and the program logic for the update function module. Proceed as follows:

  1. Call the change document maintenance transaction (Tools ® ABAP/4 Workbench ® Development ® Other tools ® Change documents).
  2. Position the cursor on a change document object and choose the menu option Generate update pgm. A dialog box, in which you must make the following entries, is displayed:

    maximum 26 character INCLUDE name

    This 26-character name (<K4>) is used to complete the name of the generated INCLUDE program parts.

    Function group

    Enter the name of the function group to which the change document update program is to belong. If this function group does not yet exist in the system, it is automatically created during generation. Exactly one function group must belong to each change document object. Other function modules may not be assigned to this function group.

    FM structure prefix (12-char.)

    Multiple-case table transfer structures are created at generation. Their names are constructed from this prefix and the name of the multiple case tables. A value is proposed.

    An update-compatible function parameter must not be longer than 28 characters, so the prefix and the longest table name must not be longer than 28 characters together.

    Error message ID

    The application-specific error messages generated are stored under this message ID (work area). A value is proposed.

    Error number

    Number with which errors occurring in connection with this change document object can be identified in the system. A value is proposed.

    Processing type

    Update type flag:

    – immediate

    – delayed

    – in dialog

    Special text handling flag

    Select this field to log long text changes.

    The old and new status of long texts is not logged. Only the fact that they have been changed is noted.

  3. Choose Generate.

The following INCLUDE objects are generated:

    • <Change document object>_WRITE_DOCUMENT

The object-specific update function module calls the following function modules with object-specific parameters:

CHANGEDOCUMENT_OPEN

CHANGEDOCUMENT_SINGLE_CASE and/or

CHANGEDOCUMENT_MULTIPLE_CASE and possibly

CHANGEDOCUMENT_TEXT_CASE

CHANGEDOCUMENT_CLOSE

    • F<K4>CDC

INCLUDE program part with FORM statement for calling the object-specific update program.

    • F<K4>CDT

INCLUDE program part containing two INCLUDE program parts (F<K4>CDF and F<K4>CDV, see below), which contain the data definitions which are to be passed to the update program. The data definitions correspond to the function group SCD0 function modules interface definition. The fields, record fields and tables are to be filled in in the application program and passed to the update program.

    • F<K4>CDF

INCLUDE program part with data definitions which are the same for all change document objects.

    • F<K4>CDV

INCLUDE program part with data definitions, which are specific to the change document object.

    • V<Dictionary structure name > (only for multiple case tables)

This structure comprises the following INCLUDE structures:

INCLUDE

<table name>

INCLUDE

KZ

INCLUDE

<ref. table name>

The generated program parts contain the object-specific program code, and are included in the application program per INCLUDE statement. The data definitions of the change document-relevant fields correspond to the function group SCD0 function module interface definitions.

If several change document objects are to be processed in one application program, the update program must be generated for each change document object with a different <K4> code (e.g. XX01, XX02, XX03 etc.).