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 detect caller of a function module

Former Member
0 Kudos

Hello,

how is it possible to detect who is calling a function module?

Thanks a lot,

Tanguy Mezzano

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

In case you mean the calling program, that is in SY-CPROG. Function SYSTEM_CALLSTACK gives you the complete call stack.

Thomas

4 REPLIES 4

Former Member
0 Kudos

Hi,

The system variable sy-uname will tell you.

Regards,

Darren

ThomasZloch
Active Contributor
0 Kudos

In case you mean the calling program, that is in SY-CPROG. Function SYSTEM_CALLSTACK gives you the complete call stack.

Thomas

0 Kudos

Hi, May i know why you need the caller name. If suppose you want to know currently who is executing the function. then you can check the sy-uname inside the calling program or function module that will have. If you want to know from another program then you need to pass some parameter id in side the function module and check your second program for the parameter id having any value.

Thanks.

Regards,

Jey

0 Kudos

Thanks Thomas!

Function SYSTEM_CALLSTACK made the trick.

Regards,

Tanguy Mezzano