SAP SHM CL ABAP MEMORY AREA



Get Example source ABAP code based on a different SAP table
  


• CL_ABAP_MEMORY_AREA ABAP_CLASS

ABAP_SHM - CL_ABAP_MEMORY_AREA
The class CL_ABAP_MEMORY_AREA is the shared superclass of all area classes. It contains general methods for area handles.
ITOC

Static Methods

GET_HANDLE_BY_OREF
Gets the area handle for an instance of a class. The instance can be in the shared memory or in the ABAP_ISESS .

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
Gets the area handle for a data object. The data object can be in the shared memory or in the ABAP_ISESS .

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. Its typing essentially means that this reference is only suitable for creating objects.

GET_HANDLE_BY_DATA
Gets the area handle for a data object. The data object can be in the shared memory or in the ABAP_ISESS .

Input Parameter
DATAOBJECT of type any Data object in the shared memory. This can, for example, be specified as a field symbol that points 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. Its typing essentially means that this reference is only suitable for creating objects.

Instance Methods

IS_SHARED
Checks whether the area handle represents an area instance version in the shared memory or the current ABAP_ISESS .

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 ABAP_ISESS is represented.

IS_VALID
Checks whether the area handle can be used to access an area instance version in the shared memory or the current ABAP_ISESS .

Return Value
VALID of type abap_bool abap_true if the area handle can be used to access an area instance version or the current ABAP_ISESS , otherwise ABAP_FALSE .

IS_ACTIVE_VERSION
Checks whether the area handle points to the active area instance version.

Return Value
ACTIVE_VERSION of type abap_bool abap_true if the current area instance version or the ABAP_ISESS 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
Checks whether the current dynamic properties of the area match the properties of the area instance version that is represented:

Return Value
ACTIVE_PROPERTIES of type abap_bool abap_true if the dynamic attributes of the area have not been changed since the start of construction of the current area instance version or if the current ABAP_ISESS is represented. Otherwise, or if the area handle was already released, ABAP_FALSE.

GET_DETACH_INFO
Determines the reason for an invalid area handle.

Return Value
DETACH_INFO of type SHM_DETACH_INFO The return value can be compared to one of the following constants of the class CL_ABAP_MEMORY_AREA.
DETACH_INFO_NOT_DETACHED
The area handle is still valid. This value is also returned if a commit fails but no rollback has been performed yet. This value is also returned if the current ABAP_ISESS is represented.
DETACH_INFO_HANDLE
The read lock or change lock was released explicitly using one of the methods DETACH_COMMIT or DETACH_ROLLBACK.
DETACH_INFO_AREA
The read lock or change lock was released using one of the methods DETACH_AREA or DETACH_ALL_AREAS.
DETACH_INFO_ATTACH
The read lock was released using the method ATTACH_FOR_WRITE and the constant CL_SHM_AREA=>ATTACH_MODE_DETACH_READER was passed to the parameter ATTACH_MODE.
DETACH_INFO_INVALIDATE
The change lock was released using an INVALIDATE_... method and the constant abap_true was passed to the parameter TERMINATE_CHANGER.
DETACH_INFO_PROPAGATE
The change lock was released using a PROPAGATE_... method.
DETACH_INFO_FREE
The read lock or change lock was released using a FREE_... method.