Hello Experts,
I am trying to build one native XSA application based on HANA 2.0 SPS 03 with XSJS code using HDI Container. I am successfully built a table and inserted data into it and written xsjs code to fetch data from the table but getting the following issue while executing the xsjs code.
500 insufficient privilege: Not authorized: line 1 col 24 (at pos 23)
XSJS Code
$.response.contentType = "text/plain";
var conn = $.hdb.getConnection();
var query = "SELECT id as \"Id\" FROM SCHEMA_NAME.CONTXT_NAME.TABLE_NAME";
var rs = conn.executeQuery(query);
$.response.setBody(JSON.stringify(rs));
$.response.status = $.net.http.OK;
For the Query, we have tried the following code and got errors written corresponding to them as below: -
1. "SELECT id as \"Id\" FROM SCHEMA_NAME.CONTXT_NAME.TABLE_NAME" - we get 500 insufficient privilege:
Not authorized: line 1 col 24 (at pos 23)
2. 'SELECT ID as "id" from " SCHEMA_NAME.CONTXT_NAME.TABLE_NAME " ' - we get 500 invalid column "id"
Note: The Same issue is getting while executing procedure also.