Skip to content

ABAP Keyword Documentation →  ABAP − Reference →  Processing Internal Data →  Structures →  Examples of structures 

Structure from ABAP Dictionary

This example demonstrates a structure from the ABAP Dictionary and its use.

Other versions: 7.31 | 7.40 | 7.54

Source Code

    DATA carrier TYPE scarr.
    carrier-carrid = 'UA'.
    cl_demo_input=>request( CHANGING field = carrier-carrid ).
    SELECT SINGLE *
           FROM scarr
           INTO carrier
           WHERE carrid = carrier-carrid.
    cl_demo_output=>display( carrier ).

Description

Structure types of the ABAP Dictionary are typically used in ABAP programs to define structures or internal tables with a structured row type to process data that is imported to them from the database. The example shows how a structure carrier local to the program is declared by reference to a database table SCARR defined in the ABAP Dictionary, and used as the target area of a SELECTstatement.