Ansicht
Dokumentation

ABENSHM_OBJECTS_REFERENCES - SHM OBJECTS REFERENCES

ABENSHM_OBJECTS_REFERENCES - SHM OBJECTS REFERENCES

ABAP Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

- References

Objects in area instance versions are instances of classes or anonymous data objects and therefore can only be addressed using heap references.

Access to Shared Objects

To use a reference of this type to perform reads or writes on objects in area instances of the shared memory from an internal session, a suitable area lock must be set by binding an area handle to an area instance version. The root object, that can refer to additional objects, is used for the initial access to the objects of an area instance version.

Only if an area handle exists in an internal session for an area instance version can objects of the area instance version be used in the internal session and references can be made from the area instance version to objects in the session. The references can be used as usual during the lifetime of an area lock, with the restriction that the type of lock determines whether or not the referenced objects of the area instance version can be changed. If a read or write is performed on the content of an object in the area instance version despite there being no associated lock, a runtime error occurs.

Note

The static methods GET_HANDLE_BY_OREF, GET_HANDLE_BY_DREF, and GET_HANDLE_BY_DATA can be used to get a reference to the area handle of an object. The corresponding return value is of general type CL_ABAP_MEMORY_AREA, which is why such a reference is generally only suitable for creating objects.

Completed Area Instance Versions

Area instances versions to which no area handles are bound are self-contained. If the lock is released using the method DETACH_COMMIT of the area handle after writes, no references from an area instance version are allowed to point outside. After the method DETACH_COMMIT, any external references that reference objects of the area instance version can no longer be used to access these objects. The shared objects within a completed area instance version can be linked using object references and data references.

A special restriction applies to data references in completed area instance versions: their dynamic type must be a known type when a program is loaded in an internal session. The data types that cannot be used to create anonymous data objects as shared objects are specified in the addition AREA HANDLE of the statement CREATE DATA.






General Material Data   BAL Application Log Documentation  
This documentation is copyright by SAP AG.

Length: 3597 Date: 20240424 Time: 105330     sap01-206 ( 62 ms )