‎2012 Dec 19 1:33 PM
Hi all,
We need to execute a BADI implementation only in case called from certain transaction codes or a remote enabled FM.
For transaction codes we have used the system variable sy-tcode check.
But need help on how to check for the remote enabled Z function module.
Regards
‎2012 Dec 19 1:44 PM
Hi Atrinandan,
i think, You can use function SYSTEM_CALLSTACK to check badi is called from RFC.
‎2012 Dec 19 1:44 PM
Hi Atrinandan,
i think, You can use function SYSTEM_CALLSTACK to check badi is called from RFC.
‎2012 Dec 19 2:00 PM
Hi Atrinandan,
I'm not sure if you're trying to detect a particular z-RFC or just whether or not the caller is an RFC.
Take a look at function RFC_WITHIN_SAME_SYSTEM to see if meets your needs. Exception NO_RFC_COMMUNICATION can be used to determine if you have an RFC caller, and parameter CALLER_IN_SAME_SYSTEM can be used to determine whether the caller is in the current system or another.
There is also function RFC_GET_ATTRIBUTES for more details about a caller.
Cheers,
Amy
‎2012 Dec 19 2:05 PM
Hi Atrinandan,
we can find from table TFDIR. pass the FM name, if FMODE = R then it is RFC else it will be blank.
Thanks