This public repository is read-only and no longer maintained. For the latest sample code repositories, visit the SAP Samples organization.
This repository aims to educate on building native applications on HANA using the new SAP Cloud Application Programming Model. For more general information on SHINE for XS Advanced, please refer to the github repository https://github.com/SAP/hana-shine-xsa.
The business scenario is that of an admin of a fictious company trying to maintain the employees i.e. create new employee details, delete employee information and update the employee information. We call this scenario "Employee List."
The application is implemented using SAP Cloud Application Programming Model. As such, we have the below mentioned application layers.
- The data model is implemented using CDS
- The OData service is implemented using Node.js V4
- Custom Handlers are used for writing individual business logic
- The UI of the application is implemented using SAPUI5
Below is the high level view of the components of the application.
You need the paid version of on-premise installations of the below softwares
- XS Advanced Feature Revision 1 for HANA 2.0 SPS03 release note and patch note
- Web IDE for SAP HANA version 4.3.57 release note
The below steps describes how to run SHINE for the SAP Cloud Application Programming Model using 3 approaches. Choose the one that best fits you.
- Running in SAP Web IDE for SAP HANA
- Generating MTAR using WebIDE and deploy manually to XSA system
- Generate MTAR using Multi-Target Application Archive Builder and deploy manually to XSA System
- Launch SAP Web IDE for SAP HANA. By default, in SAP HANA, express edition, SAP Web IDE for SAP HANA can be accessed using https://hxehost:53075/
- Right click on the
Workspace
folder in WebIDE and chooseGit
->Clone Repository
- Enter the URL of the repository as https://github.com/SAP/hana-shine-apm.git
- Click
Clone
Button. Clone should completed successfully.Ignore
any error likeUnable to run module
for the web module. - Right click on project and navigate to
Project
->Project Settings
- Under Project Settings window navigate to
Space
and choose a desired space from the dropdown. Then clickInstall Builder
if not installed - Click
Save
and thenClose
- Under project
hana-shine-apm
right click ondb
module navigate toBuild
->Build
to build the module. The build should be successful. - Right click on
hana-shine-apm
project navigate toBuild
->Build CDS
. DIBuild should get completed without any errors. - Right click on
srv
module navigate toRun
->Run as Node.js Application
to run the service - Right click on
web
module navigate toRun
->Run as Web Application
to run web module - Login to SHINE web application using any user (as we have not secured the service layer but only the web layer) e.g. XSA_ADMIN user can be used to login with his credentials.
- Launch SAP Web IDE for SAP HANA
- Navigate to
File
->Git
->Clone Repository
- Enter the URL of the repository as https://github.com/SAP/hana-shine-apm.git
- Click
Clone
Button - After Clone completed successfully, right click on project and navigate to
Project
->Project Settings
- Under Project Settings window navigate to
Space
and choose a desired space from the dropdown. Then clickInstall Builder
if not installed - Click
Save
and thenClose
- Right click on the project
hana-shine-apm
and navigate toBuild
->Build
- After build get completed successfully, under Workspace navigate to folder
mta_archives
->hana-shine-apm
and right click onhana-shine-apm_1.0.0.mtar
then click onExport
. - After
hana-shine-apm_1.0.0.mtar
get successfully exported to your local system, copy/move the file to desired XSA system
To deploy the mtar, login to the XSA system via CLI and deploy the mtar file using the following command:
xs deploy hana-shine-apm_1.0.0.mtar
The MTAR Builder needs Java, Git and Node.js including npm as pre-requisites. If you have one of the tools already installed you can skip the respective steps but make sure that you do not skip the npm configuration with the SAP NPM Registry.
- Download and install the latest Java SE Development Kit (JDK) from here
- Install Node.js from here
- Create a file with name
.npmrc
in your HOME directory. On Windows, that would beC:/Users/<User Name>
, on macOS, that would be~/Users/<User Name>
- Copy the below content to the .npmrc file. With this configuration, you are instructing your npm client installation to download @sap scoped modules from the SAP NPM Registry. All other modules are still downloaded from the default registry. Update all 3 proxy settings (proxy, http-proxy, https-proxy) as per your network settings. If no proxy settings are required mark values of all 3 proxy settings as null
registry=http://registry.npmjs.org/
@sap:registry=https://npm.sap.com/
strict-ssl=false
proxy=http://proxy:8080/
http-proxy=http://proxy:8080/
https-proxy=http://proxy:8080/
You can read more about the SAP NPM Registry in "SAP NPM Registry launched: Making the lives of Node.js developers easier"
- Go to this url https://tools.hana.ondemand.com/#cloud
- Navigate to the
Multi-Target Application Archive Builder
section - Download the
jar
-
Git clone the project to a folder
-
Copy the
Multi-Target Application Archive Builder
jar to the project root directory -
From the CLI execute the following command:
java -jar <mta_archive_builder> --build-target=XSA build
-
An MTAR with the name
hana-shine-apm.mtar
was generated.
From the CLI, login into the XSA system and execute the below command:
xs deploy hana-shine-apm.mtar
No known issues.
Please use GitHub issues for any bugs to be reported.
Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, version 2.0, except as noted otherwise in the LICENSE or CREDITS file.