INCLUDE TYPE when defining new types with TYPES statement

Include fields defining a new structure
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.
Include complete structures at the end after 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.

Include complete structures in the middle between 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 psw  TYPE bapipwd.
TYPES END OF ty_cua_update.
Including two structures into a new one
    TYPES BEGIN OF ty_alv_all_fields.
            INCLUDE TYPE ZI_TransportRequestQueryALV.
            INCLUDE TYPE zds_bc_trstatus_ida.
    TYPES END OF ty_alv_all_fields.
SAPDEV.EU
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.