In December 2014, SAP enabled the HANA Cloud Platform mobile services (HCPms) trial for all hanatrial accounts. HCPms is a real Mobile-as-a-Service offering and it shares some source-code baselines with SMP 3.0 on premise. In consequence, mobile apps written with the SMP 3.0 OData SDK can run on both HCPms and SMP 3.0 on premise with little or no change. In order to understand the differences and similarities visit this blog SAP HANA Cloud Platform mobile services released

If you haven’t done it yet, you can enable your HCPms trial with the steps described in this blogHow to enable HANA Cloud Platform Mobile Services Trial

The process of creating your application configuration is different.John Polus hosted a webinar on this topic Webinar: Getting Started with the HANA Cloud Platform Mobile Services (HCPms) and Using the HANA Cloud Connector to Access Backend Systemsand created two guides to help you go through this process.

  1. Installing and Configuring the HANA Cloud Connector for On-premise OData Access
  2. Creating Application Definitions in Hana Cloud Platform Mobile Services

The good news is all the Android material I have created for SMP 3.0 SDK for SMP3.0 on premise is also valid for HCPms. I have onboarded with HCPms and have accessed both online store and offline store using the projects and guides I published on Mobile Application Development Platform for Developers – Native Apps. No changes required.

In order to onboard with HCPms, you need to enter the values displayed in the following screenshot.

Host: hcpms-<your user>trial.hanatrial.ondemand.com

Login and Password: Your credentials

Port: 443

No need to check the “unsecure connection” checkbox, because HCPms is an HTTPS connection.

HCPms.jpg

Before you run the android apps, I would recommend testing first the configuration of your application definition from a REST Client. I normally use POSTMAN plugin for Chrome, but feel free to use your favorite rest client plugin.

1. Onboard a user from the REST client

If you enter the following values, you should receive a “201 created” response if the application configuration is set up correctly

URL

https://hcpms-<your user>trial.hanatrial.ondemand.com/odata/applications/latest/<your app id>/Connections

HTTP Operation

POST

HTTP Header: Content-Type

application/atom+xml

HTTP POST Body

<?xml version=”1.0″ encoding=”UTF-8″?>

<entry xml:base=”http://localhost:8080/odata/applications/latest/com.sap.flight.kapsel/Connections

xmlns=”http://www.w3.org/2005/Atom” xmlns:m=”http://schemas.microsoft.com/ado/2007/08/dataservices/metadata

xmlns:d=”http://schemas.microsoft.com/ado/2007/08/dataservices“>

  <content type=”application/xml”>

<m:properties>

</m:properties>

</content>

</entry>

Switch to Basic Auth Tab

Username

Your username

Password

Your password

Click the “Refresh Headers” button

The result should look like the screenshot below. Please take note of the response and copy the ApplicationConnectionId property available in the response, because you will need it in the second test.

HCPms-onboard.jpg

2. GET service document from the REST client

If you enter the following values, you should receive a “200 OK” response if the application configuration is set up correctly

URL

https://hcpms-<your user>trial.hanatrial.ondemand.com/<your app id>/

HTTP Operation

GET

HTTP Header: X-SMP-APPCID

The ApplicationConnectionId you received in the response body from the onboarding exercise.

Switch to Basic Auth Tab

Username

Your username

Password

Your password

Click the “Refresh Headers” button

The test should look like the screenshot below

HCPms_Get.jpg

Cheers

Claudia

To report this post you need to login first.

6 Comments

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

  1. Mohamed Elmarakby

    Thanks Claudia for this blog. Actually you’ve answered what I’ve asked in previous blogs.

    Now, app is running and device is registered on HCPms. but when clicking “online” or “offline”, there is an error message is displayed “unexpected error occurred StoreNotOpen” or “unexpected error occurred %1$s“. I can not know the exact problem cause bu debugging. Could you tell me what’s the expected problem.

    password is assumed to be of backend system. i.e. sapes1 server not SMP. Is that right?

    (0) 
  2. Mohamed Elmarakby

    Hi Claudia,

    I recommend to state the parameter values on HCPms for the com.sap.flight app. As I still have conflict with data in connection details: backend url, Authentication type,…….as in the log file on HCPms, it’s stated that “UNAUTHORIZED” 

    I fill data:

    BasicAuthentication

    Pxxxxxxxxxx

    Password:
         (SAP ES1 password “Netweaver Gateway password not SCN one”)

    500

    Rewrite URL on HANA Mobile Server

    OnPremise

    (0) 
  3. Mohamed Elmarakby

    Hi Claudia,

    I still make trials but the problem still exist.

    Do we need to install Clienthup on our Android device. As in log view, there is a continuously displayed message “Client hup not installed on this device”.

    PLZ, I need help in that. I need the app to be operated on HCPms.

    Another question: After adding flight agency, what transaction code used to check that on SAP ERP system.

    Thanks,

    Mohamed.

    (0) 

Leave a Reply