Skip to Content
avatar image
Former Member

How do I get the ABAP Stack of another program?

I want to get the complete ABAP stack of another program in my program.

For example, ZTEST1 is a program which is executing at the time.

I have a program ZTEST2 and I want to retrieve the ABAP stack information of ZTEST1 in ZTEST2.

Also, I do not wish to make any modifications in ZTEST1.

Is it possible to do this? If yes, any help would be appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Why do you want to do this? What are you trying to achieve?

  • Former Member Matthew Billingham

    Hi Matthew,

    Thanks for your time and helping me on this.There are hundreds of interfaces which are running currently in sap system ,These interfaces transfer the messages between systems (sap to non-sap ) based on some custom configuration.Unfortunately we don't having the track of these interfaces, running for which business process(business scenario).

    we have the one base FM which will be called before the actual interface executes. So trying to find out ,is there any way to collect the ABAP stack when ever this Particular FM active/running.if we are able to collect this stack info , then we will get to know what is the triggering point of business process.



  • Get RSS Feed

3 Answers

  • Jan 30, 2018 at 09:42 PM

    What about using a good old fashioned where-used list?

    Or get the FM to dump some data into a trace table by which you can trace back the business context.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30, 2018 at 07:33 PM

    Hi Purna,

    Check out the code of FM TH_DUMP_ABAP_STACK. It should be a relatively simple task to convert this for your own purposes.

    It will show you how to call C-function 'ABAP_CALLSTACK'. This provides the information you are looking for.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member M. Hesen

      Hi Hesen,

      Thank you for replying . yes , FM is giving the active call stack of current running program.

      My requirement is like

      I have one FM which which Triggers when ever message goes out/come in to SAP but problem is like we dont know what the exact scenarios which is executing(Triggering point ) this FM.

      So I am trying to find out, is there any way to backtrack the info (collecting abap stack ) from Current LUW to previous LUWs( if any) where the process started and already finished execution blocks info.



  • Jan 30, 2018 at 08:12 PM


    Can you not check the ABAP stack using SPAM or using debugger ?

    if you want in the ABAP program use FM SYSTEM_CALLSTACK

    Read the code snipper in the links below

    let me know if that helps



    Add comment
    10|10000 characters needed characters exceeded