Gregor Wolf
OData Services
with SAP
REST
Stands for Representational State Transfer
Client-Server
Statless
Caching
Multi-Level systemes
Uniform interface
Uniform interface
Resource identification in requests
Resource manipulation through representations
Self-descriptive messages
Hypermedia as the engine of application state (HATEOAS)
OData - Open Data Protocol
OData
V4 ia a OASIS Standard since March 2014
Based on Standards like REST, RSS, Atom, XML and JSON
Provides a uniform interface to data sources (Query + CRUD + Actions)
Allows application integration using Internet technologies
Available for SAP since May 2011 as SAP NetWeaver Gateway (today SAP Gateway)
SAP Gateway
SAP Gateway is part of SAP NetWeaver ABAP since 7.40
Allows to connect from Browser, Devices and Plattforms to SAP Systemen
Implements OData v2 and starting with 7.50 also v4)
Can run as a Hub system or embedded i.e. with SAP ERP as an Add-on
SAP Gateway - service implementation
ABAP OO
Core Data Services (CDS, minimum 7.50, AnyDB)
SAP Gateway - Architecture
Steps to an OData Service with SAP Gateway
Activate SAP Gateway in STC01
(Tasklist SAP_GATEWAY_BASIC_CONFIG)
Define interface in SEGW
(Entities, Entity Sets, Function Import)
Implement Model- and Data-Provider classes
Activate Services in /IWFND/MAINT_SERVICE
Comparison with other SAP Technologies
iDoc
mass data, asynchronous processing
RFC
SAP to SAP connections (also used in SAP Gateway)
OData
Easy to understand HTTP(S) API, synchronous processing
Benefits of OData (1 of 2)
SAP is basing S/4HANA on it
Humans can understand the interface
Tight integration to SAPUI5
Benefits of OData (2 of 2)
Push and Pull (Queue) for Backend changes
Access SAP Data from non SAP programming languages
Various uses of the data provided
Drawbacks of OData
Backend must be reachable
Only synchronous processing