INCLUDE
Types and Objects - Overview
In ABAP, we distinguish between types and objects. Types are purely
descriptions, to which no memory is attached apart from administration
information. Objects are instances of types and take up memory space. A
type characterizes the technical properties of all objects of the
relevant type.
The ABAP types form the ABAP type hierarchy, which is illustrated below:
The left side of the graphic shows the hierarchy of all types and
instances: it shows which types are possible in ABAP, and the objects
that can be generated from these types. The right-hand side lists the
generic data types , which are
assigned to individual nodes of the type hierarchy.
In principle, we distinguish between data types and object types.
Data types are used to describe
data objects . They are further subdivided
into elementary, reference, and complex types. There are
predefined (built-in) data
types, or they can be defined locally in the program and system-wide in
the ABAP Dictionary. Data objects as instances of data types are fields
in their own right. They contain local program data that a program uses
at runtime.
Object types are used to describe objects
in ABAP Objects . They are divided
into classes and interfaces. Object types contain the above data types,
but they also contain functions. Object types are not predefined,
instead they must be defined in the program or in the class library.
Classes provide a complete description of an object. They define which
data types and which functions an object contains. Interfaces describe
one aspect of an object. The data types and functions of an interface
can be implemented by more than one class. Objects as instances of
classes are actual software objects in
ABAP Objects . They support object-oriented programming by
containing methods and events in addition to data.
The following sections summarize some important facts on data types and
data objects. For more information on object types and objects, see
ABAP Objects .
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved