Skip to Content

SAP HANA EXPRESS XSA Application Part 2

In this part, we will continue developing our XSA application with Node.js module for business logic.  Please refer the Part 1 for MTA project and database HDI Module creation steps.

HANA XSA MTA project and HDI Module

 

  1. Right click on the MTA project name and create Node.js module New->Node.js Module. Complete the steps in the wizard .              The wizard even provides an option of XSJS support. Kindly check the same as we are going to use xsodata services.
  2. Once the above steps is completed, we can see the Node.js module in our project workspace with all the source files such as server.js to bootstrap xsjs, package.json  created.    
  3. As shown below , we have both HDI module(CMData) and Node.js module(MSBusinessLogic). This both module needs to interact with each other. To achieve this, we to maintain required entries in mta.yaml file. In mta.yml file, we need to mention Node.js module requires HDI module and Node.js module provide service to be used by any other module.                                                                                 
  4. Next we willl create xsodata service for the two entities created in CMData HDI module. Right click on MSBusinessLogic module and create an new file as service.xsodata under the lib folder.In the xsodata, we have defined the service to expose the entities as well as the association from Customer to Orders.Save, Build and Run the application.
  5. Once the application is running, we can test the xsodata service from the application URL. Metadata of service.xsodata is displayed.
  6. We will also create XSJS to interact with the HDI module.

 

Thus till now we have created MTA poject, HDI module and Node.js module. Also we have seen how the Node.js module consumes the HDI module artifacts.

Next we will create an user interface module and show how the same consumes the xsodata service provided by Node.js module.

Part 3 : User Interface Module

6 Comments
You must be Logged on to comment or reply to a post.
  • I have Hana Express VM

    Version: SAP Web IDE for HANA 2
    SPS 02 Patch 0 ( Build 4.2.14 )

    In the new menu of the MTA there is node option for Node.js project!

    • Hi Former Member

      I wonder about you have this problems. In my WebIDE I can see that option :O

      I have the same SAP WEBIDE Version as you. Did you manage to work it? Did you successfull complete the tutorial?

       

      Regards, Stefano

  • Hi together,

    somehow I’m not able to follow the tutorial. I’m using

    Version: SAP Web IDE for HANA 2
    SPS 02 Patch 0 ( Build 4.2.14 )

    The problem is, that many staff are shown here don’t appear or are different. However, I get the database and I was able to insert some data in the table. Nevertheless I have severe problems:

    1. The xsodata don’t work. It only said “500 Invalid HANA settings provided. OData services are disabled.” Google didn’t really helped 🙁
    2. I haven’t the .che folder … do I miss something? (See scrennshot I post for reply the other comments)

    Did anybody of you finish this tutorial? I would really appreciate any kind of help.

    Stefano