Skip to Content
-1

How do I get the ABAP Stack of another program?

Jan 30 at 10:23 AM

171

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded

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

1
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.

Thanks

Purna

0
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Mike Pokraka Jan 30 at 09:42 PM
2

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.

Share
10 |10000 characters needed characters left characters exceeded
M. Hesen Jan 30 at 07:33 PM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0
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.

Thanks

Purna

0
Vinita Kasliwal Jan 30 at 08:12 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded