Skip to Content
avatar image
Former Member

SMP3.0 SP08 - Offline Store Sync with OData (Limited set of records)

Dear Experts /Claudia Pacheco /Jitendra Kansal/,

                I am facing a problem , I have already developed Native Android OnLine/OffLine App on SMP3.0 SP05 . It was working fine in Online and Offline both in SMP SP05. Few days back basis updated the patch from SP05 to SP08. The App is working fine in online Mode but in Offline Store I am getting very limited set of records i.e. 5 or 6 only records on my mobile device, while prior to this in SP05 there was no problem (whatever I was getting in online mode I was able to see them in offline mode). However i have rechecked the code for sync (flush & refresh).

Please Help to resolve this issue.

Thanks & Regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 16, 2015 at 10:29 AM

    Hi Sarvesh,

    Please note the below points:

    • You need to upgrade your app with the updated SDK.
    • If no maximum length is defined for the key property, you have to define it if the property's data type is string. This change is needed when you are upgrading from sp05. If you go to the metadata of the document you will find whether maxlength is defined for the key attribute.
    • You don't need to recreate the local db in your device. The new sdk will automatically patches the local db.
    • Provide the server logs after changing the offline component to debug mode.

    Regards, Midhun

    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Midhun,

      After debugging my code I found some different behavior in my application , we found createOfflineStore always null with SP08 in offline although we created it successfully in Online Mode. But with SP05 this store is found not null after created successfully in OnLine Mode.

      if (createOfflineStore == null) {

         try {


        LogonCoreContext lgCtx = LogonCore.getInstance().getLogonContext();

         String endPointUrl = "http://URL/VALUE_CreateLead_CONN";

         URL url = new URL(endPointUrl);

        ODataOfflineStoreOptions options = new ODataOfflineStoreOptions(); = url.getHost();

        options.port = String.valueOf(url.getPort());

        options.enableHTTPS = lgCtx.isHttps();

        options.serviceRoot = endPointUrl;

        IManagerConfigurator configurator = LogonUIFacade.getInstance().getLogonConfigurator(context);

        HttpConversationManager manager = new HttpConversationManager(context);


        options.conversationManager = manager;

        options.storeName = "VALUE.Crt";

        options.enableRepeatableRequests = false;

         options.definingRequests.put("cms_RetailOutletData", "cms_RetailOutletData");

         createOfflineStore = new ODataOfflineStore(context);



         offlineStoreResult = true;

        } catch (ODataException e) {

         throw new OfflineODataStoreException(e);

        } catch (Exception e) {

         throw new OfflineODataStoreException(e);


        } else {

         offlineStoreResult = true;




  • avatar image
    Former Member
    Oct 23, 2015 at 07:58 AM

    Hi /Claudia Pachecot

    Can you please guide .



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Claudia Pacheco

      Hi Claudia,

      As suggested above, I have updated the patch level to PL08 for SDK SP09. But still facing the same issue, but I like to tell you one thing here that I am able to login in offline mode, probably that is because it is handled by MAF, however the same way offline store is created & synced in online for the same (Login). But afterward next level of stores are fetching limited sets of records i.e. 6 records, as mentioned above.

      On the filtering part, in both the cases (Online/Offline) I'm using the same filter criterion, because I need the filtered data to be on device. So the count should be same in both the cases.

      Now on options.serviceRoot= "", it is not giving any error, probably I was referring it incorrectly earlier. But now this okay and I keep the code as you suggested.

      I have already suggested client to raise the incident. However, I am still confused on the behavior of App, because "Login" offline shows this store is created successfully and synced correctly, but next level of stores are created perfectly but not appropriately synced.


      Warm Regards