Skip to content

Overview

The SAPOfflineOData framework retrieves data from a back-end OData service when an application is online, then creates an offline store that is initialized and populated with a subset of the data.

The subset is specified using a series of OData read requests known as defining queries. Individual defining queries may include entire entity sets, or they may include a filter, which retrieves a subset of the data in the entity set.

Device users can query and manipulate (create, update or delete) the local data, then later upload any changes made locally to the back end. The SAPOfflineOData framework also does the following:

  • Initializes and creates the offline store.
  • Sends pending modification requests from the client to the mobile service and from the mobile service to the back end.
  • Refreshes the offline store as needed.
  • Removes data from the offline store, deletes the offline store, and releases resources after the last use of the offline store.

The SAPOfflineOData framework is your best choice if you have unreliable connectivity or if back-end data is infrequently updated. An example of an offline application is one that is used by field service personnel, who download service information and data from the back end at the beginning of a day, make changes to the offline data throughout the day, then upload the modification requests to the back end at the end of the day.

In general, offline scenarios require more thought and planning in terms of performance, data volume, and error handling.

Note

An offline application always accesses the data that is stored in the offline store, regardless of whether the device is connected to the network. It does not automatically sense whether it is connected to the network. You must choose at design time whether the application is online or offline and develop it accordingly. Switching between online and offline modes may result in data loss.

Application developers determine when users are allowed to upload and download; for example, automatically, based on a schedule and/or network availability, or you allow the users to upload and download data whenever they choose. You may choose to chain the upload and download together, you may choose to have them be completely independent, or you may choose to have greatly different rates at which those operations are performed. Think through how these decisions will impact your users and back end and be sure to fully test the impact your decisions have on them.

See Offline Applications Overview for information about how offline applications fit into the SAP Business Technology Platform landscape.

Note

In addition to this guide, you can follow tutorials, beginning with Introduction to Offline OData tutorial, to implement an iOS offline application.


Last update: November 18, 2021