Skip to Content
Author's profile photo Claudia Polster

How To Create the offline Fiori CRM App Part 4

1. Create the Connection at HCP a

2. Create the Connection at HCC if you use the HCC a

3. Prepare your Application at the HCPms a

4. Get an SAP Mobile Secure Account a

5. Create an Android Signing ID a

6. Get you SAP Mobile Secure Cloudusername and password a

7. Download the packager

8. Prepare the appconfig

9. Package the App

10. Create the Cordova App

11. Download it from your SAP Mobile Secure Account and run it

7. Download the packager

Prerequisite: you have installed npm, node.js.

In this particular case I have: npm version 2.7.4, node version v0.12.2.

Download the latest version of the packager which is included in the Kapsel SDK


Unzip this to a folder. The final folder should look like here:


Create a folder when you will execute the packager (here: PackagedApp).

The sources will be downloaded to it and the app will be generated.


8. Prepare the appconfig

Copy the appConfig.js file to your work directory (example folder “PackagesApp”)

(I’ve attached my appconfig to this blog)

Adapt it:

Enter the appID and appName which you define at step 3

Enter your SigningID(step 5)

Your HCPms URL

Choose which Apps you want to download


fiori_client_appConfig = {

    “appID”: “”,

    “appName”: “MyContacts”,

    “appVersion”: “0.1”,

    “bundleID”: “”,

    “androidSigningID”: “b6XXXXXXXXXXXXXXc8”,


“fioriURL”: “https://hcpms-<yourD-User>”,

“fioriURLIsSMP”: true,

“certificate”: “”,

“autoSelectSingleCert”: false,

“passcodePolicy”:  {












“prepackaged” : true,

“offline”: true,

“singleApp” : “”,

    “applications”: [{

                    “id”: “cus.crm.mycontacts”,

                    “intent”: “ContactPerson-MyContacts”,

                    “title”: “My Contacts”,

                    “url”: “/sap/bc/ui5_ui5/sap/crm_mycont”

                    }, {

      “id”: “cus.crm.myaccounts”,

                    “intent”: “Account-MyAccounts”,

                    “title”: “My Accounts”,

                    “url”: “/sap/bc/ui5_ui5/sap/crm_myaccounts”

                    }, {

                    “id”: “sap.cus.crm.lib.reuse”,

                    “url”: “/sap/bc/ui5_ui5/sap/crm_lib_reuse/sap/cus/crm/lib/reuse”,

                    “reuse”: true,

                    “scenario”: true




Your folder structure might look like this:


Open terminal and do following commands to prepare the packager:

cd H:\Desktop\FioriApps\CRM\smp-plugins\apps\packager

Run the following commands (If this is your first use with this packager version):

npm install

npm config set proxy <protocol>:://<proxyhost>:<proxyport>

npm config set https-proxy <protocol>:://<proxyhost>:<proxyport>

9. Package the App

Do following commands to create a package.

This will download the sources (sapui5 and application) from the given server

Note: On mac the packager will need executable permissions which can be added by running with the bin directory: sudo chmod 755 packager

cd H:\Desktop\FioriApps\CRM\PackagedApp

node ../smp-plugins/apps/packager/bin/packager –config appConfig.js –targetDir CRM –host –port 50081 –https –force –cleanAppCache –user <CRM-username> –password <CRM-password>


Now you should have downloaded sources with the applications and sapui5. This should be your folder structure


With this structure you can create a cordova app.

10. Create the Cordova App

This command creates a package, reading for uploading and building, on the cloud build server.

node ../smp-plugins/apps/packager/bin/packager –config appConfig.js –targetDir CRM –cloudHost –cloudUser <yoursapmobilesecureuser> –cloudPassword <yoursapmobilesecurepassword> –cloudProxy createpackage


This command uploads the assets that have been downloaded from the Fiori front-end server to the cloud build server, including the splash screen definitions and icons that represent the application on the device home screen.

node ../smp-plugins/apps/packager/bin/packager –config appConfig.js –targetDir CRM –cloudHost –cloudUser <yoursapmobilesecureuser> –cloudPassword <yoursapmobilesecurepassword> –cloudProxy uploadpackage


This command initiates the build on the SAP Mobile Secure cloud build server.

node ../smp-plugins/apps/packager/bin/packager –config appConfig.js –targetDir CRM –cloudHost –cloudUser <yoursapmobilesecureuser> –cloudPassword <yoursapmobilesecurepassword> –cloudProxy startbuild


Use this command during a build to check the build status.

node ../smp-plugins/apps/packager/bin/packager –config appConfig.js –targetDir CRM –cloudHost –cloudUser <yoursapmobilesecureuser> –cloudPassword <yoursapmobilesecurepassword> –cloudProxy status


11. Download it from your SAP Mobile Secure Account and run it

After this your app will be created and you will be notified via e-mail. You can download this app directly using the link in the e-mail.


After the Installing open the App, enter your Fiori Username and Password.

Have fun with you offline app 🙂



Note: In the packaged app after store initialization the Launchpad is shown but the apps are not displayed? Go to your downloaded App folder (here: H:\Desktop\FioriApps\CRM\PackagedApp) and in the ushellconfig.js change “isDefault: false” to “isDefaultGroup: true“.

Assigned Tags

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