IT CanvassTalk to an advisor
SAP ABAP development · LessonBy , SAP Trainer, 13 yrs · Published · SAP S/4HANA 2023 · all levels

RFC

RFC-enabled function modules let ABAP code be called remotely, from another SAP system or an external program, and let ABAP call out to other systems. Building and calling RFCs is core to SAP integration development.

Quick answer

When you build an RFC for others to call, use flat, well-documented parameters, return status/messages clearly, and consider reliability (tRFC/qRFC for guaranteed, ordered delivery).

Key takeaways
  • A function module flagged as "Remote-Enabled" can be invoked across systems via RFC.
  • Remote calls use an RFC destination (defined in SM59) naming the target system and logon.
  • Building and calling RFCs is core to SAP integration development.
  • Watch out: Not handling RFC exceptions (system down/unreachable).

Remote-enabled function modules

A function module flagged as "Remote-Enabled" can be invoked across systems via RFC. This is how SAP exposes callable logic to other SAP systems and to external programs (through connectors/SDKs). BAPIs are, technically, specially-defined remote-enabled function modules.

Calling a remote function

CALL FUNCTION 'Z_GET_CUSTOMER' DESTINATION 'RFC_TARGET'
  EXPORTING iv_kunnr = lv_kunnr
  IMPORTING es_data  = ls_data
  EXCEPTIONS communication_failure = 1 system_failure = 2 OTHERS = 3.
IF sy-subrc <> 0. " handle RFC error
ENDIF.

Destinations and error handling

Remote calls use an RFC destination (defined in SM59) naming the target system and logon. Robust code always handles the communication_failure/system_failure exceptions, remote systems can be down or unreachable, and RFC errors are among the most common integration issues.

Designing remote-enabled FMs

When you build an RFC for others to call, use flat, well-documented parameters, return status/messages clearly, and consider reliability (tRFC/qRFC for guaranteed, ordered delivery). Good interface design here makes integrations robust.

Common pitfalls

  • Not handling RFC exceptions (system down/unreachable).
  • Wrong or missing destination (SM59).
  • Complex parameters that are hard to call remotely.

Practice challenge

+0 XPStreak ×0
Question 1 of 3
Which statement is true of RFC?

Frequently asked questions

What does RFC stand for in SAP?
RFC-enabled function modules let ABAP code be called remotely, from another SAP system or an external program, and let ABAP call out to other systems. Building and calling RFCs is core to SAP integration development.
Which transaction codes come up with RFC?
Remote calls use an RFC destination (defined in SM59) naming the target system and logon.
What is worth remembering about RFC in practice?
When you build an RFC for others to call, use flat, well-documented parameters, return status/messages clearly, and consider reliability (tRFC/qRFC for guaranteed, ordered delivery).
What tends to go wrong with RFC?
Not handling RFC exceptions (system down/unreachable). Wrong or missing destination (SM59). Complex parameters that are hard to call remotely.
Already working on SAP and stuck on a live ticket?Get an expert SAP developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support