Quantcast
Channel: SCN : Blog List - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 107

Debugging into a HTTP request on AS ABAP

$
0
0

If you want to debug into what is happening in the ABAP application server when you access an HTTP URL on it with your browser, there are several places to set an external breakpoint which will bring up the ABAP debugger for this web request.

 

 

Function module HTTP_DISPATCH_REQUEST line 982 seems to be the first point from where a breakpoint will bring you into the debugger.

debug http_dispatch_request line982.png

At this point, the http handler list is already populated. This is done by call function module HTTP_GET_HANDLER_LIST from line 606 and gives you all the handlers into question for the URL.

debug http_dispatch_request servtbl.png

For this example, there exist 2 handlers for /sab/bc/ui5_ui5.

debug http_dispatch_request handlertbl.png

If you look at the nested handlertbl, you can see the handler implementation classes and the order in which they will be executed to handle the http request.


 

The next point of interest is where the actual call of the http handler is done. This is in class method CL_HTTP_SERVER=>EXECUTE_REQUEST line 627.

debug cl_http_server execute_request line627.png

A bit up in the code, an object instance was created from the http handler class and now the interface method if_http_extension->handle_request is called. From here it is up to the http handler object to proceed with the processing. This may be completely different from one handler to the next, and you can of course implement and register your own http handler class as well.

Note that the handle_request method has to set the flow_rc attribute of the if_http_extension interface with a value that determines if more handlers will be executed or not (if there are multiple handlers registered).

 

As an alternative, you can figure out the handler class for your URL from the transaction SICF and just set a breakpoint in its implementation of method if_http_extension->handle_request or some other place of interest.

 

This is coding for the SAP_BASIS 7.31 SP 7, it may be different on other SPs or releases.


Viewing all articles
Browse latest Browse all 107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>