Show TOC

 StructuresLocate this document in the navigation structure

Use

You use a structure (structured type) to comprise components (fields). Types are defined for the components. A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can be nested to any depth.

Features

Structures are used to define the data at the interface of module pools and screens and to define the parameter types of function modules.

The central definition of structures that are used more than once makes it possible for them to be changed centrally. The active ABAP Dictionary then makes this change wherever required. The system automatically adjusts ABAP programs or screen templates that use a structure when the structure is changed (see Runtime Objects ). This ensures the greatest possible consistency of the data definition, also for complex programs.

There are three types of structures:

  • Flat structures:

    A flat structure only references elementary types.

  • Nested structures:

    A nested structure references at least one further structure, but not a table type.

  • Deep structures:

    A deep structure references at least one table type.

You can distinguish the three types of structures in the following figure.

Caution

In a database table, you can only include flat structures as substructures .

Example

The data for managing the addresses of persons can be represented as a nested structure PERSON. The structure comprises the components (structures) NAME and ADDRESS. The structure NAME comprises the components (data elements) FIRSTNAME and LASTNAME. The structure ADDRESS comprises the components (structures) STREET and TOWN. The structure STREET comprises the components (data elements) STREETNAME and HOUSENO. The structure TOWN comprises the components (data elements) ZIP and TOWNNAME. You can see this nested structure in the following figure.

See also:

Creating Structures