Skip to Content
0

run hana stored procedure from UI5 XS App

Jun 30, 2017 at 09:04 AM

115

avatar image
Former Member

Hi,

I'm working on a assignment where i need to run the hana stored procedure based on a button click with few conditions. What is the best way to do that ? by checking the blogs i think that we can do it by creating xsjs file or is there any other way. Can you provide any example to do that

thanks,

Anurag

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

1 Answer

Mantri Shekar Jul 03, 2017 at 05:22 AM
1

Hi Anurag,

First i would like to understand how you are creating Procedures.Either Ctalog Procedures or hdb Procedures.

If you are creating using catalog Procedures then you can call the procedure using xsjs file.

For my assignemnt i done in this it is worked out for me.

Regards,

Shekar.

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

Hi Shekar,

I have created the catalog procedure only.Also i have taken the same approach to call via XSJS file and working on that.

Did you call your XSJS file via Jquery AJAX get method ? please share the code if possible.

Thanks,

Anurag

0

Anurag,

No need of using Jquery AJAX Call.

Use sap.ui.modle.json.jsonModel until unless if somebody is strictly asking u to go for jquery then use jquery otherwise not required.

var a= "url";

var model = new sap.ui.model.json.JSONModel();

model.loadData(a,object);

here if u are passing any inputs to procedure then u use the object otherwise not required.

0
Former Member

thanks a lot Shekhar for your inputs.

I have used jquery AJAX call with the GET method and it is working fine.But its good i came to know one more method to do the same and sticking to the UI5 given methods :).Internally model.loadData also triggers the GET method with the parameters appended to that.

0

Anurag,

If it is hep mark this as answered to close the discussion.

Regards,

Shekar

0