ABAP - Keyword Documentation →  ABAP - Dictionary →  Classic Objects in ABAP Dictionary →  Data Types →  Structures → 

Include Structures

Components of a structure can be defined by including the components of other structures in ABAP Dictionary, including database tables or views. These included structures are known as include structures (or includes for short). From a technical perspective, the structure in which an include structure is included references the included structure and is modified accordingly whenever changes are made to this structure. An include structure can itself contain include structures, with the maximum nesting depth being nine includes.

When an include structure is included, all components of an existing structure are added to the including structure as a replacement for a component. No substructure is created, which means that the components are inserted as if they were specified individually at this position and they are handled like directly defined components. Regular components and include structures can be combined as required.

When a structure is included as an include structure, it can be assigned a name of a group and a three-character suffix.

Group names and suffixes are assigned in the same way as with the additions AS name [RENAMING WITH SUFFIX suffix] of the statement INCLUDE TYPE in ABAP programs. Unlike in the statement INCLUDE TYPE, an include structure in ABAP Dictionary can have a suffix without a specified name.

The fields of an included include structure are still part of the structure. They can only be edited using the structure and any changes made to the structure are applied to all including structures. The fields of an included include structure can also be transformed to direct fields of the including structure that are then no longer associated with the originally included structure.

Notes

Example

The structure DEMO_WEEK includes the structure DEMO_DAY five times as an include structure with group names and suffixes. The program DEMO_INCLUDE_STRUCTURE shows how its components can be accessed in ABAP.