Skip to Content
-1

How to invoke .xsjs service via stored procedure

Sep 18, 2017 at 03:28 PM

91

avatar image
Former Member

Hi,

Does anyone knows how to invoke .xsjs service from stored procedure? I have a service which I need to call from a stored procedure and pass parameter like company code. Is it feasible to do?

Regards,

Kam

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Sergio Guerrero Sep 26, 2017 at 12:51 PM
0

you cannot call an xsjs service from a procedure. the only way would be to call a procedure from an xsjs service using the $.hdb API callas or as shown above by Mantri.

Additionally, you could call an xsjs service from an XS Job.

here is the API documentation https://help.sap.com/http.svc/rc/3de842783af24336b6305a3c0223a369/2.0.01/en-US/$.hdb.ResultSet.html

hope it helps

Share
10 |10000 characters needed characters left characters exceeded
Emanuele Ricci Sep 19, 2017 at 01:44 PM
1

Hi, I don't think you can do what you want to do. The only thing you can do is the inverse (call a procedure from an xsjs) or you can configure your xsodata to call a xsjs/procedure via custom exits.

Cheers,

Emanuele.

Share
10 |10000 characters needed characters left characters exceeded
Mantri Shekar Sep 19, 2017 at 05:44 AM
0

Hi,

Below is the piece of code which is used to call Stored Procedure from XSJS Service.

query = 'CALL SYSTEM.getAllDetails3(?,?,?,?,?,?,?)';

Here getDetails is my procedure and i have 7 inputs for my storedprocedure.

Regards,

Shekar.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Shekar,

The scenario you described is to call stored procedure from XSJS. My scenario is exactly opposite whereby I want to call XSJS service from stored procedure.

Regards,

Kam

0

Hi,

What is your main objective?Are you using any front end UI?

0