You are on page 1of 5

CREATING A RFC(Remote Enabled FM) Module.

Step 1: Go to T-code SE37. Enter the name of Function Module and create.

Step 2: Enter the name of Function Group you created before and Short text of
the Function Module. Click on Save Button.

Step 3: A pop-up will display, click on button .

Step 4: Under “Processing type”, select the “Remote-enabled Module” radio


button.
Under Attributes tab, you can change the Short Text, if you want.
Step 5: Under the Import tab, create a import parameter as shown below.

Step 6: Under the Export tab, create a export parameter as shown below.
Step 7: Under Source Code tab, write the code as shown below.

FUNCTION MODULE CODE:


FUNCTION ZFUNCMOD3.
*”———————————————————————-
*”*”Local Interface:
*” IMPORTING
*” VALUE(I_VBELN) TYPE ZST_VBAP-VBELN
*” EXPORTING
*” VALUE(E_VBAP) TYPE ZTT_VBAP
*” EXCEPTIONS
*” NO_PARAMETER
*”———————————————————————-
SELECT VBELN
POSNR
MATNR
MATKL
ARKTX
FROM VBAP INTO TABLE E_VBAP
WHERE VBELN EQ I_VBELN.
ENDFUNCTION.

Step 8: Click on save button and activate it.

Step 9: Now click on button and enter the value in Import Parameters and
click on button.

Step 10: Output is in Export Parameter. To view the output click on button.
Output will be as shown below:

You might also like