Data Objects

Data objects are instances of data types, that is the specific data that a program handles at runtime. Each data object has a specific data type and appropriate memory assigned to it.

Data objects are instances of the data types subtree in the ABAP type hierarchy:


Data objects ---- elementary ----  static    ---- C
              |               |               |-- N
              |               |               |-- D
              |               |               |-- T
              |               |               |
              |               |               |-- X
              |               |               |
              |               |               |-- P
              |               |               |-- I
              |               |               |-- F
              |               |
              |               |-- dynamic   ----  STRING
              |                               |-- XSTRING
              |-- reference variables
              |
              |-- complex    ---- structures
                              |-- internal tables

Data objects are defined statically with a data defining statement or dynamically using an operational statement. The prototype data defining statement is DATA. In addition, several other statements are available to define data objects with additional specific properties.

In addition to the data objects declared in the program, several data objects are introduced automatically, for example, the system fields SY-... or the constant SPACE. SUM(f) and CNT(f) within control level processing for extracts are also implicitly defined data objects.

The technical properties of data objects - that is, the field length, number of decimal places, and the data type - are always defined uniquely at runtime. There are two main types of data objects: Static data objects , where all technical properties must be defined in the declaration; and dynamic data objects, where the memory requirements and size are determined at runtime.

Dynamic data objects are the elementary data objects of types STRING and XSTRING and internal tables.

All other data objects are static.

For further information refer to Data Objects in the SAP Library.

Other Texts about Data Objects:

Visibility of Data Objects

Changeability of Data Objects

Named and Unnamed Data Objects

Structure of Data Objects

Static and Dynamic Data Objects

Link of Data Objects to Formal Parameters and Field Symbols

Validity Range of Data Objects in Events

Alignment of Data Objects

Literals