ODATA
Introduction
[Link] (Open Data Protocol) is a REST-based standard
protocol used to expose SAP business data to external applications
through HTTP services.
It provides a standardized method for creating, reading, updating,
and deleting data from SAP systems.
OData is widely used in SAP Fiori, mobile applications, web
applications, cloud applications, and third-party integrations.
It is built on top of REST architecture and uses HTTP methods for
communication.
OData enables external applications to securely access SAP
business data using standardized URLs and query options.
[Link] Do We Use OData?
The primary purpose of OData is to provide a simple and
standardized method for integrating SAP with external systems.
Benefits
• Easy integration with external applications
• Standardized communication method
• Faster and lightweight data transfer
• Supports JSON and XML formats
• Reduced custom development effort
• Ideal for SAP Fiori applications
• Supports real-time data access
3. Relationship Between REST API and OData
REST API is an architectural style used for communication
between systems.
OData is a protocol built on top of REST.
REST defines how communication occurs, whereas OData
provides additional standard query capabilities.
Formula
OData = REST + Standard Query Features
4. Difference Between OData and SOAP
Feature OData SOAP
Architecture REST-Based Protocol-Based
Data Format JSON/XML XML Only
Performance Faster Slower
Payload Size Lightweight Heavy
Mobile Support Excellent Limited
SAP Fiori Support Widely Used Rarely Used
Custom Development
Query Features Built-In
Required
Development
Low High
Complexity
5. SAP OData Architecture
External Application
↓
SAP Gateway
↓
OData Service
↓
SAP ECC / SAP S/4HANA Database
6. Prerequisites for OData Configuration
Before configuring OData services, SAP Gateway components
must be installed.
Component Verification
Navigation:
System → Status → Component Information
Required Components:
• SAP_GWFND
• IW_FND
• IW_BEP
Required Transactions
• SEGW
• /IWFND/MAINT_SERVICE
• /IWFND/GW_CLIENT
• /IWFND/ERROR_LOG
• SICF
If Components Are Missing
We need to download and install:
[Link] Gateway software using SAP Maintenance
Planner.
[Link] required Support Packages.
[Link] Stack XML.
[Link] components using SUM/SPAM/SAINT.
[Link] successful installation.
[Link] Gateway transactions are available.
7. OData Service Configuration Process
Step 1: Verify Gateway Installation
Navigation:
System → Status → Component Information
Verify:
• SAP_GWFND
• IW_FND
• IW_BEP
Create OData Service
Responsible Team: ABAP Team
Transaction: SEGW
Activities:
[Link] Project.
[Link] Entity Types.
[Link] Entity Sets.
[Link] Runtime Objects.
[Link] Service.
Example : ZVENDOR_SRV
Register OData Service
Transaction:
/IWFND/MAINT_SERVICE
Procedure:
Execute transaction-->click add service-->select system alias--
>Search for the service name-->Select the service-->Click Add
Selected Services-->Assign Package or Transport Request-->save.
Result:
Service is registered in SAP Gateway.
Activate SICF Service
Transaction: SICF
Navigation:
default_host
→ sap→ opu→ odata
Procedure:
Locate the service-->Right-click the service-->Select Activate
Service.
Result:
Service becomes accessible.
Assign Authorizations
Transaction: PFCG
Procedure:
[Link] or modify role.
[Link] required Gateway authorizations.
[Link] role to users.
Verification: SU53
Test Metadata
Transaction:
/IWFND/GW_CLIENT
URL:
/sap/opu/odata/sap/ZVENDOR_SRV/$metadata
Expected Result:
Metadata XML is displayed.
Test Business Data
Transaction:
/IWFND/GW_CLIENT
Example URL:
/sap/opu/odata/sap/ZVENDOR_SRV/VendorSet
Expected Result:
Business data is returned successfully.
Test OData Query Features
Filtering:
GET /VendorSet?$filter=City eq 'Hyderabad'
Sorting:
GET /VendorSet?$orderby=VendorName
Pagination:
GET /VendorSet?$top=10
GET /VendorSet?$skip=10
Selecting:
GET /VendorSet?$select=VendorID,VendorName
Verify that expected results are returned.
Error Monitoring and Troubleshooting
Gateway Error Log
/IWFND/ERROR_LOG
ABAP Dumps
ST22
Authorization Issues
SU53
System Logs
SM21
Purpose:
Identify and resolve OData-related issues.