SAP Integration Experts – DataXstream

How To Debug ABAP Web Service on SAP Web Application Server (WAS)

One of the more confounding aspects of developing in the SAP space is the lack of good, low-level, helpful instructions.  While this post is merely regurgitating information that is readily available elsewhere, it will be done in a manner that (hopefully) will actually be useful to vast majority of ABAP developers out there that,  like me, find a lot of SAP’s implementation of web services on the ABAP stack confusing.

Debugging a web service on the ABAP stack of SAP Web Application Server is a very useful procedure to know.  Here’s how you do it.

Note: This example is for ECC 5.0

  1. Locate the web service definition in the HTTP Service Hierarchy.  There are two ways to do this:
    • Option 1: Use transaction WSCONFIG and display the configuration for your web service.  Click on the ICF Details button Debug ABAP Web Service 01

    • Option 2: Start transaction SICF. Navigate directly to /sap/bc/srt/rfc/sap for your default host.
  2. Regardless of the method used to get to the service definition for your web service enabled function module, you should have it selected as in this example. Debug ABAP Web Service 02

  3. Next, enable the debugger by selecting the Edit\Debugging\Activate Debugging menu.

    Debug ABAP Web Service 03

  4. In the ensuing dialog box, confirm the debugging options (the defaults are usually OK). Debug ABAP Web Service 04

  5. To exercise the debugger, test your web service.  For this example, I will use the SAP WAS web service test tool, but the application calling the web service can be anything as long as it connects with the debugger’s user ID. Debug ABAP Web Service 05

  6. When the web service is executed, the debugger will start in a new SAPGUI session (make sure you are already logged in via the SAPGUI prior to executing the web service). Debug ABAP Web Service 06

  7. In the debugger, choose Breakpoints\Breakpoint at\Function Module from the menu to create a new breakpoint. Debug ABAP Web Service 07

  8. Specify the function module that implements your web service.  In the debugger, press F8 to run to your newly created breakpoint. Debug ABAP Web Service 08 If the debugger doesn’t get to your breakpoint, the most likely culprit is malformed input XML.  Check the payload of the message to ensure that it conforms to the specifications of the web service.

Once the debugger has started, it is just like debugging any other SAP application. If you have any specific tips or tricks regarding debugging web services, please share them in the comments section of this blog.

About: Craig:
Craig Stasila is a senior partner consultant with DataXstream, LLC. He has over twelve years experience with SAP integration. His specialties include ALE configuration, SAP XI/PI, and SAP.NET Connector Integration.

Share
  • Digg
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Twitter
  • del.icio.us
  • StumbleUpon
  • Blogosphere News
  • Reddit
  • RSS
  • Slashdot
  • Technorati

Comments

2 Responses to “How To Debug ABAP Web Service on SAP Web Application Server (WAS)”
  1. Hendro says:

    Nice tips Craig, thanks a lot

  2. Ganesan Rajamani says:

    Excellent Tip. Thanks Craig!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

SAP Integration Experts – DataXstream