Show TOC

Example documentationqRFC with Outbound Queue Locate this document in the navigation structure

 

The transactional behavior of tRFC is enhanced by a serialization mechanism with qRFC. This mechanism can be realized using an outbound queue or an outbound and additional inbound queue.

The following programming example shows qRFC communication with an outbound queue (optional parameters are shown with '*'):

qRFC with Outbound Queue

Syntax Syntax

  1. REPORT rstrfct0. 
  2. ...
  3. CALL FUNCTION ‘TRFC_SET_QUEUE_NAME’.
  4.   EXPORTING
  5.     QNAME                    = ‘queue1’
  6. *   NOSEND                   = ' '
  7. *   TRFC_IF_SYSFAIL          = ' '
  8. *   CALL_EVENT               = ' '
  9. *   EXCEPTIONS
  10. *   INVALID_QUEUE_NAME       = 1
  11. *   OTHERS                   = 2
  12. .
  13. CALL FUNCTION ’rfc_function’
  14.  DESTINATION rfcdest
  15.  IN BACKGROUND TASK
  16.  ( AS SEPARATE UNIT )
  17.  EXPORTING ...
  18.  TABLES ...
  19. ...
  20.  
  21. COMMIT WORK.
  22.  
End of the code.
Process Flow
  1. You can set the queue name for the outbound queue by calling one of the following function modules:

    • TRFC_SET_QUEUE_NAME

    • TRFC_SET_QUEUE_NAME_LIST (for multiple queue assignments for each qRFC call)

    • TRFC_SET_QUEUE_RECEIVER_LIST (for multiple destinations for each qRFC call)

  2. Call tRFC (CALL FUNCTION... IN BACKGROUND TASK)

    At the time of the COMMIT WORK, the qRFC manager creates a counter for the LUW .

Note Note

Serialization is done by a Queue Identifier. This Queue Identifier is made up of the Client, Queue Name, Destination and Queue Counter parameters.

End of the note.

More Information

For detailed information on programming the outbound queue, see: