Skip to Content
author's profile photo Former Member
Former Member

How to call HANA store procedure in XS?

Dear all,

I am developing a application using HANA XS and UI5.

I created a web interface with a table view and connected the JSON model to SAP HANA via OData.

I would like to run a stored procedure on HANA which is triggered before Data are loaded.

What would be the best way to call this stored procedure from XS?

Thank you in advance.

Regards,

Matthias

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Sep 23, 2015 at 08:50 AM

    Hello Matthias,

    since SPS09 it is also possible to use the XS Procedures library (JSDoc: Namespace: procedures). So you can call your stored procedure very easily in an XSJS service. The XSJS service itself can be called from UI5 by an jQuery.ajax call.

    Best Regards,

    Florian

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 23, 2015 at 08:32 AM

    Hi Matthias,

    In UI5 application you can call the stored procedures by just by declaring call preparing variable and in XSJS Query.

    Example:-

    var call.prepare = 'CALL <Procedure_name(?,?<total in/out parameters>)>'

    now you can provide in parameters and can hold the output of the SP by declaring variables.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.