01-30-2018 10:23 AM
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.
01-30-2018 11:19 AM
01-30-2018 3:32 PM
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.
Thanks
Purna
01-30-2018 7: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.
kr
mh
01-30-2018 7:46 PM
Hi Purna,
Just to make sure I understood right: you can only retrieve the active call stack of the active program that you include the above code into...
I do not think there is any way to retrieve the active call stack of ANOTHER program that is executing at the same time...
kr
mh
02-05-2018 9:11 AM
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.
Thanks
Purna
01-30-2018 8:12 PM
Hi
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
http://zevolving.com/2013/04/read-call-stack-to-check-on-called-program/
https://stackoverflow.com/questions/11499488/how-to-get-the-program-call-stack-trace-in-abap
let me know if that helps
Regards
vinita
01-30-2018 9: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.