Skip to Content
author's profile photo Former Member
Former Member



I am new to SAP and have to work on Portal Devlopment. Can any one please help me in how to create RFC, I need step by step information from basics.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:02 AM

    hi umang,


    A remote function call is a call to a function module running in a system different from the caller's. The remote function can also be called from within the same system (as a remote call).

    RFC consists of two interfaces : A calling interface for ABAP Programs and a calling interface for Non-SAP programs.

    Any ABAP program can call a remote function using the CALL FUNCTION...DESTINATION statement. The DESTINATION parameter tells the SAP System that the called function runs in a system other than the caller's.


    RFC client is the instance that calls up the Remote Function Call to execute the function that is provided by an RFC server.

    The RFC Interface takes care of :-

    -> Converting all parameter data to the representation needed in the remote system

    ->Calling the communication routines needed to talk to the remote system.

    ->Handling communications errors, and notifying the caller, if desired ( using EXCEPTIONS paramater of the CALL FUNCTION).

    ->Calling Remote function modules

    You can use the CALL FUNCTION statement to call remote functions by including an additional DESTINATION clause.

    CALL FUNCTION ‘remotefunction’


    EXPORTING f1 =

    IMPORTING f2 =

    TABLES t1 =


    ->The field ‘dest’ can be either a literal or a variable. Logical destinations are defined in the RFCDES table via transaction SM59 or via the menu path: Tools ->Administration,Administration->Network->RFC destinations.

    ->Calling remote functions locally :-

    ( i.e. call a remote function within the same system )

    The two options to do this are –



    ->Calling remote function modules BACK :-

    The remote function can invoke its own caller (if the caller is itself a function module), or any function module loaded with the caller.

    -> You can trigger this call-back mechanism using


    Types of RFC's

    Synchronous RFC – The calling program continues the execution only after the called function is complete.

    Asynchronous RFC - The calling program continues the execution without waiting for return from the called function.

    Eg: CALL FUNCTION ‘remotefunction’ STARTING NEW TASK ‘taskname’.

    Transactional RFC - The called function module is executed exactly once in the RFC server system.Each function call is seen as a transaction in the target system. Transactional RFCs use the suffix IN BACKGROUND TASK .

    Eg : CALL FUNCTION ‘remotefunction’ IN BACKGROUND TASK

    writing remote function modules:

    In the function module attributes tab (transaction code SE37), set the processing type as Remote-enabled module to create a remote function module.

    Write the code for the function module.

    Define the destination of the RFC server in the RFC client system that calls the remote function ( via SM59 transaction).

    Declaring Parameters: All parameter fields for a remote function module must be defined as reference fields, that is, like ABAP Dictionary fields.

    Exceptions: The system raises COMMUNICATION_FAILURE and SYSTEM_FAILURE internally. You can raise exceptions in a remote function just as you would in a locally called function.

    debbugging remote functional calls:

    It is not possible to debug a remote function call to another system.

    However, when testing ABAP-to-ABAP RFC calls, you can use the ABAP debugger to monitor the execution of the RFC function in the remote system.

    With remote calls, the ABAP debugger (including the debugging interface) runs on the local system. Data values and other run information for the remote function are passed in from the remote system.

    reward if helpful



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 06:53 AM

    Remote Function Call:

    RFC is an SAP interface protocol. Based on CPI-C, it considerably simplifies the programming of communication processes between systems.

    RFCs enable you to call and execute predefined functions in a remote system - or even in the same system.

    RFCs manage the communication process, parameter transfer and error handling.

    Have a look at this link.


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:07 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2008 at 07:18 AM



    Communication between applications of different systems in the SAP environment includes connections between SAP systems as well as between SAP systems and non-SAP systems. Remote Function Call (RFC) is the standard SAP interface for communication between SAP systems. The RFC calls a function to be executed in a remote system.

    Synchronous RFC

    The first version of RFC is synchronous RFC (sRFC). This type of RFC executes the function call based on synchronous communication, which means that the systems involved must both be available at the time the call is made.

    Transactional RFC (tRFC)

    Transactional RFC (tRFC, also originally known as asynchronous RFC) is an asynchronous communication method that executes the called function module in the RFC server only once. The remote system need not be available at the time when the RFC client program is executing a tRFC. The tRFC component stores the called RFC function, together with the corresponding data, in the SAP database under a unique transaction ID (TID).

    If a call is sent, and the receiving system is down, the call remains in the local queue until a later time. The calling dialog program can proceed without waiting to see whether or not the remote call was successful. If the receiving system does not become active within a certain amount of time, the call is scheduled to run in batch.

    tRFC is always used if a function is executed as a Logical Unit of Work (LUW). Within a LUW, all calls are

    · executed in the order in which they are called

    · executed in the same program context in the target system

    · run as a single transaction: they are either committed or rolled back as a unit.

    Implementation of tRFC is recommended if you want to guarantee that the transactional order of the calls is preserved.

    Disadvantages of tRFC

    · tRFC processes all LUWs independent of one another. Due to the amount of activated tRFC processes, this procedure can reduce performance significantly in both the send and the target systems.

    · In addition, the sequence of LUWs defined in the application cannot be kept. Therefore, there is no guarantee that the transactions are executed in the sequence dictated by the application. The only guarantee is that all LUWs are transferred sooner or later.

    Queued RFC (qRFC)

    To guarantee that multiple LUWs are processed in the order specified by the application, tRFC can be serialized using queues (inbound and outbound queues). This type of RFC is called queued RFC (qRFC).

    qRFC is therefore an extension of tRFC. It transfers an LUW (transaction) only if it has no predecessors (in reference to the sequence defined in different application programs) in the participating queues.

    Implementation of qRFC is recommended if you want to guarantee that several transactions are processed in a predefined order.

    RFC: Data Transfer

    All RFC types are transferred by means of CPI-C or TCP/IP. They constitute a form of gateway communication.

    For more info refer :


    Renjith Michael.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 05:10 AM


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.