Application Development 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: 

RFC pass object reference

Former Member
0 Kudos
1,104

Hi all,

we would like to pass a object reference to a RFC Function Modul, but as far as we can see it is not allowed.

Is there a workaround or solution for that problem out there ?

Many thanks in advance

Matthias Hlubek

4 REPLIES 4

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos
156

Even if you could pass the object reference, how would the remote system be able to access it. The object reference is really just a memory pointer to the object. The remote system would have not way to access it. There is not functionality to call an ABAP Object remotely. There has been some discussion in this form and in one of hte WebLogs on ABAP OO about the fact that this would be a nice feature.

Former Member
0 Kudos
156

As far as I know (and I'm working with RFC's very often) there is no way, because RFC protocol is prior to Abap Objects :-(.

If you want to pass some properties, extract them first in your abap code and then send them to RFC as variables.

regards,

David R.

former_member183804
Active Contributor
0 Kudos
156

By sorrow the RFC mechanism is yet not able to handle references. One my bybass this shortage with the help of the 'CALL TRANSFORMATION ID' Statement. This statements allows to serialize complete reference clusters into a single xString. This xString can be send via RFC. The recipient has then to rebuild the cluster from the serialized data. This of course requires that identical (class) definitions reside on both sender and target side.

Kind Regards

Klaus

PS: Class must also implement the interface IF_SERIALIZABLE_OBJECT, please check the online docu

0 Kudos
156

Thanks Klaus,

i will try this

regards

Matthias