Start of Content Area

Function documentation CL_ABAP_MEMORY_AREA  Locate the document in its SAP Library structure

Common superclass of all area classes. This class contains general methods for area handles.

 

Static Methods

 

GET_HANDLE_BY_OREF

This method returns the area handle for an instance of a class. The instance can be in the shared memory or within the internal session.

Input Parameter

·        OREF of type REF TO OBJECT

Reference to the instance of a class.

Return Value

·        HANDLE of type REF TO CL_ABAP_MEMORY_AREA

Reference to the area handle of the corresponding area instance version. Typing means that essentially this reference is only suitable for creating objects.

 

GET_HANDLE_BY_DREF

This method returns the area handle for a data object (from Release 7.10). The data object can be in the shared memory or within the internal session.

Input Parameter

·        DREF of type REF TO DATA

Reference to a data object in the shared memory.

Return Value

·        HANDLE of type REF TO CL_ABAP_MEMORY_AREA

Reference to the area handle of the corresponding area instance version. Typing means that essentially this reference is only suitable for creating objects.

 

GET_HANDLE_BY_DATA

This method returns the area handle for a data object (from Release 7.10). The data object can be in the shared memory or within the internal session.

Input Parameter

·        DATAOBJECT of type ANY

Data object in the shared memory. This can be specified as a field symbol, for example, which refers to a dereferenced data object in the shared memory.

Return Value

·        HANDLE of type REF TO CL_ABAP_MEMORY_AREA

Reference to the area handle of the corresponding area instance version. Typing means that essentially this reference is only suitable for creating objects.

 

Instance Methods

 

IS_SHARED

This method checks whether the area handle represents an area instance version in the shared memory, or whether it represents the current internal session.

Return Value

·        SHARED of type ABAP_BOOL

ABAP_TRUE if an area instance version is represented in the shared objects memory, and ABAP_FALSE if the current internal session is represented.

 

IS_VALID

This method checks whether the area handle can be used to access an area instance version in the shared memory, or whether the current internal session is accessed.

Return Value

·        VALID of type ABAP_BOOL

ABAP_TRUE if the area handle is used to access an area instance version or the current internal session; otherwise ABAP_FALSE.

 

IS_ACTIVE_VERSION

This method checks whether the area handle refers to the active area instance version.

Return Value

·        ACTIVE_VERSION of type ABAP_BOOL

ABAP_TRUE if the current area instance version or the internal session is represented. ABAP_FALSE if an obsolete area instance version is represented, the area handle was already released, or if it is a change handle.

 

HAS_ACTIVE_PROPERTIES

This method checks whether the area’s current dynamic properties match the properties of the area instance version that is represented:

Return Value

·        ACTIVE_PROPERTIES of type ABAP_BOOL

ABAP_TRUE if the area’s dynamic properties have not been changed since the current area instance version was built, or if the current internal session is represented. Otherwise, or if the area handle was already released, ABAP_FALSE.

 

GET_DETACH_INFO

This method determines the reason for an invalid area handle (from Release 7.10).

Return Value

·        DETACH_INFO of type SHM_DETACH_INFO

The return value can be compared with one of the following constants of class CL_ABAP_MEMORY_AREA.

DETACH_INFO_NOT_DETACHED

The area handle is still valid. This value is also returned if a commit failed on the area handle but there was no rollback. This value is also returned if the current internal session is represented.

DETACH_INFO_HANDLE

The read or change lock was explicitly released with one of the DETACH, DETACH_COMMIT or DETACH_ROLLBACK methods

DETACH_INFO_AREA

The read or change lock was released by one of the DETACH_AREA or DETACH_ALL_AREAS methods.

DETACH_INFO_ATTACH

The read lock was released by the ATTACH_FOR_WRITE method, and the constant CL_SHM_AREA=>ATTACH_MODE_DETACH_READER was passed to the ATTACH_MODE parameter.

DETACH_INFO_INVALIDATE

The change lock was released by an INVALIDATE_... method, and the ABAP_TRUE constant was passed to the TERMINATE_CHANGER parameter.

DETACH_INFO_PROPAGATE

The change lock was released by a PROPAGATE_... method.

DETACH_INFO_FREE

The read or change lock was released by a FREE_... method.

 

 

 

 

 

 

 

End of Content Area