OData: Communication between SAPUI5-Apps and SAP Backend

The Open Data Protocol (OData) is a web protocol based on the REST principle (Representational-State-Transfer) and is used to process requests and updates of data from various sources in the SAP backend system. It mainly uses web technologies such as HTTP (Hypertext Transfer Protocol), XML (Extensible Markup Language) and JSON (JavaScript Object Notation).

SAPUI5 applications do not access the backend system directly, but via the SAP Gateway Client, which provides the OData service. The creation of OData services as well as the integration of CDS views take place in the SAP NetWeaver Gateway Service Builder (SEGW). In addition, associations can be defined, for example to link different Entity Sets and thus enable Deep Entity Sets and Expands. Further, it is possible to define selected smart controls such as smart tables for the frontend already in the OData service, through annotations.

An OData service can be addressed via the SAP Gateway Client. The call is made via URIs (Uniform Resource Identifiers), which determine which OData service is called with which data model.

According to the REST guidelines, the call of the OData service is permitted by the following requests:

  • GET: Determine a single entry or a list of entries.
  • POST: Create a new entry
  • PUT: modify an existing entry
  • DELETE: Delete an existing entry
  • PATCH: Update individual attributes of an existing entry

The use of OData is recommended for mobile applications, as this service is particularly flexible in terms of data origin, platform use and standards for use.