- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
This guide walks through two connected tasks:
Part 1 — How to expose an existing SAP CDS view as an OData service, using either the @OData.publish annotation (requires ADT) or the SADL approach via SEGW (SAP GUI only).
Part 2 — How to register that new OData service in Zero Copy Connector for ERP so it is available for use in ServiceNow.
Part 1: Exposing a CDS View as an OData Service
There are two approaches to expose a CDS view. Choose based on your available tooling:
- Option A: @OData.publish annotation
- Requires ADT (ABAP Development Tools) connected to your SAP system. Fastest if you have it available.
- See more details here
- Option B: SADL exposure via SEGW
- Works with SAP GUI alone — no ADT required. This guide covers this approach in full detail below.
- See example here
Exposing a CDS View as an OData Service
- Identify the CDS View
- Identify the CDS view you want to expose. If no suitable view exists, create a new one before proceeding.
-
Create a Gateway Project in SEGW
- Open transaction SEGW (Gateway Service Builder). Create a new project and provide:
- Project name and description
- Package assignment
- Open transaction SEGW (Gateway Service Builder). Create a new project and provide:
-
Import the CDS View as a Data Source
- In the SEGW project, right-click Data Model → Reference Data Source.
- Provide the following details:
- Entity Type Name (e.g.
FlightSet) - Data Source Type: CDS View
- Data Source Name: your CDS view name (e.g.
ZMY_CDS_VIEW)
- Entity Type Name (e.g.
- The system auto-generates the entity type and set, properties and keys, and a SADL-based binding. No manual field mapping is required.
- You now have a complete OData Entity Model without manually importing or mapping any fields.
-
Generate Runtime Artefacts
- Click the Generate icon to create the Model Provider Class (MPC) and Data Provider Class (DPC) automatically. If prompted, confirm the package assignment and transport request.
- These use the SADL framework — no custom ABAP code is needed unless you need to extend the default behaviour.
-
Register the OData Service
- Open transaction /IWFND/MAINT_SERVICE. Then:
- Click Add Service
- Enter the system alias (e.g.
LOCAL) - Search for and locate your technical service name
- Click Add Selected Services and confirm
- Open transaction /IWFND/MAINT_SERVICE. Then:
-
Test the OData Endpoint
- Open a browser or REST client and access the service endpoint:
- Append
$metadatato inspect the entity structure, or append an entity set name to query data directly.
Part 2: How to register the new Service in Zero Copy Connector for ERP
Once the OData service is live in SAP, register it in your ServiceNow instance so Zero Copy Connector for ERP can consume it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
