Skip to Content
author's profile photo Former Member
Former Member

CUrrent Function module name

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2006 at 03: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2006 at 03: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 20, 2006 at 03:04 AM

    Hi,

    You can try the system variable SY-CPROG.

    Regards,

    Suresh Datti

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.