The procedure below describes how to program the queued RFC with send queue in its basic form (that is, without the addition AS SEPARATE UNIT and without "mixed mode").
Prerequisites
Procedure
To implement the qRFC with send queue, proceed as follows:

REPORT ... .
...
DATA Q_NAME LIKE
TRFCQOUT-QNAME .
Q_NAME = 'BASIS_TEST_Q1'.
CALL FUNCTION '
TRFC_SET_QUEUE_NAME 'EXPORTING
QNAME = Q_NAME.
CALL FUNCTION 'RFC_FUNCTION_1'
IN BACKGROUND TASK
DESTINATION 'DEST'
EXPORTING ...
TABLES ... .
...
Q_NAME = 'BASIS_TEST_QM'.
CALL FUNCTION '
TRFC_SET_QUEUE_NAME 'EXPORTING
QNAME = Q_NAME.
CALL FUNCTION 'RFC_FUNCTION_N'
IN BACKGROUND TASK
DESTINATION 'DEST'
EXPORTING ...
TABLES ... .
COMMIT WORK.
* NEXT LUW
...
Result
The system stores the queue specifications in table TRFCQOUT.
With each COMMIT WORK, the system determines a counter that is used to keep the sequence of transaction processing.

As an introduction, execute the simple demo program RSTRFCT0.