Entering content frame

Procedure documentation Object Creation Locate the document in its SAP Library structure

To create an object in an area instance version of the shared memory, you use the

... AREA HANDLE handle

addition of the

CREATE OBJECT oref statement.

CREATE DATA dref (from Release 7.0)

handle must be an object reference variable that points to an area handle that is connected by a change lock to a building area instance version. The created object is stored in this area instance version and orefor dref refer to the object. When the instance of a class is created, it has to be shared memory-enabled.

Before building the area instance version is completed with the DETACH_COMMIT method, the SET_ROOT method of the area handle has to be used to define the root object. Once building the area instance version is completed with the DETACH_COMMIT method, no references from the area instance version may refer externally.

The following treatable exceptions may occur when objects are created:

·        CX_SHM_WRONG_HANDLE

The area handle does not hold any change locks

·        CX_SHM_ALREADY_DETACHED

The area handle is not bound to an area instance version

·        CX_SHM_OUT_OF_MEMORY

Not enough memory is available.

·        CX_SHM_OBJECT_NOT_SERIALIZABLE

An attempt was made to create an object that cannot be serialized in an area instance that can be displaced with backup and recovery.

The creation of anonymous objects can lead to exception CX_SHM_EXTERNAL_TYPE if a dynamically created data type was used.

 

 

 

Leaving content frame