‎2007 Feb 27 10:07 PM
Hi,
I am using ABAP SHared Objects (SHMA and SHMM) as data persistence between 2 BSP Applications
I want to create a generic Root class with one attribute that is TYPE REF TO OBJECT. The idea is to store any class instance in this attribute of the Root class so as to AVOID creating a seperate Shared AREA for each Class...
WHen I try to put this generic Root Class in the shared area via detach_commit(), it gives a exception that there are External references in the Shared area which should be closed first
Does this mean u cannot have a instance variable as an attribute in your ROOT Class.
Thanks
SAP User
‎2007 Feb 27 10:36 PM
‎2007 Feb 27 11:15 PM
Thanks Rich.
Its a big limitation. Creating separate Shared Area for each Shared Root clearly makes the Shared Memory non robust at this time.
‎2007 Feb 27 11:44 PM
In the documentation, it suggests that the SMO is to replace the functionality of using the EXPORT/IMPORT with the SHARED BUFFER addition. In my eyes, this may be a bit of a stretch. Why? Because, for me, I use the EXPORT/IMPORT only to move data which is not persistant thru different work processes, such as moving data from a dialog WP to a update WP or even a background WP.
I've been studying the SMO for a while, and I can see the power of it, but not so much as to move non-persistant data between processes. Really, I believe that the SMO is much better suited in providing data in memory for quicker access. So really, it replaces the "Buffering" mechiusm which you define on the database table. You would have a SETTER and GETTER method in your root class which the SETTER would populate an internal table with data. This internal table would be stored in the shared memory area and you could retrieve this data using the GETTER(of course using the area handles). This will provide faster access to the data. But it is important that this data is practically static, or does not change often.
Regards,
Rich Heilman