04-22-2019 10:22 AM
Hi,
I want to get RFC stack in my RFC FM, to check from where it is being called. Is it possible? If yes, how?
Regards-
Chirag Keswani
04-22-2019 10:30 AM
04-22-2019 10:49 AM
Hi Matthew, thanks for a quick response. But the FM you mentioned just provides the system info, whereas I want the whole RFC object stack.
04-22-2019 9:13 PM
So write an RFC enabled FM that returns the stack, and call that.
Why do you want the stack anyway? What conceivable use will it be?
04-22-2019 1:51 PM
Hi Chirag,
Not sure if this would solve your requirement, but you can call the function module 'SYSTEM_CALLSTACK' to get that information.
data lt_call_stack type abap_callstack.
data lt_sys_callst type sys_callst.
call function 'SYSTEM_CALLSTACK'
exporting
max_level = 100
importing
callstack = lt_call_stack
et_callstack = lt_sys_callst.
if sy-subrc = 0.
"Do somehting
endif.
Cheers,
Rafael
04-22-2019 2:56 PM
Hi Rafael, thanks for your suggestions. I tried that, but it only gives the current system stack. It doesn't provide info of the RFC stack.
04-22-2019 3:11 PM
04-22-2019 4:08 PM
Normally, we have an ABAP stack for any program. If we have a RFC FM called in that program, I want the Stack details of the caller program, in the remotely called FM.