cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data in offline store

CRVMANISH
Contributor
0 Kudos

Hello Experts,

Jitendra Kansal

Midhun VP

We have developed an app in SAPUI5 using Web IDE deployed on SMP on-premise version.

We have used kapsel , webide UI5 template , we need to store data in model or offline store irrepective of its network status offline or online,  means store the data and then post or put method will be called based on condition.

Please suggest...

Please suggest.

Regards

Manish

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Hi Manish,

Your requirement is exactly what kapsel offline plugin do right. Or you have any change from the standard offline feature kapsel provides?

Regards, Midhun

SAP Technology RIG

CRVMANISH
Contributor
0 Kudos

Whenever the app is online it post directly to backend.

We need to store data first then post on required condition.

What is the method to store data first in model or db then post?

Regards

Manish..

chinna_babu2
Active Participant
0 Kudos

Hi Manish,

After the offline store opened successfully call the applyHttpClient method. From here onwards any http calls (get, put, post and delete) will be executed in offline store only.


sap.OData.applyHttpClient();

to update the data to backend call store.flush method.

Regards,

Murthy

midhun_vp
Active Contributor
0 Kudos

Hi Manish,

Narasimha is right, you have to use applyHttpClient() method to do the operations in the offline mode. This is explained in the guide: http://scn.sap.com/docs/DOC-58063

Regards, Midhun

SAP Technology RIG

CRVMANISH
Contributor
0 Kudos

http://scn.sap.com/people/midhun.vp

http://scn.sap.com/people/chinna.babu2

We have scenario where certain information need to be posted only after meeting the validation .Example : Onclick of  button 1 we need to perform some operation but should not update in backend it should update only offline store and on another button click 1st operation and 2nd operation data should be posted on backend if online, this should happen irrespective of network online or offline.

Regards

Manish

midhun_vp
Active Contributor
0 Kudos

Hi Manish,

I would request you to go through this guide to understand how offline kapsel plugins works:

The above requirement could be achieved.

Regards, Midhun

SAP Technology RIG

Answers (1)

Answers (1)

midhun_vp
Active Contributor
0 Kudos

Is this issue resolved ?