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

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

129 Views

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); }