qRFC and Using the RFC Library
Instead of using tRFC, an SAP system application can use qRFC with outbound queue from an SAP system to call RFC functions that are available in a tRFC server program being used by the RFC Library.
Every SAP system application that works with an external qRFC program can use qRFC with outbound queue instead of tRFC, for a LUW serialization. This leads to improved performance in the sending SAP system.
Instead of RfcIndirectCall or RfcIndirectCallEx, a tRFC client program has to use the new call RfcQueueInsert to prompt the target SAP system to save the inbound LUW in the defined inbound queue for subsequent processing. If the RfcQueueInsert call is returned successfully, the qRFC client has to execute RfcConfirmTransID. Otherwise, it has to repeat the RfcQueueInsert call with the same TID as before.
A qRFC client program has to execute the following RFC calls:
For connecting to an SAP system
The RFC Library uses this call to obtain a TID generated by the SAP system.
If errors occur, the qRFC client program has to restore the connection later and repeat the call. Otherwise, the qRFC client program can assign this TID to the qRFC data.
The RFC Library groups all the data belonging to an RFC function together with the TID, the queue name, and - optionally - the queue counter. It then sends this data to the SAP system using the tRFC protocol (with enhancements for qRFC with inbound queue).
If errors occur, the qRFC client program has to restore the connection later and repeat the call. The program then has to use the old TID, and not obtain a new TID using RfcCreateTransID. Otherwise, there is no guarantee that this RFC function will be executed exactly once in the SAP system.
Once this call has been executed successfully, the LUW is saved completely in the inbound queue. The qRFC client program can then update its own TID Management (for example, by deleting the TIS entries).
Unlike tRFC/qRFC between SAP systems, a LUW from a qRFC client program contains one RFC function only.
If the target SAP system does not support qRFC
with inbound queue, it processes the inbound LUW immediately and does not
return an error message to the qRFC client program. If this happens, the qRFC
client program works in the same way as a tRFC client program.
Every application in the SAP system can use
qRFC with outbound queue instead of tRFC to communicate with an external tRFC
server:
■ Minimal changes are required in the ABAP code.
■ No changes are required in the code on the tRFC server.
■ System performance is improved.
Use the new API call RfcQueueInsert instead of RfcIndirectCall or RfcIndirectCallEx in a tRFC client program to write an LUW directly to an inbound queue in an SAP system (available in RFC Library version 4.6A and higher).
● No more waiting for LUW processing to finish when using RfcQueueInsert
● Once the RfcQueueInsert call has been returned, you still need to execute RfcConfirmTransId.
Do not forget to register your queue in the
QIN Scheduler so that it can be activated automatically.