1/21/2016 9:17:55 AM
This blog will show you overview about qRFC Monitor (Inbound Queue)
Release 3.0 you can execute function modules asynchronously in another SAP system or in an external program. The function modules are not called immediately, but when the next COMMIT WORK is executed. Until this time point the calls are collected in an internal table. They form one Logical Unit of Work for each destination ( LUW).
With COMMIT WORK all calls are processed in an available work process in the sequence they were called in. If update records were also used before the COMMIT WORK, the asynchronous function modules are not executed until the update function modules can be processed without errors.
The transactional asynchronous tRFC guarantees that all database operations are fully executed or, if one of the function modules responds with a termination, they are fully rejected (rollback). If an LUW is executed without errors, it cannot be executed again. In some cases it may be necessary, to rollback an LUW in an application program, for example, because a table is locked.
The function module RESTART_OF_BACKGROUNDTASK is used for this. It executes a rollback and the LUW is executed again at a later time. Each LUW is assigned a Transaction ID. You only have to know the ID, if, for example, you want to execute the function module in a BACKGROUND TASK. The function module ID_OF_BACKGROUNDTASK returns the ID of the LUW. It must be called after the 1. CALL... IN BACKGROUNDTASK and before COMMIT WORK. With the function module STATUS_OF_BACKGROUNDTASK and the ID you can check whether the LUW can be executed error free at a later time. Usually the LUW is executed immediately after COMMIT WORK in the target system specified. If it is to be started at a specific time, you can set a time with the function module START_OF_BACKGROUNDTASK.
This function module is also in the LUW, and is called after 1. CALL... IN BACKGROUNDTASK and before COMMIT WORK.
All calls are contained in tables ARFCSSTATE and ARFCSDATA. Each LUW is identifed a globally unique ID. When a COMMIT WORK is executed, all the calls with this ID are executed in the target system. The system function module ARFC_DEST_SHIP transports the data to the target system nd the function module ARFC_EXECUTE executes the function module alls. If an error or exception occurs in one of the calls, all of the atabase operations made in the previous calls are reset. (ROLLBACK) nd an error message is written to file ARFCSSTATE. This error message an be evaluated in Transaction SM58.
If an LUW could be successfully executed in the target system, the function module ARFC_DEST_CONFIRM is called that confirms the successful execution in the target system. Then the affected entries in RFCSSTATE and ARFCSDATA are deleted.
If the target system could not be reached, because, for example, the connection is not active, the report RSARFCSE is scheduled in the background with the ID as the parameter and it is called at regular intervals The standard values can be displayed in 'Info -> System settings' in SM58. If you want to use your own settings for each destination, you can specify these in the TRFC options in Transaction M59. If no connection can be made in the time scheduled, the entry in ARFCSSTATE will be deleted after a length of time that you specify. The deletion is done in the background in report RSARFCDL.
Call the transaction in the debugger and choose 'Goto -> settings' and choose 'Goto -> settings' and select the field 'In Background Task:...'. The LUW will not be sent immediately.
It is also possible to execute function modules implemented in 'C' asynchronously. (Connection type TCP/IP in SM59). The function modules are implemented in connection with the RFC-API. The function modules ARFC_DEST_SHIP and ARFC_DEST_CONFIRM are contained here and call the relevant functions.
The Windows API does not yet support asynchronous calls.
The once-only execution must be guaranteed by the implementation of the function module.
If you like this blog, please share (Facebook/LinkedIn/Google+) to click below links so it will reach to others.
FloydNef -1/14/2017 12:09:37 AMmanual for android tablet ritalin kopen online zonder recept ipad vs other tablets
Abhilaash Ravichandran -4/25/2016 11:44:56 AM
Very useful Information. thank you