You are on page 1of 13

RFC

BY ----Arjun

Overview

RFC:
These are Special type of FMS which are used to
communicate with remote servers.
The remote servers can be SAP-SAP Servers or SAP to
NON SAP servers.

Just Select the radio button REMOTE ENABLED,

the FM will be converted into REMOTE ENABLED FM.

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 2

Overview

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 3

RFC Destination
BY ----Arjun

Overview
RFC Destinations:

It is a communication network or link between


two remote servers.

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 5

Overview

SM59 is the tcode .


In the real time, RFC Destinations are created by BASIS
Consultants.
Once RFC destinations are created, we can use the RFC
function modules with below syntax,
SYNTAX TO CALL RFC FMOD :
CALL FUNCTION FMOD
DESTINATION <RFC DEST.NAME>

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 6

Overview

Steps to create RFC Destination:

Goto SM59.

Select ABAP Connections folder

Click on Create

Give the name as Z800_TO_Z810.

Give some desc

.
SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 7

Overview

Select radio button HOSTNAME

Give the target host as application server name.

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 8

Overview

Click on Logon and security tab

Specify below details.

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 9

Overview

Click on save

Click on

You will enter into remote or target 810 client.

Click on back, you will come back to source client 800

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 10

to test the connection.

Overview

Steps to create RFC FM:

Go to SE37create a FM by name ZGET_MAT_DET

with IM_MATNR and EX_MARA as parameters.

Make all the parameters as PASS BY VALUE..

Click on Attributes tab.

Select REMOTE ENABLED option as below

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 11

Overview

Using RFC FM in program :


Data : wa_mara type mara.
Parameters : p_matnr type mara-matnr.
Call function ZGET_MAT_DATA
Destination Z800_TO_810
Exporting
im_matnr = p_matnr
Importing
ex_mara = wa_mara.

Write : / wa_mara-matnr , wa_mara-meins.


SAP AG 2001, Smart Forms - the Form Printing Solution,
Claudia Binder / Jens Stumpe 12

Overview

Unit testing :
Execute the Program
Give P_matnr = some material no from 810
client.
Execute

Observe the results.

SAP AG 2001, Smart Forms - the Form Printing Solution,


Claudia Binder / Jens Stumpe 13

You might also like