Thursday 6 August 2015

How to find which function a UI5 service is calling...

Recently I was asked to investigate why some UI5 transactions were running slowly. Ordinarily, I'd be able to link services seen in the F12 Developer tools in Internet Explorer (in IE tap F12, switch on Network Logging, then do the UI5 f/e transaction, see what services are being called ) to the services defined in SEGW.

For some reason (if I find it, I'll blog it!) there weren't any services defined in SEGW. They were all present and correct in /IWFND/MAINT_SERVICE, but because that doesn't tell you the backend ABAP to look at, it doesn't help here.

What I was able to do was do a search on "odata" in SICF transaction. The odata node has a handler class /IWFND/CL_SODATA_HTTP_HANDLER.


An external breakpoint in the constructor method of this class will be hit every time ANY odata service is called. From here, a "Breakpoint on Statement : call function" will eventually (about 30 functions later) reach a statement:

call function mv_rfc_name DESTINATION mv_destination


mv_rfc_name will have the name of the function that the service is actually calling.

******************

Okay subsequent EDIT - Just stick the breakpoint in the Constructor of /IWFND/CL_BEC_BOP_COMMON_RFC

This is the constructor of the superclass that all the oData services inherit from.
Should save you about 30 seconds every time you search!

ATB. P.

******************
Another subsequent Edit : 07.09.2017 : 
/IWBEP/CL_MGW_BOP_COMMON_RFC also good for this in S4H