This section describes the creation of data objects and objects in the ABAP Objects language. Creating
an object or data object is equivalent to the dynamic creation of an instance of a data type or a class.
While instances of classes can only be created as described in this section, instances of data types
(data objects) that are declared with the statement
or related statements, such as
CONSTANTS, are created automatically as named data objects when their
context is loaded into the
internal session. Dynamic creation of data objects is only necessary if the data type is only recognized
for the first time during program execution, or if you want large amounts of memory to be consumed only for short periods of time.
Dynamically created objects can only be addressed using reference variables, and can be deleted from the internal session by the Garbage Collector if they are no longer referenced.
There are two statements for creating objects:
Data objects and objects are created by default in the internal session of the current program, and only programs of the same internal session can access them. You can also create shared objects in the shared memory.
The use of the statement
ASSIGN LOCAL COPY to create objects is now obsolete.