Skip to Content
0
Aug 19 at 12:27 AM

MDK Offline Entity not being update when changing data from Backend

278 Views Last edit Aug 19 at 12:38 AM 4 rev

Hi experts.

I’m currently working on an offline APP on MDK 5.2. I created a new ODATA Service on S/4 Hana and everything works fine on SAP Gateway.

When I create a new offline entity and sync, everything works fine. But when backend changes some fields from entity, it is not being updated in offline store. Looking at SAP Gateway trace log related to mobile call all data is up to date.

After that I created a new MDK Service as follows: (

Destination is created on Mobile Service as follows: (SCREENSHOT 2)

(SCREENSHOT 3)

Following are my Initialize Action. The offline Download action has the same requests.All Entitysets works fine except ModeloSet and MedicaoHeaderSet.

(SCREENSHOT 4)

When I initialize or Download data, SAP Gateway trace returns correct data.

SAP Gateway Trace on Initializing. (Guid and IdMedicao are key fields). Look at “Status” field with the value “B”

(SCREENSHOT 5)

But when accessing that from MDK Application the value from field “Status” is wrong. Look at this Rule when debugging from VSCode Debugger.

(SCREENSHOT 6)

The entity was created by MDK App correctly with value “R” and synced successfully. After that, the Status was changed by a backend program. ODATA values reflect all changes, but MDK Offline data is not being updated.

I’ve tried several devices and simulators(Android and IOS) with no success. Even if I reset or try a fresh new device, the first sync brings old data.

Could anyone help me to solve this? I’m really stuck on that. Apparently it occurs on BTP layer, but I’m not sure.

Thank you so much,

Fabio Purcino

Attachments

screenshot1.png (114.9 kB)
screenshot2.png (210.7 kB)
screenshot3.png (219.8 kB)
screenshot4.png (289.9 kB)
screenshot5.png (630.8 kB)
screenshot6.png (552.5 kB)