ERPClimb logoERPClimb
Service Definitions
RAP / CDS / ODataintermediate 7 min read

Service Definitions Part 3: API Boundary, Naming and Versioning

Preview · a free account unlocks the full lesson

Key takeaway

Treat a service definition as a contract: stable business names, clear naming conventions, compatible vs breaking changes, and versioning services without breaking existing consumers.

In this lessonShow sections

Visual overview

Service Definitions Part 3: API Boundary, Naming and Versioning — learning sheetFlow: Document your naming conventions in the project wiki → For each change request, classify: compatible or breaking → For breaking changes on APIs: create a new service definition (e.g. ZAPI_PURCHREQ_V2), add it as a new version in the binding, communicate, migrate, retire. Key ideas: NAMING CONVENTIONS; WHAT IS PART OF THE CONTRACT; COMPATIBLE CHANGES (USUALLY SAFE); BREAKING CHANGES. Watch out: WATCH OUT: whether and how multiple versions are available depends on your release and binding type — check in ADT before planning.ERPClimb.com / RAP / LESSON 3/6 / LEARNING SHEETService Definitions Part 3: API Boundary, Naming andVersioning1 · HOW IT FLOWS1Document your namingconventions in theproject wiki2For each change request,classify: compatible orbreaking3For breaking changeson APIscreate a new service definition(e.g. ZAPI_PURCHREQ_V2), add it as…2 · KEY IDEAS EXPLAINEDNaming ConventionsService definition: ZUI_<OBJECT> for UI,ZAPI_<OBJECT> for APIs.Service binding: definition name + suffix: _O4(OData V4), _O2 (OData V2); for APIs e.g.ZAPI_<OBJECT>_O4.What Is Part Of The ContractEntity set names, entity and property names, keys,navigation properties, actions/functions and theirparameters, and behavior (which operations are…Compatible Changes (Usually Safe)New optional fields.New entity sets or navigation properties.Breaking ChangesRemoving or renaming an entity set, field, key oraction.Changing a field from optional to mandatory, orwritable to read-only.3 · REMEMBER · WATCH OUTRememberAliases, entity sets, fields and actions are the contract consumerscode against.Adding is usually compatible; removing, renaming or making thingsmandatory is breaking.Breaking changes → new service version, old version stays untilconsumers migrate.!Watch outWATCH OUT: whether and how multipleversions are available depends onyour release and binding type —check in ADT before planning.4 · IN A REAL PROJECTA developer renamed the field "Remark" to "Comment" in an API projection because it"sounded better". The next morning, an external procurement system's nightly import failed, andhundreds of requests were not transferred. The rename was rolled back. The team introduced a rule: API…Original ERPClimb learning sheet • Verify against your SAP release and edition

Explanation

Aliases, entity sets, fields and actions form the contract that consumers code against. Adding something is usually a compatible change, while removing, renaming, or making something mandatory is usually breaking. Breaking changes call for a new service version, with the old version kept around until consumers migrate. It's worth agreeing on naming conventions — ZUI_, ZAPI_, _O4, _O2 — before building the first service at all.

Part 2 built services around business capabilities. Once a service actually has consumers, every change affects someone, and this part is about keeping services stable despite that.

On naming conventions: service definitions use ZUI_<OBJECT> for UI and ZAPI_<OBJECT> for APIs; service bindings take the definition's name plus a protocol suffix, _O4 for OData V4 or _O2 for OData V2 — so an API might become ZAPI_<OBJECT>_O4. Aliases should be singular business nouns in CamelCase, like PurchaseRequest or PurchaseRequestItem, and actions and fields should use business names, like approve or RequestID, never raw table column names.

Free account

Create a free account to keep reading

You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.

  • Full explanation
  • Code example
  • Real project scenario
  • Common mistakes
  • Best practices
  • Interview angle

One tap with Google works too. Every topic keeps its first lesson open to everyone.

Keep exploring

Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.