
After SP07 HANA Upgraded, Below changes need to be taken care in your Webide project and changes needed after webide upgrade to be able to proceed further with development.
In your Hana module – package.json file
Go to your Project
SAP Hana database module (hdb) --- package.jsonNew changes
Change hdi-deploy version, line:
"@sap/hdi-deploy": "3.10.0"
To:
"@sap/hdi-deploy": "^4"
After making Changes
Node-js module (if being used) – package.json file
"@sap/xsenv": "^2.0.0",
"@sap/xsjs": "^5.2.0"
To:
"@sap/xsenv": "^3",
"@sap/async-xsjs": "^1"
-Remove line:
"@sap/xsjs-test": "^3.0.2"
-Change:
"start": "node server.js",
"test": "node testrun.js"
To:
"start": "node --experimental-vm-modules server.js",
"test": "echo Tests not available with async-xsjs"
-Change:
"engines": {
"node": "8.x"
},
To:
"engines": {
"node": "16.x"
},
Click on Save file.
Node-js module (if being used) – server.js file
Change line:
var xsjs = require("@sap/xsjs");
To:
var xsjs = require("@sap/async-xsjs");
Change lines:
// start server
xsjs(options).listen(port);
console.log("Server listening on port %d", port);
To:
// start server
const serve = async (port, options) => {
(await xsjs(options)).listen(port);
console.log("Server listening on port %d", port);
}
serve(port, options);
After changes
Node-js module (if being used) --- Go to your lib ---- <name>.xsjs file(s)
(*in this example function name is runFG, and trying to execute Hana procedure "rev70project.hdb::testfg_SP"()) – change accordingly for each xsjs file
/*eslint no-console: 0, no-unused-vars: 0, quotes: 0 */
async function callProc() {
var conn;
conn = await $.db.getConnection();
var ts = new Date().toISOString();
var pc = await conn.prepareCall('{call EXT.COMN_Lib_Schedule:event()}');
var result = await pc.execute();
await conn.commit();
conn.close();
console.log("call_event_schedule.xsjs:callProc: ", ts);
}
export default {callProc};
Add line at the end of file:
export default {runFG};
Click Save file.
Right click on node.js module (nodejs) à build
to build the module. It should complete successfully.
Start node.js application:
For more detailed explanation how to migrate application from xsjs to async-xsjs please refer to https://help.sap.com/docs/btp/sap-business-technology-platform/migrating-applications-from-xsjs-to-a...
SAP HANA SP07 Roll-out Doc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 | |
1 |