You are on page 1of 2

SAP ODATA Services

Scenario: For a rich UI experience, user opted for .Net based UI technology but for
security point of view user wants to use SAP backend data, in this scenario .Net
team will ask for SAP data to be displayed on their UI screen and certain CRUD
(Create, Read, Update, Delete) operations will take place on .Net side then based on
those actions we need to alter our SAP backend data. Sometimes data amount can
be huge so an effective light weight service is required to control request and
response. For this we may go for SAP Odata services and after creation those
services we can give service name to the requested team (here .Net).
Before knowing SAP ODATA we should familiarize with few terms.
Web Services: Web services are client and server applications that communicate
over the World Wide Webs (WWW) HyperText Transfer Protocol (HTTP). As described
by the World Wide Web Consortium (W3C), web services provide a standard means
of interoperating between software applications running on a variety of platforms
and frameworks. Web services are characterized by their great interoperability and
extensibility. Web services can be combined in a loosely coupled way to achieve
complex operations. Programs providing simple services can interact with each
other to deliver sophisticated added-value services.
OData: OData (Open Data Protocol) is an OASIS standard that defines the best
practice for building and consuming RESTful APIs. OData helps you focus on your
business logic while building RESTful APIs without having to worry about the
approaches to define request and response headers, status codes, HTTP methods,
URL conventions, media types, payload formats and query options etc. Additionally,
OData provides facility for extension to fulfil any custom needs of your RESTful APIs.
OData RESTful APIs are easy to consume. The OData metadata, a machine-readable
description of the data model of the APIs, enables the creation of powerful generic
client proxies and tools. Some of them can help you interact with OData even
without knowing anything about the protocol.
Creating ODATA service
To create SAP ODATA service transaction code is SEGW(SAP NetWeaver Gateway
Service Builder).
Create New Project.
Create Data Modal-> entities, entity sets. Entity is like a structure and Entity sets
are like Table type for that Entity. Define Key values for each Entity.
Complete steps can be find in the links provided in References section.
After creation of Entity and Entity Sets save and Generate Run time object.
After that we need to Register and activate the service. For this we need to click on
Service Maintenance proceed and click on Register button. After confirming

default checks your ODATA service is activated and ready to display metadata of the
service.
All standard CRUD operations can be covered using Odata services and custom
operations can be done

You might also like