API Strategy
Architect / Cross-trackintermediate

API Types, Patterns and Governance Foundations in SAP

Covers the main categories of SAP APIs, common integration patterns, and the governance foundations needed to manage them consistently across a landscape.

Explanation

Once an organization accepts the need for an API strategy, the next step is understanding the categories of APIs available in SAP environments and the patterns used to combine them. Broadly, SAP exposes several API styles. OData services are widely used for exposing business data and simple transactional operations, and are the primary mechanism for Fiori apps and many BTP integration scenarios; they follow REST-like conventions with a defined metadata contract. SOAP-based web services remain common in older ECC and some S/4HANA on-premise scenarios, often generated from BAPIs or custom function modules through service enablement tools. RFC and BAPI-based interfaces are lower-level and typically used for system-to-system ABAP communication or through connectors like the SAP RFC adapter in integration middleware; they are not naturally web-friendly and are increasingly avoided in favor of OData or REST equivalents. Event-driven interfaces, increasingly relevant with S/4HANA and BTP, allow systems to publish business events (such as a sales order being created) that other systems can subscribe to asynchronously, reducing tight synchronous coupling. Patterns matter as much as protocols. A synchronous request-response pattern is appropriate when the caller needs an immediate result, such as checking stock availability before confirming an order. An asynchronous event pattern is more appropriate for downstream notification scenarios, such as informing a warehouse system that an order was created, where the caller does not need to wait for a response and can tolerate eventual consistency. Batch-oriented patterns, often still implemented using IDocs or file-based interfaces in ECC-heavy landscapes, remain relevant for high-volume, non-time-critical data exchange, though they are less flexible for real-time processes. Governance is the layer that makes all of this manageable at scale. Without governance, every team may independently version, secure, and document APIs differently, leading to fragmentation. Practical governance foundations include: a naming and versioning convention (so consumers can predict what a v2 endpoint means relative to v1), a central catalog or registry of published APIs with ownership and status metadata (active, deprecated, retired), consistent authentication and authorization standards (such as OAuth2 client credentials for system-to-system calls, mediated through an API gateway rather than embedding credentials in individual interfaces), and a deprecation policy that gives consuming teams advance notice before an API version is retired. Deployment context again matters. In S/4HANA public cloud, SAP publishes a defined set of released APIs with documented stability guarantees; architects should prefer these over custom-built equivalents because they are maintained across upgrades. In private cloud or on-premise, teams have more latitude to build custom OData services on top of custom logic, but should still apply the same governance discipline - undocumented, unversioned custom APIs become just as brittle as the point-to-point interfaces they were meant to replace. On BTP, API management capabilities (policies, rate limiting, analytics) can be applied centrally regardless of which backend system an API ultimately calls, which is often the most practical place to enforce governance across a hybrid landscape. A mature governance model also addresses ownership: who approves a new API before it is published, who is accountable when a downstream consumer reports an incident, and how changes are communicated. Skipping this organizational dimension and focusing only on protocol choice is a common reason API strategies remain aspirational rather than operational.

Code example

ABAP Code
Example illustrating a versioned OData service path convention used for governance purposes (illustrative naming pattern only, not a specific SAP-delivered service): /sap/opu/odata/sap/API_SALES_ORDER_SRV;v=2/ Key governance elements this illustrates:# v=2 makes the version explicit in the URL so consumers are not silently broken by a new release# API_SALES_ORDER_SRV as a name should map to a catalog entry with an owning team# Consumers should be able to look up deprecation status for v=1 before it is retired

Real project scenario

A logistics company had three different teams independently building OData services to expose shipment status, each with slightly different field naming and no shared versioning convention. When a BTP-based tracking portal tried to consolidate data from all three, it required custom mapping logic for each service and broke repeatedly whenever any team changed a field without notice. The architecture team introduced a lightweight API catalog requiring every new service to register its owner, version, and a change notification process before it could be connected to the portal, which significantly reduced integration incidents over the following months.

Common mistakes

โ€ข Choosing SOAP or RFC-based integration for new development simply because existing teams are more familiar with it, without evaluating OData or event-driven alternatives. โ€ข Publishing APIs without a version in the identifier, making future breaking changes disruptive to all consumers. โ€ข Treating an API gateway as the entire governance solution while ignoring organizational ownership and approval processes. โ€ข Using synchronous APIs for scenarios that are naturally asynchronous, creating unnecessary tight coupling and latency sensitivity. โ€ข Failing to maintain a central catalog, resulting in duplicate APIs built by different teams for the same business capability.

Best practices

โ€ข Prefer OData or REST-based services for new development over SOAP or direct RFC where feasible, especially in cloud-oriented landscapes. โ€ข Use asynchronous event-driven patterns for non-blocking downstream notifications rather than forcing synchronous calls. โ€ข Enforce explicit versioning in every published API and maintain a documented deprecation timeline. โ€ข Maintain a central, accessible catalog of APIs with clear ownership so teams can discover and reuse existing interfaces instead of duplicating them. โ€ข Apply consistent authentication and authorization policies through a gateway or API management layer rather than per-interface custom logic.

Interview angle

Candidates may be asked to compare OData, SOAP, RFC-based, and event-driven approaches and to justify which pattern fits a given scenario, such as real-time stock check versus asynchronous order notification. Interviewers also probe whether candidates understand governance as an organizational discipline, not just a technical control.