Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Declarations →  Declaration Statements →  Data Types and Data Objects →  Declaring Data Objects →  DATA →  DATA - BEGIN OF struc 

Declaration of a Simple Structure

This example demonstrates the declaration of a simple structure.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA:
      BEGIN OF address,
        name   TYPE string VALUE `Mr. Duncan Pea`,
        street TYPE string VALUE `Vegetable Lane 11`,
        city   TYPE string VALUE `349875 Botanica`,
      END OF address.
    cl_demo_output=>display( address ).

Description

Declaration of a simple local structure address with three elementary components to which start values are assigned. When the method DISPLAY of class CL_DEMO_OUTPUT is called, the whole structure is addressed.