Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to call HANA store procedure in XS?

$
0
0

Hello Florian,

 

I tried to call a procedure using the XS Procedures library and the XSJS service itself via a jQuery.ajax call but the procedure isn't executed.

 

I will attach my code and may somebody can help me to find the error

 

XSJS

function myProc(){  var XSProc = $.import("sap.hana.xs.libs.dbutils", "procedures");  XSProc.setTempSchema("TEST_SYSTEM");  var runProc = XSProc.procedure("TEST_SYSTEM","test_Project", "discretizationODATA");  runProc();
}

UI5

new sap.ui.layout.form.FormElement({  fields: [new sap.ui.commons.Button({  text : "Run Proc",  width: "150px",  press : function() {  var aUrl = '../../../test_Project/test.xsjs?cmd=myProc';                       jQuery.ajax({                                 url: aUrl,                                 method: 'POST',                                 dataType: 'json',                                 success: console.log('Complete'),                                 error: console.log('Error') });    }  })]  })

Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>