Skip to Content
-1

How to invoke .xsjs service via stored procedure

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 26, 2017 at 12:51 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 19, 2017 at 01:44 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 19, 2017 at 05:44 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded