cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug a procedure invoked by an OData request?

0 Kudos


I have the following scenario in an application: An OData service which calls a Calculation View, which calls a Procedure. So:

OData -> Calculation View -> Procedure.

However I need to find a way to debug the Procedure execution when a request is sent to the OData service. I can debug the procedure locally and it is running with the expected results; However, when this procedure is called through the OData request, its not returning the expected results, that's why I need to debug the procedure when it is called from the OData request. I pass some parameters to the procedure via the OData service and I am pretty sure that those parameters are passed correctly to the procedure. Anyone experienced something like this?

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You didn't say what release you were on, but there are some new features in SPS 09 that might help. First is the profile option in XSODATA.  When you use this option it will show you the exact SQL Statement which is generated from the service call.  You could then use this SQL statement to test more accurately the call to the underlying view/procedure from the development environment directly.

Another new feature of the debugger in the HANA Studio in SPS 09 is the new XS OData-based debug configuration. It has the option: Debug Also Stored Procedures. This should allow the debugger to stop within a stored procedure being processed via an Odata service. Now I've used this feature for an XSODATA service exit to Stored Procedure.  Not sure if it works the same when you have a calculation view in between.

0 Kudos

Hi Thomas, thank you for your time.
The HANA release is 1.00.091.00.1418659308 (fa/newdb100_rel).
I tried to run the XSOData-based debug but I am receiving this error message when I try to select the .xsodata file:

Any thoughts?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Are you able to do any standard debugging?  That error is a connection error which would lead me to believe that the debugging service isn't active or Web Sockets is blocked by the network connection to this server.

0 Kudos

Actually "SAP HANA Stored Procedure" debugging and "XS JavaScript: Manual Session" debugging are working fine. The debugging services for the XSEngine are OK:

Maybe there is an issue with the Web Sockets connection?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Maybe there is an issue with the Web Sockets connection?

No, if "XS JavaScript: Manual Session" debugging is working then this wouldn't be a problem with general configuration or Web Sockets since this other option also uses Web Sockets. I'm not really sure why this option would work and the other wouldn't. I would suggest entering a support ticket to allow development to research why your debugging isn't working.

0 Kudos

Alright Thomas, thank you so much for your help. I think the support ticket is the way to solve this problem.

Answers (0)