How to Create Mobile Apps on HANA Cloud Platform that Talks to your On Premise System
Worried how to use cloud services when your data is in on premise? In this blog I am explaining how to create a mobile app in the cloud, which consume data from your backend on premise systems. Hope it will be helpful.
I have a requirement to create a mobile app that talks to my on premise backend systems. I want to create it real quick without spending a lot of time on setting up the development environment, hence I have decided to use the cloud services available on HCP.
I have chosen three major services:
- Web IDE to quickly create a mobile app.
- HANA Cloud Platform Mobile Services to add enterprise level features to my app.
- HANA Cloud Connector to securely connect cloud services with my on premise systems.
In this blog you will learn how to create a mobile app using Web IDE, how to use HCPMS to create your mobile app and finally configure HANA Cloud Connector to communicate HCPMS with your backend on premise system.
Setting up HANA Cloud Connector
- HCC could be installed in few minutes. Download HCC from here.
- After extracting the HCC zip file, open the directory and run the batch file go.bat to start cloud connector.
- Then, run the url https://localhost:8443/
- For username and password enter Administrator / manage(Case sensitive).
- Next, choose Master type installation.
- On the next screen, enter your HCP trial details as given below. If you do not have HCP trial, register here.
- From the new screen choose Access Control then click on Add.
- Choose backend system type as SAP Gateway.
- Select HTTPS protocol.
- Then, provide SAP Gateway internal hostname and port.
- Next, provide a virtual host and port. You could give any values here.
- Choose Principal Propagation Type as None.
- Click on Finish.
- Then, choose the system we just created, and click on Add.
- Provide below details. Here I am choosing url path as “/” which will allow HCP to access all the Odata serivces available in SAP Gateway. If you need to give access to only specific services mention only that.
- Now we are good to go. It should a green icon under Connector State.
Configuring Application in HCPMS
- Login to HCPMS admin cockpit. If you do not have access to it, enable the service by following this blog.
- Then, click on Applications tile.
- Click on Add icon.
- Provide the details as given below.
- Next, click on Configure and provide details as given below. Note that the backend URL will be having the virtual host name and port we configured during the HCC configuration. Click on Save.
- To test the configuration click on Ping. You should get a Ping Successful message.
Creating Mobile App using Web IDE
We need access to the backend system to create app in Web IDE. Hence before creating the mobile app we need to create a destination in HCP.
Creating Destination in HCP
- From your HCP cockpit click on Destinations and then click on New Destination.
- Then provide the below details. For the property SAPWebIDEUsage the values are: odata_abap,bsp_execute_abap,dev_abap,ui5_execute_abap
- Click on Save.
- Now, run your Web IDE. Then, choose File > New > Project from Template. Choose template SAPUI5 Master Detail Kapsel Application.
- Provide a Name for the project and choose the destination SAPGateway. Then, choose the Odata service you want to use in your app. I chose RMTSAMPLEFLIGHT, it provides a list of flights details. Then, click on Next.
- Then, provide the names of properties to be displayed on the mobile app. Click on Next > Finish.
- Right click on the project > Project Settings.
- Provide the below details.
- In this step we are defining,
- the app ID we created in HCPMS
- mobile platforms this app should support
- kapsel plugins to be used with the app. (Logon)
- Click on Save.
- Next, right click on the project > Run > Run on > iOS Simulator. You can choose your preferred device.
- Note: You need to configure HAT to test the app on a device. I am not explaining how to configure HAT in this blog.
- Provide the SAP Gateway login credentials to register with HCPMS. You ‘re done !! Now you could see your on premise data on mobile.
SCN spaces to follow:
SAP Technology RIG