cancel
Showing results for 
Search instead for 
Did you mean: 

Load recent updated records in Sapui5 from oData

0 Kudos

Say you have implemented a get entityset which brings all the plant records and displayed it in the SAPUI5 app. Now someone in the ECC added a new record, I need to monitor any changes and fetch only the recent updated records to improve performance.

I searched for blogs like etag but unable to find the blog which guides me to implement that oData method and control it in SAPUI5 to fulfill my requirements

Code and Screen shot to implement this scenario would be great helpful.

junwu
Active Contributor
0 Kudos

etag has nothing to do with that.

what you are thinking? improve performance by pulling only recently changed?

what is your scenario?

0 Kudos

Say you have displayed 10 plants in F4 option in SAPUI5 app. Now a new plant is added which is a 11 th record created from ECC.

Now will you call the get entity set again to fetch 11 records setting a timeout 2sec. Or is there any approach that json model/ODATA model recognises changes made in ECC and pulls recent addition records from the get entityset.

Consider above scenario and if some logic can fetch only 11 th record and update that in the model that would significantly increase app performance

junwu
Active Contributor
0 Kudos

that is just your imagination..... it only makes complicated.

how about the deleted one, updated one........

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Sagar,

I think the SAP Gateway Delta Query might solve your problem, but not sure the UI5 Framework support it.

How to Implement Basic Delta Query Support in SAP NetWeaver Gateway

Otherwise, you have to implement it on your own: You add a timestamp (new column in the db table) for each record once they add/modified/delete.

Let say, after you first get the 10 records from backend, you store it in a local JSON model for display and save the current system timestamp on your UI side.

For the refresh, you send a odata request by filtering the timestamp greater than the last one. And merge the results(add/modify/delete) into the local JSON model.

I hope it could help you.

Answers (0)