Enevoldsen
ServiceNow Employee

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

  1. Identify the CDS View
    • Identify the CDS view you want to expose. If no suitable view exists, create a new one before proceeding.
  2. Create a Gateway Project in SEGW

    • Open transaction SEGW (Gateway Service Builder). Create a new project and provide:
      • Project name and description
      • Package assignment
  3. 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)
    • 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.
  4. 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.
  5. 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
  6. Test the OData Endpoint

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.

Follow the detailed steps in the Documentation