What is OData?
OData (Open Data Protocol) is a standard protocol used to create and consume RESTful APIs. In SAP, OData services allow external applications to access SAP business data securely and efficiently.
OData is commonly used with:
- SAP Fiori Applications
- SAPUI5 Applications
- SAP Business Technology Platform (BTP)
- Mobile Applications
- Web Applications
Step-by-Step Procedure
Follow the steps below to model your first OData Service in SAP Gateway.
Step 1: Open Gateway Service Builder

Go to Transaction Code SEGW (Gateway Service Builder) in the SAP system.
This tool is used to create, manage, and generate OData services.
Step 2: Create a New Project

Click on Create Project.
Provide the following information:
- Project Name
- Description
- Package
After entering the details, click OK.
Your OData project will be created successfully.
Step 3: Project Structure

Once the project is created, you will see several artifacts such as:
- Data Model
- Service Implementation
- Runtime Artifacts
These components are used to define and implement the OData service.
Step 4: Import DDIC Structure

Now we will create the Entity Type from an existing ABAP structure.
Right click on:
Data Model → Import → DDIC Structure
Provide the following details:
- Name: SalesOrder
- Object Type: Entity Type
- ABAP Structure: SNWD_SO
- Enable Create Default Entity Set
Click Next.
Step 5: Select Fields for OData Service

You will see a list of fields from the SNWD_SO structure.
Select the fields you want to include in the OData service and click Next.
Step 6: Define Primary Key

Choose SO_ID as the Key Field for the entity.
Click Finish.
Now the Entity Type will be created successfully.
Step 7: Verify Entity Set

Expand the Data Model section.
You will now see the newly created:
- Entity Type: SalesOrder
- Entity Set: SalesOrderSet
You can also view all the properties associated with the entity.
Step 8: Generate Runtime Objects

Click on the Generate button to generate the service runtime objects.
This process creates the required:
- Model Provider Class
- Data Provider Class
- Technical Service Objects
Step 9: Confirm Generation

Click OK to confirm the generation process.
The system will now create all the necessary OData service artifacts.
Step 10: Service Generated Successfully

After generation, the service will be available in the system with all required objects.
You can now proceed to:
- Implement the service logic
- Fetch data from database tables
- Test the service in SAP Gateway Client
Conclusion
Congratulations! 🎉
You have successfully modeled your first OData Service using SAP NetWeaver Gateway Service Builder (SEGW).
In the next tutorial, we will learn:
- How to implement the OData service
- How to write ABAP code to fetch data from database tables
- How to test OData services using Gateway Client
Stay tuned for more SAP NetWeaver Gateway and OData tutorials.
If you found this tutorial helpful, feel free to share your feedback in the comments.
you may be interested in this blog here:-
Don’t Fear the Update: Navigating the Challenges of how to implement sap note
Five Top Technology Investment Drivers for 2024
How many dollars worth of RSU does Salesforce typically offer an MTS (experienced hire) on joining?
Integration cloud system to HANA Cloud Platform using Cloud Connector

WhatsApp us