‎2018 Oct 02 12:10 PM
Hi,
I have a scenario where i need to access the objects created in parallel sessions ( parallel processing implemented) in the main program.
since RFC FM does not allow Object references as export parameters, i am looking for another approach to access these objects created in parallel sessions .
Please suggest me ideas on how to implement this functionality .
Thanks in advance.
Cheers,
Ravi.
‎2018 Oct 02 2:32 PM
Hello Ravi,
You can't access objects created in parallel sessions. But you can use serialization to create a replica instance on main session, passing its serialized data in RFC parameter.
Please refer to interface IF_SERIALIZABLE_OBJECT and it's class documentation about how to serialize, implemeting it on your class (tl;dr: CALL TRANSFORMATION).
‎2018 Oct 02 2:32 PM
Hello Ravi,
You can't access objects created in parallel sessions. But you can use serialization to create a replica instance on main session, passing its serialized data in RFC parameter.
Please refer to interface IF_SERIALIZABLE_OBJECT and it's class documentation about how to serialize, implemeting it on your class (tl;dr: CALL TRANSFORMATION).
‎2018 Oct 08 5:13 PM
Hi Batista,
Thank you very much for your response.
I have worked on the idea that you have suggested and the issue is resolved.
i am amazed by the way that references an be accessed by call transformation logic, which put me in a universe of queries.:-)
how did it work? Are the references stored in the shared memory ?
it would be really great if you can share your knowledge on how it works. Also , a link to a documentation also helps ( referred to sap docu. it gave info only on the implementation) .
Thanks in advance.
Cheers,
Ravi.
‎2018 Oct 13 4:31 PM
The call transformation simply "extracts" the object's attributes contents and put them in a xstring/string variable (the RESULT call's parameter). When you do the reverse transformation call, it reads this variable and restores the object state (attributes values) in a new instance. It isn't stored in shared memory, you are actually creating a new instance with same attributes contents. You can think the xstring/string variable as a file and the CALL TRANSFORMATION is doing a save/load operation.
I forgot to point some behaviors that it can lead:
Unfortunately I can't point to a documentation better than this about serialization, yet it is too technical and less conceptual about how it works. Wikipedia's article give a brief explanation about it.