cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling and configuring MDK Offline Paging

cabraldaniel
Explorer
0 Kudos
348

Hi!

We've developed an MDK solution and need to activate paging for the offline sync due to the amount of data we're dealing with. Where we can activate it and configure the page size? I'm been searching here Defining Offline Settings for Applications - SAP Mobile Services Documentation and similar configurations, without success.

Can anyone give us a tip? 😄

Thanks in advance!

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos
cabral.daniel

Are you looking to define the page size in your MDK app? Do you want to load the first 'n' number of records when the page loads?

Accepted Solutions (1)

Accepted Solutions (1)

cabraldaniel
Explorer
0 Kudos

Hi Bill!

I've found a solution! I was trying to find a MDK-only solution (client-side paging), without success. In our CAP backend, I've fixed the max page size in the parameters cds.query.limit.default and cds.query.limit.max.

Playing with these we found a good number who won't hurt the non-MDK users (UI5 pages, for example).

Thank you!

Answers (3)

Answers (3)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you referring to the initial download of lots of data being too large? If so, you will need to look at your odata service and how it is handling the return to send it back in chunks instead of trying to return all the data at once. The request from MDK can still be to offline an entity set for example of say 10000 records (or more). However when the server responds to that request it can break it into "pages" so that at the end all 10000 records are retrieved but only a subset are sent at a time.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can define the PageSize to fetch data under DataPaging properties of a container control (e.g. Object Table)

https://help.sap.com/doc/3642933ef2e1478fb1578ef2acba4ae9/Latest/en-US/reference/schemadoc/definitio...

By default, it loads first 50 records.

cabraldaniel
Explorer
0 Kudos

This works to the offline syncing?

cabraldaniel
Explorer
0 Kudos

Hi Jitendra!

Exactly! My app has reached the 128mb body size limit (already filtered) and we need to enable and adjust page size in our MDK app, but I haven't found anything in documentation instructing how to do it.