Skip to Content

OData Provisioning feature in HANA Cloud Integration (HCI) converts non OData protocols to OData, hence HCPMS applications can consume it. This feature is similar to what Integration Gateway do in SMP 3.

/wp-content/uploads/2016/04/2016_04_15_14_08_17_931667.jpg

In this blog I am explaining how to create HCPMS mobile app using OData service I created from an existing SOAP service as mentioned in my blog.

Business Scenario

Data from backend is exposed as SOAP service. It is possible to define backend of HCPMS application with SOAP service, but the application will not get all the benefits of HCPMS, ex. Offline.

So, to create a mobile app with all features of HCPMS, SOAP has to be converted into OData. To convert SOAP to OData we need to use HCI.

Step to Step Procedure

As mentioned in this blog OData service was created, it will be used as backend in HCPMS application.

The following steps will guide you through creating an HCPMS application, and testing it on a simulator.

Web IDE is used to create the hybrid app.

Configure app on HCPMS

  • Logon to HCPMS cockpit. Click on Applications tile.

      /wp-content/uploads/2016/04/2016_04_17_20_25_32_931668.jpg

  • Press the + icon to create a new application.

      /wp-content/uploads/2016/04/2016_04_17_21_59_04_931677.jpg

  • In the create application screen enter below details. Click Save. Note: Security configuration as Basic means it require Basic Authentication.

      /wp-content/uploads/2016/04/2016_04_17_22_13_57_931678.jpg

  • Click on Configure. Then click on Backend.

      /wp-content/uploads/2016/04/2016_04_17_22_22_12_931691.jpg

  • Fill in the details as given below. Then click Save to complete your configuration.

     /wp-content/uploads/2016/04/2016_04_17_22_24_28_931692.jpg/wp-content/uploads/2016/04/2016_04_17_22_31_51_931694.jpg

Create Mobile App using Web IDE

  • Logon to SAP Web IDE select Local root and open the context menu by right clicking.
  • Choose New > Project from Template to open the new project creation wizard.

      Untitled.png

  • On Template Selection page click on SAPUI5 Master Detail Kapsel Application. Click Next.

      /wp-content/uploads/2016/04/2016_04_17_22_46_40_931690.jpg

  • Enter a name for your project and click Next.

      /wp-content/uploads/2016/04/2016_04_17_22_49_11_931697.jpg

  • Next, choose the backend and provide details to complete the base URL as given below. Click  “Load Service Metadata” button, it will list the OData collections of the OData service. Click Next.

      /wp-content/uploads/2016/04/2016_04_17_22_51_14_931698.jpg

  • Note: I have configured a destination with the details of my HCI system as given below. This backend was used in the above step.

     /wp-content/uploads/2016/04/2016_04_17_23_19_16_931700.jpg

  • Fill out the Project Namespace, Master Section, Master Data Fields and Detail Section as displayed in the screenshot.

     /wp-content/uploads/2016/04/2016_04_18_11_45_49_931845.jpg/wp-content/uploads/2016/04/2016_04_18_12_50_12_931846.jpg

  • Click Next.
  • Click Finish to create the project.

      /wp-content/uploads/2016/04/2016_04_18_12_54_53_931867.jpg

  • To run this app as a hybrid app, right click on the project > Project Settings.

      /wp-content/uploads/2016/04/2016_04_18_12_58_27_931872.jpg

  • Under Device Configuration provide below details. Click Save. Note: I am going to test this app on iOS simulator hence chose iOS as the mobile platform. Logon plugin is used to login to HCPMS from the app.

     /wp-content/uploads/2016/04/2016_04_18_13_03_51_931877.jpg      /wp-content/uploads/2016/04/2016_04_18_13_10_33_931878.jpg

  • Finally, to test the app on a simulator right click on the project > Run > Run On > iOS Simulator. Note: To use this feature you need HAT configured.

     /wp-content/uploads/2016/04/2016_04_18_13_13_20_931879.jpg

  • The application will be installed on the iOS simulator. Backend credentials has to be provided to login to the app. Note: In the background Web IDE is creating a cordova project with the plugins and platforms we chose during device configuration.

      /wp-content/uploads/2016/04/2016_04_18_13_21_57_931888.jpg/wp-content/uploads/2016/04/2016_04_18_13_22_36_931892.jpg

CC:

SAP for Mobile

Regards, Midhun

SAP Technology RIG

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Jay Malla

    Hi Midhun,

    Nice article.  When I create the application through HCPms, the app id is not being exposed through the URL – https://hcpms-s********trial.hanatrial.ondemand.com/myAppID.  I am not sure why – I had created this before.  I am not sure if it is a bug in HCPms.  Once I create the application and then a destination and tie the two together, is there a step i am missing.  I have the cloud connector running and I can test the connection from HCP destination to the virtual destination.

    I created the post – https://answers.sap.com/questions/195798/http-status-403-backend-connection-is-not-mapped-f.html.  Maybe you can take a look?

    Thanks,

    Jay

    (0) 
    1. Jay Malla

      In my mobile app, i get the error – { “requestUri” : “https://hcpms-s*******trial.hanatrial.ondemand.com/com.jm.kapsel.qmapp/$metadata?sap-documentation=heading”, “statusCode”: “403”, “statusText”: “Forbidden”, “headers” : [], “body” :”…..HTTP Status 403 – Backend connection com.jm.kapsel.qmapp is not mapped for this application configuration…..}

      (0) 

Leave a Reply