Data objects are instances of data types and contain the concrete data that a program uses at runtime. This is done by specifying data objects in operand positions.
We differentiate between:
In addition to data objects declared in programs, there is a set of built-in data objects, which can always be accessed in ABAP programs. In addition, some statements implicitly generate data objects, which are then available for special purposes. Examples include SUM(f), CNT(f) in control level processing for extracts and title when selection screens are created.
Every data object has a certain data type, and every data object uses memory to store the data. The data type of a data object is defined either with reference to a stand-alone data type or, when the data object is created, as a bound data type.
The data type of a data object is always uniquely defined at the runtime of the program and cannot be changed. In the case of anonymous data objects, this data type determines the dynamic type of the related reference variables.
When it comes to changing data object values, we differentiate between variable and constant data objects. Variables can change their value at runtime. Constants always keep their initial value. Literals and text symbols are also constant. Input parameters in procedures are generally not changeable either, if this would cause the assigned actual parameter to be changed.
We differentiate between static data objects, for which all technical attributes need to be defined on declaration, and dynamic data objects, whose memory requirement or size is not defined until runtime. Strings and internal tables are dynamic data objects.
After declaration, the length of a string is equal to 0 and changes at runtime depending on the content assigned to it. After declaration, internal tables do not contain any rows. Any number of rows is possible, and the rows are defined dynamically at runtime when the internal table is filled.
Structures that contain dynamic components are also dynamic data objects.
All static data objects except reference variables are flat. Their content corresponds to the actual work data. Dynamic data objects and reference variables are deep. They contain references to the actual content. The treatment of references is implicit for dynamic data objects (strings and internal tables), and explicit for reference variables.
Structures that do not contain any deep components are flat structures. Structures that contain at least one deep component are deep structures.