How to Write Java Script Libraries?
- Click here to learn more about libraries.
- Open SAP HANA Development Perspective -->Project Explorer tab.
- Server Side Java Script libraries have an extension .xsjslib.
- To create a new file, select
New-->Other-->SAP HANA-->Application Development-->XS JavaScript Library File. - Select the parent folder and Name of file (eg. Custom_library.xsjslib).
Note: Please create this file in other package apart from your project's package to test it out the $import function. - Enter the following content in custom_library.xsjslib file.
- Import this library into your javascript file (hello.xsjs).
Use $.import to reference library file to .xsjs file - Activate it and Run that application as Run AS --> XS Service.
No comments:
Post a Comment