Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Call procedure HANA XSJS

$
0
0

Hello,

I am developing the UI5 web application using HANA XS. I have create stored procedure, which selects data from System HANA DB table M_EXPENSIVE_STATEMENTS and insert data into other HANA Table, which I would like to use in the UI5 application later.

The stored procedure has no input parameter and no output parameter.

My idea is to call this procedure from HANA XSJS. I  have created xsjs file

       $.import("sap.hana.xs.libs.dbutils", "procedures"); 

       var XSProc = $.sap.hana.xs.libs.dbutils.procedures; 

 

       functiongetSQLs() {

 

       var conn = $.db.getConnection(); 

 

       var results = XSProc.procedureOfSchema("ExpensSQLs"

                  "WebAppl.procedures::get_expensive_statements");

 

         var jsonOut = results;  

    conn.close(); 

 

       $.response.status = $.net.http.OK; 

        

       $.response.contentType = "application/json"

        

       $.response.setBody(JSON.stringify(jsonOut)); 

       }

 

When I run the XSJS as XS Service, I get the error message :

Failed to load resource: the server responded with a status of 404 (Not Found)

Get http://vanpgcmsdb06.pgdev.sap.corp:8002/WebAppl/services/sqls5.xsjs 404 (Not Found)

Is that correct way to call the procedure in HANA ? I am using version 1.00.100.00.1430963283.

Thanks and best regards,

Tatjana


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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