ABAP Developmentintermediate
BAPI vs RFC vs OData
Choosing the right integration API.
Explanation
BAPI is the historical integration API โ RFC-enabled and semantically stable. Non-BAPI RFCs may expose lower-level operations without the same lifecycle guarantees. OData services (built on RAP or SEGW) are the S/4HANA-preferred external API for Fiori and modern integrations. Choose based on caller (SAP vs non-SAP) and technology.
Code example
ABAP Code
" Consuming an OData service is via HTTP, not CALL FUNCTION." BAPI vs OData choice depends on the caller's stack.Real project scenario
A CRM integration used SOAP+BAPI in 2016; the 2024 refresh moved to OData exposed via RAP, cutting middleware complexity.
Common mistakes
Exposing custom RFCs when a BAPI exists; using OData for chatty transactional workloads without batching.
Best practices
Prefer released BAPIs for SAP-to-SAP; use OData/REST for external UI and 3rd-party integration.
Interview angle
When would you still choose BAPI over OData?