Skip to Content
Feb 01, 2019 at 02:04 PM

SAP HANA XSJS application set default schema and get data without using schema in query.


Hello, I am trying to set default schema for $.hdb connection. please suggest.

try{ var conn = $.hdb.getConnection(); var query = 'SET SCHEMA SBODEMOUS'; var rs = conn.executeQuery(query); query = 'SELECT TOP ? "CardCode", "CardName", "Balance" FROM OCRD WHERE "CardType"=?'; rs = conn.executeQuery(query, topRecords, bpType); conn.close(); return rs; } catch (err) { $.response.setBody(err.message); }