Open Data Protocol also commonly called as OData, an interface which can be consumed by any application, program, software or device of the Non-SAP World that can connect with SAP using the HTTP(s) protocol. It can do all the manipulations such as Read, Write, Modify and Delete. Since it uses HTTP based protocol, any programming language with HTTP stack can be used to consume OData services.
OData is currently the default way to communicate with an SAP backend, be it for SAPUI5 or MuleSoft or any other frontend or may be for any other integration scenario. The goal of this document is to get an ABAP developer up and running with the understanding and implementing OData services in an SAP ABAP-based backend system.
In SAP, OData can be created using different framework :-
1) SEGW – Gateway Framework.
2) BOPF (Business Object Processing Framework) Framework
3) RAP (RESTful Application Programming) Framework
4) SADL (Service Adaptation Description Language) Framework.
We will discuss all the 4 different ways to create an OData service one by one in the subsequent posts.
OData services can be tested using either of the tools –
1) SAP’s own Gateway Client – Use tcode – /n/IWFND/GW_CLIENT
1) POSTMAN. Get postman from – https://www.getpostman.com/downloads/
3) Curl. Get Curl from – http://curl.haxx.se/
We will further discuss how to implement the below methods and the scenarios when they get called.
1) Create_Entity – POST method to create an entity
2) Get_Entity – GET method to read an entity (single record)
3) Get_Entityset – GET method to read an entityset (multiple records)
4) Update_Entity – PUT/PATCH/MERGE method to update an entity
5) Delete_Entity – DELETE method to delete an entity
6) Create_Deep_Entity – POST method – When we need to pass multiple item data for a single header. Example – creation of sales order wherein we need to pass header data, item data, partner data, schedule lines data. For a single header data we will have multiple item, partner and schedule lines data.
7) Get_Expanded_Entity – GET method – when we need to read a single deep entity structure
8) Get_Expanded_Entityset – GET method – when we need to read multiple deep entity structure
9) Execute_Action – POST method – When we need to use Import Function
10) Get_Stream – GET method – When we need to read/download the media from the frontend.
11) Create_Stream – POST method – when we need to upload media to the frontend.
12) Delete_Stream – DELETE method – When we need to delete the media which was earlier uploaded
13) Update_Stream – When we need to upload a new media to the frontend which will replace the existing media
Below 5 methods are used for BATCH processing – Always POST method is used for Batch.
1) Changeset_Begin
2) Changeset_End
3) Changeset_Process
4) Batch_Begin
5) Batch_End
This is just the introduction of OData with some theoretical concepts. In the subsequent topics we will deep dive in the actual practical scenarios of OData.
Seems interesting guys !!! Let go and implement our first OData service.
NOTE:- Do let us know if you want us to develop an OData service. Just contact us and provide the functional document along with some test data. We will be more than happy to complete your development along with the dev testing. Everything we do will be for FREE & FREE !!!
Guys, Excited… just click HERE