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: 

Transfer a reference variable (ref to object) from one program to another

0 Kudos
567

I need to transfer a reference value (ref to object) from one program to another. The obvious way is to use MEMORY ID, but abap says i can't send a ref value. Should i pack it someway, or is there another way to transfer a ref value?

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
447

This is not obvious, this is old school 😉

Check for the Design Pattern: SingleTon

or have a look to SHMA (more complex solution)

2 REPLIES 2

FredericGirod
Active Contributor
448

This is not obvious, this is old school 😉

Check for the Design Pattern: SingleTon

or have a look to SHMA (more complex solution)

Sandra_Rossi
Active Contributor
447

If you mean how to pass between 2 programs called using SUBMIT, CALL TRANSACTION, RFC, etc., then it's possible only through serialization (if your class implements IF_SERIALIZABLE_OBJECT). Shared objects also, as mentioned by Frederic.