Skip to Content

How to Stage Mobile Application in HCPms

Have you read Martin’s recent blog on the new features of HANA Cloud Platform mobile services? In that list Staging is one of the notable feature. Staging helps the developers to give their application to the users for testing, after the completion of the tests it could be moved immediately to the end users from admin cockpit itself.

In this blog I am explaining how to put your application in a test state and then move it to the production.

Configure Application in Cockpit

  • Open HCPms admin cockpit, then click on Applications.
  • Click on Configure and provide below details.


stage2 (1).png


    Note: Backend URL –

  • Click on Save.

Create a Kapsel Application

The following steps will create a simple Kapsel app with an AppUpdate plugin.

  • Cordova command to create project
      cordova -d create C:\Kapsel_Projects\StagingDemo StagingDemo "{\"plugin_search_path\":\"C:/SAP/MobileSDK3/KapselSDK/plugins/\"}"
      cd C:\Kapsel_Projects\StagingDemo
      cordova -d platform add android
      cordova -d create ~/Documents/Kapsel_Projects/StagingDemo StagingDemo "{\"plugin_search_path\":\"/Users/i12345/SAP/MobileSDK3/KapselSDK/plugins/\"}"
      cd ~/Documents/Kapsel_Projects/StagingDemo
      cordova -d platform add ios


  • Replace index.html (C:\Kapsel_Projects\StageDemo\www\index.html) with this sample code. This is an extended code from these kapsel guides.
  • Add AppUpdate plugin and logon plugin
      cordova -d plugin add
      cordova -d plugin add
  • Run the following command to build project.
      cordova build
  • Run app in emulator using the below command.
      cordova emulate android

      cordova emulate ios
  • Login to the application. The credentials doesn’t matter since we configured the app with No Authentication. The application will show a list of products.

    stage0 (1).png

  • From HCPms Admin Home page click on Registrations and Users > Turn on “Is Tester” button. Hence this user gets the applications which are under stage state.

    stage3 (1).png

Enable Staging

In this step we are going to upload a new version of the Kapsel application to HCPms for testing (Stage state).

  • When we run the app for the second time to identify the a change, update index.html file as given below. This will get the list of Suppliers instead of Products.

stage9 (1).png

  • Build the app
      cordova build

  • The Kapsel command line provides a way to create a zip file that could to uploaded to HCPms. Open a command prompt and change path to


  • Run command
      npm install -g

        For Mac:

      sudo npm -g install

  • Open command prompt and change the path to your Kapsel project (C:\Kapsel_Projects\StagingDemo) and execute the command
      kapsel package


    Now you could find a zipped file created inside your project folder.

    stage10 (1).png

  • Next step is to upload the zipped file to HCPms. To upload the file open HCPms home page then click on Applications > Choose your application > Configure > App specific settings. Then click on Upload Kapsel and browse the zipped file.

    stage6 (1).png

  • Choose the application uploaded, then click on Stage. It moves the application to stage state. Which will be accessible to the users who are testers.

    stage11 (1).png

Test App on Emulator or Device

Now, when we close and reopen the app the AppUpdate plugin identifies that there is an updated app in the server. It gives a pop up for relaunching the app to download the changed files from server.

  • Choose Relaunch Now. You could see that the list is changed from Products to Suppliers.

    stage7 (1).pngstage12 (1).png

After testing the application, from admin cockpit choose the application under Stage state, then click on Deploy, which will make the application available for users in production.


SAP Technology RIG

Be the first to leave a comment
You must be Logged on to comment or reply to a post.