‎2011 Jan 05 5:58 PM
Hi ABAP Expert,
I have a problem when read the data for shared memory, it will getting error in catch cx_shm_no_active_version. This error only happen if my program call in different server. Anyone have any idea?
*Note: in our Dev box, we have setup 2 server.
Thanks and Best Regards
Wong Hock Lin
Edited by: Wong Hock Lin on Jan 5, 2011 6:59 PM
‎2011 Jan 06 4:14 AM
Hi,
Please check if the data is written already in shared memory.
In other server also the data needs to be written before reading.
Check where you are writing the data to shared memory.
Regards,
Srini.
‎2011 Jan 06 5:22 AM
Hi Srini,
I am first time use shared memory, some of the setting might put wrongly. Can you tell me how to make the data are writing in all the server?
Thanks
Wong Hock Lin
Edited by: Wong Hock Lin on Jan 6, 2011 6:22 AM
Edited by: Wong Hock Lin on Jan 6, 2011 6:23 AM
‎2011 Jan 06 5:34 AM
>
> This error only happen if my program call in different server. Anyone have any idea?
> *Note: in our Dev box, we have setup 2 server.
Hello Wong,
This is a FAQ. SHM is application server specific & it's obvious why you're getting the EXCEPTION when you're trying to access the SHM object from a different server
Thankfully you've a workaround. Instead of using SHM use data cluster tables (e.g., INDX) to store the data.
You've to use EXPORT TO DATABASE / IMPORT FROM DATABASE statements to write/read data from the data cluster.
Further details from the F1 help!
BR,
Suhas
‎2011 Jan 06 4:27 PM
‎2011 Jan 11 7:38 AM
If you use the automatic area creation option (checkbox in SHMA) you will avoid this. This basically means your memory object would end up being created on all the app servers where your application is invoked. Of course, this means duplication of the data, which is why memory objects are generally only useful for read-only data that remains stable - or at least "stable" within the application lifespan.
I believe shared memory objects are better than the old export/import to/from memory options, not least because of the flexibility they give you in storing a whole class - complete with attributes and methods, instead of just shuffling data.
Regards,
Trond