‎2006 Mar 20 2:55 AM
Dear All,
Is there any way to check from which function module the current piece of code called from? I need to know the current function module name during runtime. For current program sy-repid, current date is sy-datum, like wise any system field or any other way to know the current function name.
Thanks
Reddy
‎2006 Mar 20 3:10 AM
Hi Guys,
Thanks for reply. SY-CPROG is current program not the function name. Break point, nope I need to write piece of code in based on current function name. As you guys know in sales order sales code is called by number of function modules. Any function module is available to get current function name?
Thanks
Reddy
‎2006 Mar 20 3:03 AM
Hi shekar
to find the current function call, create a breakpoint in that part of the program then it will open the debugger. in the debugger goto CALLS there you can find the Function Calls i.e from which FM it is called.
regards
kishore
‎2006 Mar 20 3:04 AM
Hi,
You can try the system variable SY-CPROG.
Regards,
Suresh Datti
‎2006 Mar 20 3:10 AM
Hi Guys,
Thanks for reply. SY-CPROG is current program not the function name. Break point, nope I need to write piece of code in based on current function name. As you guys know in sales order sales code is called by number of function modules. Any function module is available to get current function name?
Thanks
Reddy
‎2006 Mar 20 3:18 AM
HI shekar
then try using 'ABAP_CALLSTACK' functional module in which the Calls in the program is stored.
regards
kishore
‎2007 Dec 03 2:44 PM