2016 Jan 06 1:07 PM
Greetings!
I need to fetch the latest attachment linked to a notification number from one SAP system into another. The FM 'ARCHIVOBJECT_GET_URI' helps me with the URI of the document, but the problem is that this is Normal FM, and not Remote FM. Can anyone please help me with anyother FM for this purpose?
Please let me know if you need further inputs or if I was unclear anywhere.
Thanks!
2016 Jan 06 1:46 PM
If you need an RFC function module and there is only a non RFC version of it then I usually copy the non RFC function module to a z version, make this one RFC enabled. Delete the sourcecode and then call the original Function module within this new Z function module. Maybe you need to change some datatypes if they are not allowed for RFC (in your case location need to be changed to char1.)
2016 Jan 06 1:46 PM
If you need an RFC function module and there is only a non RFC version of it then I usually copy the non RFC function module to a z version, make this one RFC enabled. Delete the sourcecode and then call the original Function module within this new Z function module. Maybe you need to change some datatypes if they are not allowed for RFC (in your case location need to be changed to char1.)
2016 Jan 07 5:58 AM
Hi Peter,
Thanks for your reply! But the problem is even if I make the original FM RFC by calling it in a Z FM, the original FM calls other FMs, which in turn, further calls other FMs, and in the process, some of them are Normal, and some are RFC. So do I need to do the same for other Normal FMs too? i
2016 Jan 07 6:19 AM
Hi Aman,
You do not need to worry about what other functionalities the FM is calling. Just this wrapper FM to make the function RFC enabled is enough.
You might want to add a return table (type bapiret2) to handle your exceptions since this FM will be called from another system.
2016 Jan 07 7:49 AM
Yes Peter, I have implemented as you suggested, but still not returning values, I debugged step by step in both systems parallel and found that the difference starts from FM 'ARCHIV_GET_CONNECTIONS_INT', because in one system, this FM returns 2 rows in Connections tables, and it is returning 0 rows in my Z FM. I suspect this could also be due to connections not established between two systems. I do not know how to check if two systems are connected. Please guide me if you have any idea about this.
2016 Jan 07 8:33 AM
Hi Aman,
I am sorry, but I am not familiar with this function module. I was trying to point out to you a general approach which you can use to make a non RFC function module RFC enabled by using a wrapper function which is RFC enbaled.
2016 Jan 11 10:56 AM
Hi Peter,
Issue resolved. The mistake I was doing was I did not make the same RFC enabled Z FM in the system2. I made the same FM in system2 also and now its working as expected.
Thanks!
Closing the thread.
Cheers,
Aman
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |