RECEIVE RESULTS FROM FUNCTION func
This statement must be used in a callback routine specified in an
asynchronous RFC to receive output parameters
of an asynchronously called function
func in the parameter list
parameter_list and to handle exceptions.
Callback routines without a
RECEIVEstatement are possible in the syntax, but are to be avoided and viewed as programming errors. Callback routines without a
RECEIVEstatement behave implicitly in the same way as when the addition
KEEPING TASKis specified for
Before the statement
RECEIVEis executed in a callback routine, the current work process is interrupted so that the data can be received. If this has not already been done by another action, such as by using the statement
WAIT FOR ASYNCHRONOUS TASKS, the callback routine is executed after an implicit switch of the work process. A database commit is performed, except during the update.
... KEEPING TASK
KEEPING TASK retains the asynchronous RFC connection, and therefore also the
RFC session of the called
function module. When a new call is made with the same task ID, the same global data of the function
group is addressed. A destination specified directly using
be specified again, but does not have to be.
DESTINATION IN GROUP cannot
be used to specify a group if a new call is performed. Without the addition KEEPING
TASK, an asynchronous RFC connection is ended after the remote function is executed or after the results are applied.
KEEPING TASK should be used only if the RFC session of the called function module is needed for further function calls.