ABAP Keyword Documentation →  ABAP − Reference →  Creating Objects and Values →  CREATE OBJECT → 

CREATE OBJECT - AREA HANDLE

Short Reference

Syntax

CREATE OBJECT oref AREA HANDLE handle ... .

Effect

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 CLASS statement.

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 refer to an area handle and the area handle must be associated to an area instance version with a change lock. To create such a reference, you can do either of the following:

The latter is a reference to an area handle for the current internal mode and the statement CREATE OBJECT acts as if without the addition AREA HANDLE.

Notes

Example

See Creating an Instance of a Class as a Shared Object

Exceptions

Catchable Exceptions

CX_SHM_WRONG_HANDLE

CX_SHM_ALREADY_DETACHED

CX_SHM_OUT_OF_MEMORY

CX_SHM_OBJECT_NOT_SERIALIZABLE




Continue
Creating a Class Instance as a Shared Object