qRFC API
for the Outbound Queue
· You use this function module to transfer a queue name to the qRFC Manager. This queue name is valid for the next “Call function ... In Background Task".
· If the import parameter NOSEND has been set to ‘X’ or ‘S’, the qRFC Manager does not send the LUW at “Commit Work” time, but saves it in the qRFC table instead.
· ‘S’: This LUW can be restarted from SMQ1 (or other function modules).
· 'X': This LUW can only be processed by one application program. It cannot be processed using the QOUT Scheduler.
· This parameter applies for the whole LUW.
· You use this function module if the “Call Function ... In Background Task" has been assigned to more than one send queue. You can use this function module together with TRFC_SET_QUEUE_NAME in one LUW.
· If the importing parameter NOSEND has been set to ‘X’ or ‘S’, the qRFC Manager does not send the LUW at “Commit Work” time, but keeps it in the qRFC table instead.
· ‘S’: This LUW can be restarted from SMQ1 (or other function modules).
· 'X': This LUW can only be processed by one application program. It cannot be processed using the QOUT Scheduler.
· This parameter applies for the whole LUW.
· You use this function module if the function called by “Call Function ... In Background Task" is to be processed in different target systems. The qRFC Manager stores all the data for this qRFC only once in the database.
· You also need to set the options AS SEPARATE UNIT and DESTINATION as importing parameters for this function.
· If the importing parameter NOSEND has been set to ‘X’ or ‘S’, the qRFC Manager does not send the LUW at “Commit Work” time, but keeps it in the qRFC table instead.
· ‘S’: This LUW can be restarted from SMQ1 (or other function modules).
· 'X': This LUW can only be processed by one application program. It cannot be processed using the QOUT Scheduler.
· This parameter applies for the whole LUW.
This function module cannot be used together with either of the function modules described above in one LUW.
You use this function module to inform the qRFC Manager that you are working with tRFC and qRFC in one LUW (mixed mode), and only if the first call is a tRFC call, not a qRFC call. This is required due to a compatibility problem between tRFC and qRFC when assigning TIDs for LUWs with different destinations.
You use these function modules to read the current content of one or all of the outbound queues. For more information, see the example program RSTRFCQR.
· You use this function module if you want to specify a queue name (single or generic, for example BASIS_TEST_*) and a destination to stop the processing of one or more queues.
· If the importing parameter FORCE is changed to SPACE, the qRFC Manager only processes LUWs that exist in the queue at STOP time. Otherwise, the qRFC Manager stops the processing transaction immediately.
· The STOP counter counts the number of STOP calls for a queue.
· You can also stop an empty (non-existent) queue. In this situation, all the LUWs that are assigned to this LUW are stored in the queue. See also the program RSTRFCQ1.
· You use this function module if you want to specify a queue name (single or generic, for example BASIS_TEST_*) and a destination to stop the processing of one or more queues. Only use this function if the queue is blocked due to a communication or network error, or if a system or application exception has occurred and the problem has been solved.
· A queue that has been stopped (by calling the function TRFC_QOUT_STOP) cannot be processed using this function.
· If the importing parameter FORCE is changed to ‘X’, the qRFC Manager resends the LUW, even if this LUW is in the status EXECUTING. Under normal conditions, you should not use this function, because the qRFC Manager automatically attempts to resolve such blockages (this occurs while the qRFC Manager is working, and the work process and application server are restarted). This parameter setting is therefore only intended for system programs. See also the program RSTRFCQ0.
· You use this function module if you want to specify a queue name (single or generic, for example BASIS_TEST_*) and a destination to continue the processing of one or more queues, regardless of whether the queue has already been stopped.
· If you change the importing parameter FORCE to SPACE, the qRFC Manager reduces the STOP counter and, if the counter is on 0, activates the queue. Otherwise, the qRFC Manager will always activate the queue regardless of the STOP counter.
· If a queue is blocked, use the above call and not TRFC_QOUT_ACTIVATE.
· If you set the importing parameter NO_ACTIVATE to ‘X’, the qRFC Manager “unlocks” the queue, but does not activate it. See also the program RSTRFCQ3.
· You use this function module if you want to specify a queue name, a “high priority” queue name, or a destination for restarting one or more queues (single or generic, for example BASIS_TEST_*).
· If you change the importing parameter TILL_STOP to SPACE, the qRFC Manager restarts the queue once the "high priority" queue is empty. Otherwise the queue is restarted when the “high priority” queue has been stopped, or when it is empty.
· If no other STOP call has been scheduled, calling this function using TILL_STOP = SPACE automatically ends the queue at the time of the call.

See also the programs RSTRFCQ4 (till_stop = space) and RSTRFCQA (till_stop= 'X').
· You use this function module when you enter a queue name, a destination, and optionally an SAP client, to display the status of the queue.
· A queue status can have the following values: READY, RUNNING, CPICERR, SYSFAIL, STOP, WAITSTOP, WAITING and NOSEND, NOSENDS and WAITUPDA.
· The status SYSFAIL results from a serious system error, and is caused by a system exception or application exception while the current LUW is being processed in the target system. In this status, the queue is blocked and cannot be automatically restarted. You can use transaction SMQ1 to resend or delete this queue. If you delete the queue, you then need to reactivate or restart it.
· In status CPICERR, the automatic repetition of the queue depends on the configuration of the destination in SM59 (default setting is “Yes”).
· If the queue has the status WAITSTOP or WAITING, the exporting parameter WQNAME displays which queue the current queue is waiting for before it is processed.
· The difference between the status NOSEND and NOSENDS is that a queue with the status NOSENDS can be activated and restarted using SMQ1, or the appropriate function module. Queues with the status NOSEND can only be read using other systems or programs.

See also the program RSTRFCQ2.
You use this function module for an overview of the current outbound queues that exist for various optional import parameters, for example, queue name, destination, SAP client.
You use this function module to delete the LUW defined by the import parameter TID, from an outbound queue.
You use this function module to delete the whole outbound queue defined by the import parameters QNAME and DEST.
You use this function module to determine the processing sequence of qRFC LUWs that have been called from a dialog task and an update task in a transaction.
· You use this function module to read qRFC LUWs from the outbound queue in the local or remote SAP system.
· If all or only some of the qRFC LUWs can only be read once from an outbound queue, (because of the parameter “single processing”), these LUWs are read as LUWs for each individual LUW or for all read qRFC LUWs.
· If you use “single processing”, the qRFC Manager sends an error code and an error message to the calling system if a system or application exception occurs when processing a LUW. All successfully processed LUWs in the outbound queue are deleted. The qRFC LUW with errors remains in the outbound queue, and the outbound queue is not informed of the error situation (only the caller of the function module is informed).
· If you do not use “single processing”, a system or application exception causes a short dump, and all read-LUWs remain in the outbound queue. They can be reread and processed at a later time.
This function displays all blocked queues, including the queues that the application has intentionally written in the queue for later processing and have the status WAITING.

This function also displays all queues that have the status WAITING. To display only the queues with errors, use the function module TRFC_QOUT_GET_ERROR_QUEUES described in 19).
This function displays information (such as the TID) for the first LUW in a queue.
This function displays all the queues that currently exist.
· This function module displays all queues that are blocked due to one of the following errors: SYSFAIL, CPICERR, RETRY, ARETRY, ANORETRY.
· Queues that have the status WAITING are not displayed.
Continue by reading the following:
qRFC API for the Inbound Queue
