Debugging

Finding Function Module by Debugging: Step by Step Approach

Many functional consultants are in the business long enough to know the common BAPI and function modules, but no one can know it all. A common requirement in custom report is to replicate the logic of standard transaction and we need function module (or BAPI) for that. A quick google search may give you some options. Another way is to find it by debugging. Strap on you seat belt, it is going to be a wild ride.

Step 1 – Execute the transaction until the last possible point you know for certain that (standard) logic has not triggered.

Step 2 – Go to the transaction execute until the last step where the logic triggers. In the command window, write /H and press enter.

After pressing the enter, you should see a success message at the bottom of the screen.

Step 3 – From the top menu in the debugger screen, navigate to Breakpoints > Breakpoint at > Breakpoint at Statement.

Step 5 – In the pop up screen, enter “call function” and click on the green check. A success message will confirm that break point is set.

You are all set. Now keep pressing F8 and the program will stop at all the FMs it call from thereafter. Make the list, find the probables and read their documentation and it may give you the required FM you need.

Please note – Standard program not always call the FM or BAPI to complete the task. It can update the standard tables directly but for custom program that is not an option. Sometimes, if the FM is getting called in loop or the sheer number of FM calls can be daunting, so have patience. These are easy tips and deeper analysis may be required but this should give you the desired result in 50% of the cases.

Bonus tip: If you already know the FM which is getting triggered but you want to verify or check the data or find the location of the FM call, follow the link here.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

Follow by Email
Twitter
LinkedIn
LinkedIn
Share