RFC
RFC (Remote Function Call) is the protocol that lets programs call SAP function modules remotely, the foundation beneath BAPIs and much SAP integration, connecting SAP to SAP and to external systems.
RFC is the go-to for SAP-to-SAP and program-level integration and remains vital, though cloud integration increasingly layers OData/APIs on top.
- RFC allows a function module in one system to be called from another (or from an external program via SDKs/connectors) as if local.
- External systems use RFC through SAP connectors/SDKs (e.
- Synchronous (sRFC): caller waits; both systems up.
- Watch out: Wrong RFC type for reliability needs.
What RFC is
RFC allows a function module in one system to be called from another (or from an external program via SDKs/connectors) as if local. It underpins BAPIs, ALE/IDoc distribution, and countless interfaces. Destinations (SM59) define how to reach the target system.
RFC types
- Synchronous (sRFC): caller waits; both systems up.
- Asynchronous (aRFC): fire-and-forget.
- Transactional (tRFC): guaranteed once, survives outages.
- Queued (qRFC): ordered, guaranteed, for interfaces.
RFC in integration
External systems use RFC through SAP connectors/SDKs (e.g. the SAP JCo for Java, NCo for .NET) to call BAPIs/RFMs. Reliable interfaces use tRFC/qRFC so messages are not lost or reordered. RFC destinations and their security (least-privilege service users, secured gateway) are central.
When to use it
RFC is the go-to for SAP-to-SAP and program-level integration and remains vital, though cloud integration increasingly layers OData/APIs on top. Understanding RFC is essential for classic and hybrid landscapes.
Common pitfalls
- Wrong RFC type for reliability needs.
- Insecure destinations/gateway.
- No error handling for unreachable systems.