Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ujjwal16
Participant
31,913
Introduction

Open Data Service (ODATA Service) is an Open Protocol to share data. ODATA will let client access information exposed by any data source. Even a simple web browser can access data through ODATA Service. It will use well know technologies like HTTP, JSON etc.

ODATA Service can be used freely without license or Contract. It is also extensible which allows to add data types from ABAP Dictionary.

SEGW is the transaction to build a service in SAP.  Building Service involves several steps and here in this document we will understand all the segments available or appear when we generate a service which is later used to generate ODATA.

Below segments can be seen when we are creating a project in SEGW.



Entity Types:

It is like structure or table type which we create in our ABAP reports.

Properties and Navigation Properties comes under this only, that hold name of columns or fields and the connection respectively.

Entity Sets:   

It is table which we create in our reports by giving reference to the structure and this will hold physical value like other tables. e.g type standard table of (ref. to a structure).

Navigation: 

Define connection between one entity to another. Remember this only defines the connection/path.

Association: 

This defines the relation between two entity set for which path is defined.

Note:

Navigation helps in defining the connection/path and Association defines what would be the relation like 1:1, 1: N, N: 1 or N: N.

Association Set:

This comes in picture when we have to perform operation like Joining or need different combination of data from all entity set. e.g. If there is table inside table then that can be defined here.

Service Implementation: 

This tells us about the services that can be performed with the entity.



Under Service Implementation node following two GetEntity (Read) and GetEntitySet (Query) can be found along with Create, Delete and Update.



GetEntity: To read one record of data i.e. record specific to an entry.

This is like SELECT SINGLE in our ABAP Report

GetEntitySet: To read more than one record.

This is similar to SELECT *

Runtime Artifacts: This node has following 6 sections.



DPC (Data Provider Class) :

Original codes that gets generated after the project is registered (register is similar to activate in our report programs) are available here in the DPC section.

DPC_EXT (DPC Extension) :

DPC is extended here, all custom logics are added here in DPC_EXT section.

MPC (Model Provider Class) : Table structures can be changed at runtime.

e.g. If header has 40 columns but at runtime only 20 needs to be displayed.

another example, if we need to change the data color to red blue or any.

MDL : Final model will be available in MDL.

SRV : 

Once Project is created and OData service is  registered a 'Service Name' will be generated that is hold by SRV.

While accessing this project from FIORI or UI5 application this service name will be used.

Service Maintenance: 

When project is generated then we can register or maintain the service from Service Maintenance.
6 Comments
Labels in this area