ABAP Data Types and Data Objects

Programs work with local data in the program. Data is a sequence of bytes in the memory of the program. Each sequence of bytes that belongs together is called a field, and each field has a length, an identifier (name), and a data type. All programming languages have a concept that explains how the contents of a field (the sequence of bytes) is interpreted according to the particular data types in that language.

Within the ABAP type concept, fields are known as data objects. A data object is an instance of an abstract data type. Consequently, data types can occur not only as the attributes of a field, but also as a standalone type definition. Data types and data object have separate namespaces. This means that a data object and a data type can both have the same name, even though they are separate entities. The same visibility rules apply to both data types and data objects: Locally-defined types and objects obscure global types and objects with the same names.

The ABAP type concept ensures that the type information belonging to a data object is inseparably joined to it. The syntax check, program generator, and runtime environment always have full type information for every data object.

When you create data objcets and specify the types of formal parameters and field symbols, you can refer to a data type (either directly or indirectly):

If dataObject has the type dataType, the indirect reference using ... LIKE dataObject is exactly the same as the direct reference using ... TYPE dataType, that is, ... LIKE dataObject adopts all of the type information of dataObject.

At runtime, the inseperable link between data types and data objects means that all type-dependent operations can access full type information, even where programs use untyped parameters and field symbols.

For further information, refer to the SAP Library:

Data Types and Data Objects