Skip to Content
avatar image
Former Member

Fiori offline app works online but local store on the device is not created

I have used SAP WEb IDE on Cloud platform and (project from sample application – Approve Purchase Order) using Fiori mobile cloud build service. I have successfully build and tested it online, but the offline capability doesn’t work, and I also don’t see that the initial “local store being provisioned” step. Below are my lines of code have added for your reference and kindly help

Scenario.js(created under offline folder in SAP WEB IDE)

jQuery.sap.declare(“nw.epm.refapps.purchaseorders.approve.offline.Scenario”);jQuery.sap.declare(“nw.epm.refapps.purchaseorders.approve.offline.Scenario”);nw.epm.refapps.purchaseorders.approve.offline.Scenario = {// The init function can be used to manipulate the local launchpad or for an time // based sync mechanismus (sync every 5 Minutes). init: function () {
}};

manifest.json(the below code added just above sap.ui″)

“sap.mobile”: { “sap.mobile”: { “_version”: “1.1.0”, “scenario”: “nw.epm.refapps.purchaseorders.approve.offline.Scenario”, “definingRequests”: {}, “stores”: [ { “name”: “PurchaseOrders”, “serviceRoot”: “/sap/opu/odata/sap/EPM_REF_APPS_PO_APV_SRV/”, “definingRequests”: { “PurchaseOrders”: “/PurchaseOrders”, “PurchaseOrderItems”: “/PurchaseOrderItems” } } ] }

ACF file

{{ “applications”:[ { “id”:”nw.epm.refapps.purchaseorders.approve”, “cloudComponentId”:”nwepmrefappsextpoapvsub”, “url”: “/sap/fiori/nwepmrefappsextpoapv”, “scenario”:true }], “appconfig”:{ “offline”:true } }

Kindly advice

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Nov 20, 2017 at 05:17 PM

    Hi Khaja Azizuddin,

    Did you found any solution for this.

    Regards,

    Sharique

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2017 at 04:28 AM

    Not yet

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 27, 2017 at 01:55 PM

    Looks like your manifest entry is incorrect, you should not have sap.mobile defined twice. Please see the following blog series for more info.

    https://blogs.sap.com/2017/03/22/make-offline-app-using-sap-cp-mobile-service-for-sap-fiori-part-1/

    Regards,

    Jamie

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Jamie

      Sorry for my late reply, we had public holidays here so could not check my code.

      The code is fine, had a typo while creating this message. Infact I have follwed the same blog but store issue still exists. Let me if I have to check any more settings

      Thanks

  • Dec 04, 2017 at 05:00 PM

    Are you sure you are using the correct service? I just generated the sample app and mine is using the service

    /sap/opu/odata/sap/SEPMRA_PO_APV/

    not

    /sap/opu/odata/sap/EPM_REF_APPS_PO_APV_SRV/

    Regards,

    Jamie

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 06, 2017 at 09:16 PM

    Just ran through the scenario using iOS and see the offline store being created, but receive an error due to the some of the id fields missing a maxlength, which is required for the store to be created. It would require you to fix these in the service to be able to utilize this scenario.

    I do notice some other difference in your manifest...

    1. The minUI5Version defined in my project is 1.44.17

    2. The rootView defined in my project is nw.epm.refapps.purchaseorders.approve.view.App

    So maybe you are using an older version of the sample?

    Regards,

    Jamie

    Add comment
    10|10000 characters needed characters exceeded

    • What is your goal with this app? As I mentioned above, the odata service as it is written now, is not compatible with the offline functionality due to missing field attributes. If this is for learning purposes then you may want to use the sample described in the blog.

      Regards,

      Jamie