ERPClimb logoERPClimb

ABAP · Intermediate · Configuration

How to create and publish an OData V4 service binding in ADT

Expose an existing RAP projection as an OData V4 UI service: create the service definition and the service binding, activate and publish it, and preview the result.

APPLICABILITY
ABAP RESTful Application Programming Model in SAP BTP ABAP environment, SAP S/4HANA Cloud Public Edition (developer extensibility) and SAP S/4HANA Cloud Private Edition or on-premise. How a V4 binding is published differs by deployment: see step 5.
TOOLS / TRANSACTIONS
Eclipse ADT · Service Definition · Service Binding · /IWFND/V4_ADMIN

Your project assignment

A managed RAP business object for hypothetical travel requests is finished up to the projection view ZC_TRAVELREQ. Expose it as an OData V4 UI service in the development system and show a working preview to the team.

Where to start: URLs and transactions

Tool
Eclipse with ABAP Development Tools
Context menu in Project Explorer
New → Other ABAP Repository Object → Business Services

Prerequisites

  • Eclipse with ADT connected to the development system, and a developer role in that system.
  • An activated CDS projection view with a behavior definition, in a package assigned to a transport request.
  • For on-premise or private cloud: a Basis contact for SAP Gateway, because publishing may need a transaction outside ADT.

Configuration workflow

From projection view to a published V4 service

All steps visible. Play or advance one stage at a time.

From projection view to a published V4 serviceCDS projection view: Active, with UI annotations → Service definition: Expose the entities → Service binding: OData V4 - UI, activate, publish → Preview: Fiori elements list reads data1CDS projection viewActive, with UI annotations2Service definitionExpose the entities3Service bindingOData V4 - UI, activate, publish4PreviewFiori elements list reads data
Where a V4 binding is published depends on the deployment: in ADT for cloud systems, possibly in SAP Gateway for on-premise. ERPClimb original instructional diagram · not a live SAP screenshot.

Hands-on implementation — step by step

Follow the screen navigation, replace example values with approved project values, and mark each step after checking its result. The screens below are original teaching aids, not live SAP screenshots. Progress is local to this visit.

0/7 completed
  1. 1

    Project Explorer → check the projection view

    Open the projection view and its behavior projection and confirm both are active. Check that the root entity carries the UI annotations you expect in a list.

    Project Explorer → check the projection viewERPClimb · illustrative screen
    Projection view
    ZC_TRAVELREQ (hypothetical)
    Status
    Active

    Expected result: The objects to expose are active.

    Why this matters: A service can only expose active CDS entities.

  2. 2

    New Service Definition

    Right-click the projection view and choose New Service Definition. Enter a name and description, assign the transport request and finish. Keep the proposed expose statement and add an alias.

    New Service DefinitionERPClimb · illustrative screen
    Name
    ZUI_TRAVELREQ (hypothetical)
    Exposed entity
    ZC_TRAVELREQ
    Alias
    TravelRequest

    Expected result: A service definition with one expose statement exists.

    Why this matters: The service definition states which entities belong to the service, independent of the protocol.

  3. 3

    Activate the service definition

    Activate the definition with the activation button or Ctrl+F3 and resolve any syntax message.

    Activate the service definitionERPClimb · illustrative screen
    Object
    ZUI_TRAVELREQ
    Shortcut
    Ctrl+F3

    Expected result: The service definition is active.

    Why this matters: The binding wizard only accepts an active definition.

  4. 4

    New Service Binding

    Right-click the service definition and choose New Service Binding. Enter the name and choose the binding type for a UI service on OData V4.

    New Service BindingERPClimb · illustrative screen
    Name
    ZUI_TRAVELREQ_O4 (hypothetical)
    Binding Type
    OData V4 - UI
    Service Definition
    ZUI_TRAVELREQ

    Expected result: The service binding editor opens.

    Why this matters: The binding type fixes the protocol and whether the service is meant for a user interface or for other systems.

  5. 5

    Activate, then publish

    Activate the binding. In SAP BTP ABAP environment and S/4HANA Cloud Public Edition choose Publish in the binding editor. In on-premise and private cloud systems, if your release does not offer local publishing for V4, have the service group published in /IWFND/V4_ADMIN with Basis.

    Activate, then publishERPClimb · illustrative screen
    Cloud
    Publish in the binding editor
    On-premise / private cloud
    Publish in ADT if offered, otherwise /IWFND/V4_ADMIN → Publish Service Groups

    Expected result: The binding shows the service as published with its service URL.

    Why this matters: Publishing registers the local service endpoint so that it can be called.

  6. 6

    Check entity sets and service URL

    In the binding editor review the list of entity sets and associations and open the service URL to read the metadata document.

    Check entity sets and service URLERPClimb · illustrative screen
    Entity set
    TravelRequest
    Document
    $metadata

    Expected result: The metadata document is returned and lists the entity type.

    Why this matters: The metadata is the contract that a Fiori elements app or another client will consume.

  7. 7

    Preview the main entity

    Select the main entity set and choose Preview. Log on in the browser and run the list.

    Preview the main entityERPClimb · illustrative screen
    Entity set
    TravelRequest
    Action
    Preview

    Expected result: A Fiori elements list report opens and reads data.

    Why this matters: The preview proves the service, the annotations and your authorization together before an app is built.

Project acceptance checklist

Use this checklist to prepare evidence for your project lead.

0 of 4 checks marked. This does not certify the SAP configuration.

Validate your configuration

  • The service binding is active, shows the status published and lists the exposed entity sets with a service URL.
  • The Fiori elements preview opens for the main entity and reads data with your user.

Common errors and what to check

  • the Publish button is missing or publishing fails in an on-premise or private cloud system.

    Check: On those systems a V4 service group may have to be published in /IWFND/V4_ADMIN; check the documentation for your release.

  • the binding cannot be activated.

    Check: The service definition or one of the exposed views is inactive or has syntax errors.

  • preview opens but shows no columns.

    Check: The projection view has no UI annotations or metadata extension.

  • preview returns an authorization or forbidden error.

    Check: Your user lacks the access the service requires, or in the cloud the generated authorization default was not added to a business role.

More in the SAP Library

Need help with a configuration error? Open ERPClimb Copilot.

Technical references & further reading