Start of Content Area

This graphic is explained in the accompanying text qRFC with Outbound Queue  Locate the document in its SAP Library structure

qRFC communication is an extended form of tRFC communication. It adds a serialization concept to the transactional concept of tRFC. The following figure shows you a programming example for qRFC communication with outbound queue (optional parameters are shown in blue):

report rstrfct0.

...

 

call function ‘TRFC_SET_QUEUE_NAME’.

  EXPORTING

    QNAME                    = ‘QUEUE1’

*   NOSEND                   = ' '

*   TRFC_IF_SYSFAIL          = ' '

*   CALL_EVENT               = ' '

* EXCEPTIONS

*   INVALID_QUEUE_NAME       = 1

*   OTHERS                   = 2

.

call function ’RFC_FUNCTION’

 destination RFCDEST

 in background task

 ( as separate unit )

 exporting ...

 tables ...

 

...

 

commit work.

 

 

You use one of the following function modules to define the queue name:

·        TRFC_SET_QUEUE_NAME

·        TRFC_SET_QUEUE_RECEIVER_LIST (inbound queue)

·        TRFC_SET_QUEUE_NAME_LIST (outbound queue)

Call tRFC (using Call Function … in Background Task).

The qRFC Manager creates a counter for the LUW when the Commit Work is executed.

Note 

The Queue Identifier (Client, Q Name, Destination, and & Q Counter) is responsible for serialization.

 

 

Relationship Between LUW and TID

·        Each application LUW begins with the first Call Function … in Background Task (tRFC call) and finishes with the first Commit Work.

·        Each LUW can contain various sub-LUWs.

·        A sub-LUW contains a tRFC call if the AS SEPARATE UNIT option is used.

·        A transaction ID (TID) is assigned to a sub-LUW.

·        An LUW can contain both tRFC calls and qRFC calls (mixed mode).

 

Note

To manage queues, you can use queue APIs (function modules) such as lock, unlock, activate, or ask for queue state.

 

Caution 

If no user has been entered in transaction SM59 for the current destination, qRFC LUWs can be executed under a different user in the receiving system.

 

Note

Some applications use qRFC with outbound queue to improve system performance and not for serialization. If this is the case, you can switch automatically from the qRFC LUW with outbound queue to the tRFC LUW to avoid a hanging queue if a SYSTEM_FAILURE occurs.

 

 

Continue by reading the following:

qRFC with Inbound Queue

 

 

 

End of Content Area