03-15-2012 12:32 PM
Hello,
I'm writing a RFC (remote enabled) function module which will be called by different other SAP systems.
Within this called function module, I like to get the caller's system ID.
Is there any way to get this information, maybe a function module/table I can use for this purpose?
Thanks,
Stephan.
03-15-2012 1:40 PM
I suppose the easiest way would be just have SY-SYSID passed by the caller as an input parameter into your function module. I don't know of another way, and if there is one, it is probably much more complex.
Thomas
03-26-2012 12:29 PM
Hello,
thanks for your response. Yes, I suppose as well that this is the most easiest way. But this has impact on all existing RFC partners and just those which I don't know. In other words: I need to investigate which caller is really connecting to my RFC enabled FM.
Yours
Stephan.
04-01-2012 11:56 AM
Hi Stephan, you could call RFC destination BACK from within your RFC function module. Destination BACK calls the calling RFC system. When you call function module 'RFC_SYSTEM_INFO' the sytem ID will be returned in function module parameter RFCSI_EXPORT-RFCSYSID.
Here is an example:
DATA rfcsi TYPE rfcsi.
CALL FUNCTION 'RFC_SYSTEM_INFO' DESTINATION 'BACK'
IMPORTING
rfcsi_export = rfcsi.
Best regards Jack
09-12-2014 9:23 AM
Hi Jack,
Thanks. Your advice helped in my project too.
Best Regards
Aditya