SAP CREATE SHARED OBJECT ABEXA



Get Example source ABAP code based on a different SAP table
  



Creating an Instance of a Class as a Shared Object
This example demonstrates how an object is created in an area instance version.

ABAP_SOURCE_CODE
DEMO CL_DEMO_CREATE_SHARED_OBJECT

ABAP_DESCRIPTION
If the addition AREA HANDLE is used, an instance of the local class class is created as a shared object in an area instance version of the area CL_DEMO_AREA. The generically typed attribute oref of the area root class CL_DEMO_ROOT is used as a reference variable. The attribute attr of the object is given a value by calling its method set_attr.
After write access has been completed using the method DETACH_COMMIT , a read is performed to demonstrate how the objects in the shared memory are accessed. Such an access can also be made in another program, as long as the area instance version exists in the shared memory.