Debugging Web Services in Netweaver ABAP Server

When running an application in the server, sometimes things doesn't goes the way it supposed to be, and we need to debug the application. For desktop application based on Java or .NET technology, it is just a matter of setting the breakpoint in IDE and then running the application with debug enabled. For web application based on ASP.NET, similar thing could be done by using Visual Studio and running the web application in debug mode using IIS Express. But what about web services that being served by SAP Netweaver AS ? This post shows how.

Option 1. Execute - Debugging in SE37


This is the most standard way to debug ABAP remote function module. Just open up transaction SE37, type function module name, and click on the caliper icon  (For those who are not so into STEM stuffs, you could see this wiki page to know about calipers). Then fill in the input parameters before clicking on the Execute - Debugging icon.























Now you are inside the ABAP debugger, and the function is ready to run and to debug.


Option 2. By Activating Debug


But sometimes filling the expected parameter in SE37 and running the function module from there yield different result compared to calling the web service from external application. In this case, we need to activate debugging for specific url in the Netweaver AS. Open transaction SICF, type the url of the web service being called in the 'Service path' field. I usually uses the built in /sap/bc/soap/rfc url because creating dedicated web services is quite a hassle.  Then click on Execute button.






Navigate the tree in the bottom panel to choose the web service being debugged. Ensure focus on the web service in the tree.














In the Edit menu, you will find Debugging menu, and then click on the menu item 'Activate Debugging'.
Fill the username of the web service being debugged, then click Activate.
If all is well, you get a message in status bar : 'Breakpoint was set for external debugging (User: xxxx Validity  : yy:zz:aa)'.






When Debugging is active, the debugger would pop up in the same session whenever the web service url being called from other application.

Conclusion

Features of Netweaver Application Server could be used to debug known function modules, one of the option is to perform debugging on the function module using SE37.  The other option is to use   transaction SICF and activate debugging using menu Edit : Debugging : Activate debugging when the SICF node is being selected.

Comments

Popular posts from this blog

Long running process in Linux using PHP

Reverse Engineering Reptile Kernel module to Extract Authentication code

SAP System Copy Lessons Learned