CREATE OBJECT - AREA HANDLE
CREATE OBJECT oref AREA HANDLE handle ...
This statement creates an object as a shared object in the
area instance version of the
shared memory, which is bound to the
area handle referenced by
handle. The implicitly or explicitly specified class must be defined as a
shared memory enabled class
using the SHARED
MEMORY ENABLED addition of the
handle expects an object reference variable whose static type is CL_ABAP_MEMORY_AREA or one of its subclasses
(area class). When the statement is executed,
handle must point to an
area handle and the area
handle must be associated with an area instance version with a change lock. A reference like this can be created in one of the following ways:
- Inherit the return value of the methods ATTACH_FOR_WRITE or ATTACH_FOR_UPDATE of an area class created using transaction SHMA.
- Inherit the return value of the GET_HANDLE_BY_... method of any area class.
Inherit the return value of the method GET_IMODE_HANDLE of the predefined class CL_IMODE_AREA.
The latter is a reference to an area handle for the current
internal session and
CREATE OBJECT operates as if the addition
AREA HANDLE is not specified.
- The only shared object that can be addressed directly from an ABAP program after a connection to an area instance version is the instance of the area root class. All other objects have to be referenced in this instance.
The static attributes of a shared object are not created in the shared memory. Instead, they are created
when the shared memory-enabled class is loaded in the internal session of a program, like for every class. They can thus occur more than once and independently of one another in different programs.
Cause: The area handle does not hold any change locks.
Cause: The area handle is not bound to an area instance version.
Cause: There is not enough memory.
Cause: An attempt was made to create an object that cannot be serialized in an area instance that can be displaced using backup and recovery.