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: 

How to get RFC Stack

0 Kudos

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

7 REPLIES 7

matt
Active Contributor

Call FM RFC_SYSTEM_INFO from your FM, with destination 'BACK'.

0 Kudos

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.

matt
Active Contributor

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?

former_member562009
Participant
0 Kudos

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

0 Kudos

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.

Sandra_Rossi
Active Contributor
0 Kudos

What is a "RFC stack"?

0 Kudos

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.