Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Shared Objects - External Reference

Former Member
0 Likes
674

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

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
530

I do believe that this may be a current limitiation with the Shared Memory Objects.

Regards,

RIch Heilman

Read only

0 Likes
530

Thanks Rich.

Its a big limitation. Creating separate Shared Area for each Shared Root clearly makes the Shared Memory non robust at this time.

Read only

0 Likes
530

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