Register Login

Create RFC

In this tutorial, you will learn step by step process to create an RFC in SAP ABAP with proper screenshots.

What Is RFC?

RFC (Remote Function Call) is a standard SAP protocol that is used for communication between applications of two SAP systems. Normally we use RFCs when the caller and the called function module run in the same system.

How to Create RFC?

Please follow the steps below to create an RFC:

Execute t-code SE37 in the SAP command field

SE37

Next, enter the Function Module name and click on Create button.

Function Module
 
Next enter the following details and click the Save button

  • Function Group 
  • Short text of the Function Module.

Function Group

A pop-up will appear to choose your language preference

Language Preference

Next, select your Transportable Workbench Request and press Enter to proceed further.

Promt

Now go to the Attributes tab, select the Remote-enabled Module radio button.

Attribute ab

Next, go to the Import tab and create an import parameter as shown in the image below.

Import

Similarly, go to the Export tab and create an export parameter

Export

Now go to the Source Code tab, and write the following code

FUNCTION Z_DEMO_FM.
*”———————————————————————-
*”*”Local Interface:
*” IMPORTING
*” VALUE(I_SRTECH) TYPE ZST_SRH
*” EXPORTING
*” VALUE(E_STRC) TYPE ZTT_STE
*” EXCEPTIONS
*” NO_PARAMETER
*”———————————————————————-

SELECT SRTECH
POSNR
MATNR
MATKL
ARKTX
FROM STRC INTO TABLE E_STRC
WHERE SRTECH EQ I_SRTECH.

ENDFUNCTION.

Source Code

Next, click the Save button 

Save

And then click the Activate button to activate the RFC.

Activate