cancel
Showing results for 
Search instead for 
Did you mean: 

run hana stored procedure from UI5 XS App

former_member224398
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

mantrishekar
Active Participant

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.

former_member224398
Participant
0 Kudos

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

mantrishekar
Active Participant
0 Kudos

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.

former_member224398
Participant
0 Kudos

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.

mantrishekar
Active Participant
0 Kudos

Anurag,

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

Regards,

Shekar