Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference between RFC,tRFCand QRFC

Former Member
0 Likes
3,512

Hi All,

Can you please explain the difference between the RFC,tRFC and QRFC.

Thanks & Regards

Krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,856

Hi,

first of all qRFC is just an extension to tRFC

the main difference is that when using qRFC

you can put all your calls/messages in a queue

so they get executed one by one which is not the case

with tRFC as with tRFC they get exectued without

retaining the original sequence

(so last call can be executed first)

with XI (sender RFC adapter) you can only use tRFC

but with a little RFC wrapper it is possible

to invoke qRFC calls from XI on the R3

They are variants of remote function calls

Refer, http://help.sap.com/saphelp_nw04/helpdata/en/8b/ceea3b31aac554e10000000a114084/content.htm

Transactional RFC guarantees the following attributes:

· The call is executed exactly once in the target system.

· Calls that belong to a Logical Unit of Work (LUW) are either completely executed, or not executed at all.

If the target system is not available when the call is made, the call remains in the local wait queue. The calling dialog program can, however, proceed. If the target system does not become active within a certain amount of time, the call is scheduled as a background job.

Although tRFC significantly improves the reliability of the data transfer, it also has disadvantages. This method does not ensure that the sequence of LUWs specified in the application is observed. However, there is a guarantee that all LUWs will be transferred at some point.

Queued RFC (qRFC with Outbound Queue)

To offset this disadvantage, a serialization of tRFC is performed using wait queues. It is called queued RFC (qRFC).With this serialization, an outbound queue for tRFC was created in SAP R/3, which is therefore referred to as qRFC with outbound queue. The main features of qRFC are as follows:

·A LUW is only transferred if it has no predecessor (in reference to the sequence defined in the applications) in the participating queues. After a qRFC transaction is executed, the system attempts to start the next qRFC transaction in the sequence from the queue.

·A queue name and a queue counter are required fore each qRFC transaction for queue administration. Each tRFC call that is to be processed chronologically is assigned a queue name determined by the application."

Regards,

Raj.

4 REPLIES 4
Read only

Former Member
0 Likes
1,857

Hi,

first of all qRFC is just an extension to tRFC

the main difference is that when using qRFC

you can put all your calls/messages in a queue

so they get executed one by one which is not the case

with tRFC as with tRFC they get exectued without

retaining the original sequence

(so last call can be executed first)

with XI (sender RFC adapter) you can only use tRFC

but with a little RFC wrapper it is possible

to invoke qRFC calls from XI on the R3

They are variants of remote function calls

Refer, http://help.sap.com/saphelp_nw04/helpdata/en/8b/ceea3b31aac554e10000000a114084/content.htm

Transactional RFC guarantees the following attributes:

· The call is executed exactly once in the target system.

· Calls that belong to a Logical Unit of Work (LUW) are either completely executed, or not executed at all.

If the target system is not available when the call is made, the call remains in the local wait queue. The calling dialog program can, however, proceed. If the target system does not become active within a certain amount of time, the call is scheduled as a background job.

Although tRFC significantly improves the reliability of the data transfer, it also has disadvantages. This method does not ensure that the sequence of LUWs specified in the application is observed. However, there is a guarantee that all LUWs will be transferred at some point.

Queued RFC (qRFC with Outbound Queue)

To offset this disadvantage, a serialization of tRFC is performed using wait queues. It is called queued RFC (qRFC).With this serialization, an outbound queue for tRFC was created in SAP R/3, which is therefore referred to as qRFC with outbound queue. The main features of qRFC are as follows:

·A LUW is only transferred if it has no predecessor (in reference to the sequence defined in the applications) in the participating queues. After a qRFC transaction is executed, the system attempts to start the next qRFC transaction in the sequence from the queue.

·A queue name and a queue counter are required fore each qRFC transaction for queue administration. Each tRFC call that is to be processed chronologically is assigned a queue name determined by the application."

Regards,

Raj.

Read only

Former Member
0 Likes
1,856

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.

Please have a look at below link for details:

RFC

RFC PDF

I hope it helps.

Best Regards,

Vibha

Please mark all the helpful answers

Read only

Former Member
0 Likes
1,856
Read only

Former Member
0 Likes
1,856

hi

good

check the below link hope this will help you to solve your problem.

http://help.sap.com/saphelp_nw04/helpdata/en/62/73241e03337442b1bc1932c2ff8196/content.htm

thanks

mrutyun^