0

I know I can call other JS files from XSJS by making a .xsjslib file. I would like to be able to call a JSView instead. Is this possible?

Note: the reason for me to this is that I can then use the SAPUI5 libraries and make it easier to import external libraries to my code. This is more of general question than trying to target a specific problem.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
polaris
  • 339
  • 2
  • 14
  • 33

1 Answers1

2

that's not possible, as the UI5 JSView is in the front end and XSJS is server-side code. Cheers

Lucia S
  • 438
  • 3
  • 7
  • Thanks for your answer. Is there a way to call external libraries within xsjs or xsjslib, such as js-xlsx or pdfmake? – polaris Jun 14 '17 at 12:34
  • 1
    You can do that in node.js in XS Advanced: https://www.sap.com/developer/tutorials/xsa-node-modules.html . You can also call node.js from outside and connect to HANA using the HDB module https://www.sap.com/developer/tutorials/hxe-nodejs-setup.html – Lucia S Jun 28 '17 at 13:58