odata
Skill1 starsChanged 4 months agoMITView on GitHub
Help with OData service development in ABAP including OData V2 and V4 services via RAP service bindings, SEGW-based services, service definitions, service bindings, OData annotations, consumption of external OData services, and troubleshooting common OData errors. Use when users ask about OData, OData V2, OData V4, service binding, service definition, SEGW, OData annotations, OData consumption, OData client proxy, HTTP client, communication arrangement, external API consumption, /IWBEP/ errors, or exposing a RAP BO as OData. Triggers include "create OData service", "expose RAP BO", "service binding", "OData V4", "consume external OData", "OData annotations", "SEGW service", or "OData error".
3 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- gybson63/1c-oData-skilltheir own version, first seen Nov 8, 2026
- dovoanhtruong/abap-agent-claudecode-workspaceedited, first seen Oct 12, 2026
- likweitan/abap-skillsedited, first seen Jul 14, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- likweitan/abap-skills★ 7296% same
- dovoanhtruong/abap-agent-claudecode-workspace★ 364% same
Wrote their own version · 1
- gybson63/1c-oData-skill★ 8same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository413 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- .codex/AGENTS.mdAGENTS.md
- .cursor/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- sap-router-skillCopilot instructions
- .cursor/rules/sap-router.mdcCursor rule
- abap-cloud-migrationSkill
- abap-cloudSkill
- abap-code-patternsSkill
- abap-code-reviewSkill
- abap-docs-referenceSkill
- abapgitSkill
- abapSkill
- abap-snippetSkill
- abap-sql-amdpSkill
- abap-system-infoSkill
- abap-unit-testingSkill
- arc-1-skillsSkill
- atc-cloudificationSkill
- authorization-iamSkill
- automation-pilot-catalog-explorerSkill
- automation-pilot-command-generationSkill
- automation-pilot-command-reviewSkill
- automation-pilot-content-management-via-apiSkill
- automation-pilot-debuggerSkill
- automation-pilot-executions-apiSkill
- automation-pilot-executor-executescriptSkill
- automation-pilot-executor-httprequestSkill
- automation-pilot-mcp-server-generationSkill
- automation-pilot-scheduled-executions-apiSkill
- badi-enhancementSkill
- btp-abap-environmentSkill
- btp-best-practicesSkill
- btp-build-work-zoneSkill
- btp-business-application-studioSkill
- btp-ciasSkill
- btp-cloud-foundrySkill
- btp-cloud-identitySkill
- btp-cloud-loggingSkill
- btp-cloud-platformSkill
- btp-cloud-transport-managementSkill
- btp-connectivitySkill
- btp-developer-guideSkill
- btp-diagram-generatorSkill
- btp-integration-suiteSkill
- btp-job-schedulingSkill
- btp-master-data-integrationSkill
- btp-service-managerSkill
- cap-add-remote-serviceSkill
- cap-developerSkill
- cap-triviaSkill
- capture-answerSkill
- cap-upgradeSkill
- cds-view-entitiesSkill
- claude-abap-skillsSkill
- claude-memSkill
- clean-abapSkill
- context-modeSkill
- cpi-iflow-developmentSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 203
When helping with OData topics, structure responses as:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OData Service Development
Guide for creating and consuming OData services in ABAP, covering both RAP-based (V4/V2) and SEGW-based (V2) approaches.
Workflow
- Determine the user's goal:
- Exposing a RAP BO as an OData service (recommended approach)
- Creating a classic SEGW-based OData V2 service
- Consuming an external OData service from ABAP
- Adding OData annotations for Fiori UIs
- Troubleshooting OData errors
- Identify the approach:
- RAP-based service (preferred for ABAP Cloud)
- SEGW-based service (classic, Standard ABAP only)
- OData consumption (client proxy)
- Guide implementation following SAP best practices
RAP-Based OData Services (Recommended)
Architecture Flow
CDS View Entity → Behavior Definition → Service Definition → Service Binding
↓
OData V4/V2 EndpointService Definition
Exposes CDS entities and their behaviors as a named service:
@EndUserText.label: 'Travel Service'
define service ZUI_TRAVEL_O4 {
expose ZC_Travel as Travel;
expose ZC_Booking as Booking;
expose I_Currency as Currency;
expose I_Country as Country;
}Key Rules
- Expose projection CDS views (C_ prefix by convention), not root views
- Include value help CDS views (I_* views) the UI needs
- Alias names become OData entity set names
- One service definition can be bound to multiple protocols
Service Binding
Binds a service definition to a specific OData protocol and provides a URL:
| Binding Type | Protocol | Use Case |
OData V4 - UI | V4 | SAP Fiori Elements apps |
OData V2 - UI | V2 | Legacy Fiori apps, older frontends |
OData V4 - Web API | V4 | API consumption (A2X scenarios) |
OData V2 - Web API | V2 | API consumption (legacy) |
InA - UI | InA | Analytical scenarios |
Creating a Service Binding
- In ADT: New → Other ABAP Repository Object → Business Services → Service Binding
- Select the service definition
- Choose binding type (e.g., OData V4 - UI)
- Activate
- Click Publish to register the service
- Click Preview to open the Fiori Elements preview
OData V4 vs V2
| Feature | OData V4 | OData V2 |
| Protocol | JSON by default | XML (Atom) default, JSON option |
| Batch | $batch with JSON | $batch with multipart |
| Deep operations | Deep create/update supported | Limited |
| Actions/Functions | Bound and unbound | Function imports |
| Filtering | $filter with lambda | $filter basic |
| Draft | Full support | Supported via extensions |
| Aggregation | $apply transformation | Not natively supported |
| Recommendation | Preferred for new development | Maintain existing only |
SEGW-Based OData V2 Services (Classic)
For Standard ABAP only (not available in ABAP Cloud):
Architecture
SEGW Project → Data Model (Entity Types, Sets, Associations)
→ Service Implementation (MPC/DPC classes)
→ Register & Activate in /IWFND/MAINT_SERVICESteps
- Create project in
SEGWtransaction - Define data model: Entity types, properties, navigation properties
- Generate runtime artifacts (MPC/DPC classes)
- Implement DPC extension methods:
GET_ENTITYSET,GET_ENTITY,CREATE_ENTITY, etc. - Register service in
/IWFND/MAINT_SERVICE - Test via
/IWFND/GW_CLIENTor browser
DPC Method Implementation Example
METHOD travelset_get_entityset.
SELECT * FROM ztravel_tab
INTO TABLE @DATA(lt_travel)
UP TO 100 ROWS.
et_entityset = CORRESPONDING #( lt_travel ).
ENDMETHOD.Consuming External OData Services
In ABAP Cloud (using HTTP Client and Communication Arrangements)
"1. Get HTTP client via communication arrangement
DATA(lo_dest) = cl_http_destination_provider=>create_by_comm_arrangement(
comm_scenario = 'Z_MY_OUTBOUND_SCENARIO'
service_id = 'Z_MY_HTTP_SERVICE' ).
DATA(lo_client) = cl_web_http_client_manager=>create_by_http_destination( lo_dest ).
"2. Build request
DATA(lo_request) = lo_client->get_http_request( ).
lo_request->set_uri_path( '/sap/opu/odata4/sap/api_business_partner/srvd_a2x/sap/api_business_partner/0001/A_BusinessPartner?$top=10' ).
"3. Execute and parse response
DATA(lo_response) = lo_client->execute( if_web_http_client=>get ).
DATA(lv_json) = lo_response->get_text( ).
lo_client->close( ).Using OData Client Proxy (V2/V4)
"Create OData client proxy for V4
DATA(lo_proxy) = /iwbep/cl_cp_client_proxy_fact=>create_v4_remote_proxy(
iv_service_definition_name = 'Z_MY_ODATA_CDEF'
io_http_client = lo_client
iv_relative_service_root = '/sap/opu/odata4/sap/api_service/0001/' ).
"Build and execute read request
DATA(lo_request) = lo_proxy->create_resource_for_entity_set( 'ENTITYSETNAME' )->create_request_for_read( ).
lo_request->set_top( 10 ).
DATA(lo_response) = lo_request->execute( ).
"Get business data
DATA lt_data TYPE STANDARD TABLE OF z_entity_type.
lo_response->get_business_data( IMPORTING et_business_data = lt_data ).OData Annotations for Fiori
Key CDS annotations that control OData/Fiori behavior:
@UI.headerInfo: {
typeName: 'Travel',
typeNamePlural: 'Travels',
title: { type: #STANDARD, value: 'TravelID' },
description: { type: #STANDARD, value: 'Description' }
}
@UI.lineItem: [{ position: 10 }]
@UI.selectionField: [{ position: 10 }]
@UI.identification: [{ position: 10 }]
TravelID;
@UI.lineItem: [{ position: 20, importance: #HIGH }]
@UI.identification: [{ position: 20 }]
@Consumption.valueHelpDefinition: [{ entity: { name: 'I_Currency', element: 'Currency' } }]
CurrencyCode;Troubleshooting
| Error / Issue | Solution |
/IWBEP/CX_MGW_BUSI_EXCEPTION | Check DPC implementation, validate input data |
/IWBEP/CX_MGW_TECH_EXCEPTION | Check data model consistency, regenerate artifacts |
| 403 Forbidden | Check ICF node activation, authorization |
| 404 Not Found | Verify service is registered and activated |
$metadata returns empty | Publish service binding, check activation |
| Draft not working | Verify draft table exists, BDEF has with draft |
| Deep create fails | Check composition in CDS and BDEF |
CX_WEB_HTTP_CLIENT_ERROR | Check communication arrangement, SSL certificates |
Output Format
When helping with OData topics, structure responses as:
## OData Service Guidance
### Approach
- Type: [RAP-based / SEGW-based / Consumption]
- Protocol: [OData V4 / OData V2]
### Implementation
[Step-by-step with code examples]
### Testing
[How to test the service]References
- SAP OData V4 Documentation: https://help.sap.com/docs/abap-cloud/abap-rap/odata-service
- RAP Service Binding: https://help.sap.com/docs/abap-cloud/abap-rap/service-binding
- OData Client Proxy: https://help.sap.com/docs/abap-cloud/abap-rap/odata-client-proxy
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

