When you need to include simply fields
TYPES:
  BEGIN OF ty_cua_update,
    uname  TYPE xubname,
    modify_type TYPE c LENGTH 1,
    update_op    TYPE c LENGTH 1,
    modify_failed TYPE boole_d,
    modify_messages TYPE bapirettab,
    distribution_failed TYPE boole_d,
    distribution_messages TYPE bapirettab,
END OF ty_cua_update.
When you need to include complete structures together with other fields
TYPES:
  BEGIN OF ty_cua_update,
    uname  TYPE xubname,
    modify_type TYPE c LENGTH 1,
    update_op    TYPE c LENGTH 1,
    modify_failed TYPE boole_d,
    modify_messages TYPE bapirettab,
    distribution_failed TYPE boole_d,
    distribution_messages TYPE bapirettab.
        INCLUDE TYPE bapilogond.
TYPES : END OF ty_cua_update.

TYPES: is a chain statement.

You can save to code the TYPES statement at the beginning of each line (without colon) then terminating each line with a dot. You can use chaining instead, which is possible for all ABAP statements. Simply add colon : , and separate the rest with ,

INCLUDE TYPES is a separate statement, so not addition to the TYPES statement. The TYPES chain statement is completed before the INCLUDE statement with a period sign (.) and a new TYPES chain statement begins after INCLUDE again.

When you need to include complete structures together with other fields in the middle
TYPES:
  BEGIN OF ty_cua_update,
    uname  TYPE xubname,
    modify_type TYPE c LENGTH 1,
    update_op    TYPE c LENGTH 1,
    modify_failed TYPE boole_d,
    modify_messages TYPE bapirettab,
    distribution_failed TYPE boole_d,
    distribution_messages TYPE bapirettab.
        INCLUDE TYPE bapilogond.
TYPES: psw  TYPE bapipwd.
TYPES : END OF ty_cua_update.

Share this content: