Skip to content

OData Overview

The Mobile Development Kit for SAP Mobile Services provides Open Data Protocol (OData) functionality for developing offline and online mobile applications that use SAP Mobile Services.

The Mobile Development Kit provides actions and APIs that allow developers to leverage OData capabilities, while hiding the interaction details with OData services, to parse OData payloads, produce OData requests, and handle OData responses.

An offline application defines OData queries to retrieve data from a back-end OData service when online to create an offline store. Once created, the offline store serves as a (local) OData service regardless of network connectivity availability and synchronizes with back-end OData services via upload/download when network connectivity is available.

If your application requires up-to-date back-end data and operates in areas with reliable connectivity, you may not need to create an offline store and may opt to operate in online mode only. In online mode, if you cache data locally for optimization purposes, you are responsible for handling data concurrency.

Mobile Development Kit supports OData Version 2.0 and 4.0 in both online and offline mode.

See Offline API for more information.

About the Code Samples

The code samples in this document use a simple event management OData service with the following entity types: User, Event, Session, UserSessionAgenda, Feature, GlobalTheme and Track. Each event may have a theme, is associated with a set of features, and contains a set of sessions as well as tracks. Each session has an associated track. A user session agenda indicates the registration of a user to attend a particular session.

A relationship involves two entity types, but there can be more than one relationship between them. In the event management OData service, there is a one-to-many relationship (Event_Session_One_Many0) between Event and Session, enabling navigation from one event to associated sessions. This implies that we may also navigate from a session to its associated event, but that is not always the case. There is also a many-to-zero-to-one relationship (Session_Event_Many_ZeroToOne1) between Session and Event, enabling navigation from a session to an event. Note that Event_Session_One_Many0 and Session_Event_Many_ZeroToOne1 are two different relationships: neither one implies or can replace the other.

The corresponding entity sets are Users, Events, Sessions, UserSessionAgendas, Features, GlobalThemes, and Tracks.

See Sample Service OData Metadata for complete details.


Last update: May 17, 2022