Human Capital Management Blogs by SAP
Get insider info on SAP SuccessFactors HCM suite for core HR and payroll, time and attendance, talent management, employee experience management, and more in this SAP blog.
cancel
Showing results for 
Search instead for 
Did you mean: 
yogananda
Product and Topic Expert
Product and Topic Expert

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.jsonyogananda_0-1706358205415.pngNew changes

 

Change hdi-deploy version, line:
"@sap/hdi-deploy": "3.10.0"

To:
"@sap/hdi-deploy": "^4"

 

 After making Changes
yogananda_1-1706358223724.png

Node-js module (if being used) – package.json file

  • Go to your SDI Project -  Node.js module (nodejs)  - package.json
  • Change following dependencies:

 

    "@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"
  },

 

yogananda_4-1706359209757.png

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 changesyogananda_3-1706359163277.png

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};yogananda_2-1706359023173.png

Click Save file.

Right click on node.js module (nodejs) à build
to build the module. It should complete successfully.

yogananda_1-1706358955735.png

Start node.js application:

yogananda_0-1706358945707.png

 

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

https://help.sap.com/docs/SAP_HANA_PLATFORM/42668af650f84f9384a3337bcd373692/6b565d8e136f4f04b52eaba...