BAPI Part 3: BAPI vs RFC vs OData
Preview · a free account unlocks the full lesson
Understand how BAPIs, RFC and OData relate: BAPIs as released RFC function modules, RFC as the protocol (synchronous, tRFC, qRFC, bgRFC), OData services for Fiori and REST-style integration, and how to choose the right interface for local programs, SAP-to-SAP and external integrations.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Parts 1 and 2 called a BAPI from inside ABAP. In integration projects, though, you also have to decide how external systems actually reach SAP in the first place — and that's where RFC, BAPIs and OData relate to one another.
RFC is the communication protocol; a BAPI is a released business method implemented as an RFC-enabled function module.
RFC itself comes in several variants. sRFC, synchronous RFC, has the caller wait for the result, using a DESTINATION defined in SM59. tRFC, transactional RFC, triggered with IN BACKGROUND TASK, executes exactly once but asynchronously, with no guarantee of ordering. qRFC is queued tRFC, which does preserve order within a given queue, monitored through SMQ1 and SMQ2. bgRFC is the newer background RFC framework that replaces tRFC and qRFC in modern releases.
Monitoring tools follow the same split: SM58 for tRFC, SMQ1/SMQ2 for queues, SBGRFCMON for bgRFC.
Calling a BAPI over RFC is exactly how external systems — SAP PI/PO, other middleware, or Java and .NET applications using SAP connectors — reach SAP in practice. The one rule that trips people up is that the commit has to happen in the same RFC session, calling BAPI_TRANSACTION_COMMIT through that same connection, otherwise nothing actually gets saved.
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
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
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.