cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

DIFFERENCE BETWEEN RFC and TRFC

Former Member
0 Likes
6,539

Hi

I'm very much confused by stufying the document.. so, can any one briefly explain abt what is the difference between RFC and TRFC..

where exactly we can use RFC and TRFC.. when can we go for RFC and when can we go for TRFC ..

thanks

Babu

View Entire Topic
Former Member
0 Likes

HI,

Asynchronous RFC :



This is used when you need to increase the performance of ABAP program by having system call more than one function module in parallel than forcing the program to wait for results .


Transactional RFC

This let you group one or more function module call together o tRFC LUW and ensure that fucnction module within LUW is called once . In contrast to aRFC and sRFC the tRFC belonging to tRFC LUW are executed in order .

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

1.Executed in the order in which they are called

2.Executed in the same program context in the target system

3.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

Asynchronous remote function calls (aRFCs) are similar to transactional RFCs, in that the user does not have to wait for their completion before continuing the calling dialog. There are three characteristics, however, that distinguish asynchronous RFCs from transactional RFCs:

· When the caller starts an asynchronous RFC, the called server must be available to accept the request.

The parameters of asynchronous RFCs are not logged to the database, but sent directly to the server.

· Asynchronous RFCs allow the user to carry on an interactive dialog with the remote system.

· The calling program can receive results from the asynchronous RFC.

You can use asynchronous remote function calls whenever you need to establish communication with a remote system, but do not want to wait for the function’s result before continuing processing. Asynchronous RFCs can also be sent to the same system. In this case, the system opens a new session (or window). You can then switch back and for between the calling dialog and the called session

RECEIVE RESULTS FROM FUNCTION Remotefunction is used within a FORM routine to receive the results of an asynchronous remote function call. The following receiving parameters are available:

IMPORTING

TABLES

EXCEPTIONS

The addition KEEPING TASK prevents an asynchronous connection from being closed after receiving the results of the processing. The relevant remote context (roll area) is kept for re-use until the caller terminates the connection.

Regards

Sudheer