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: 

Calling method

Former Member
0 Kudos

Hello,

Quick question: When I am in a method that has been called by another method, how can I find the name of the first method that called to second one ?

Best regards,

Hugo

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Use the fm SYSTEM_CALLSTACK to get the names. I'm not sure if you will get all the method names or just the current one.

You can also store the first method name to compare the value in the second one.

For your reference:

Regards,

Felipe

5 REPLIES 5

naveen_inuganti2
Active Contributor
0 Kudos

Put a break point at last level. and in the debugging screen check ABAP stack to know the call sequence..

Thanks,

Naveen.I

0 Kudos

Thank you Naveen

In fact, I would like to know how to find the calling method in a runtime environment, not in debug mode.

My program needs to execute some actions depending on the method initiated the call.

Regards,

Hugo

Former Member
0 Kudos

Use the fm SYSTEM_CALLSTACK to get the names. I'm not sure if you will get all the method names or just the current one.

You can also store the first method name to compare the value in the second one.

For your reference:

Regards,

Felipe

Former Member
0 Kudos

hi,

try to use SUPER keyword.

kesavadas_thekkillath
Active Contributor
0 Kudos

fm SYSTEM_CALLSTACK might help you.