Skip to content

ABAP Keyword Documentation →  ABAP - Reference →  Data Interfaces and Communication Interfaces →  Remote Function Call →  CALL FUNCTION - RFC →  CALL FUNCTION - STARTING NEW TASK 

RECEIVE

Short Reference

Other versions: 7.31 | 7.40 | 7.54

Syntax


RECEIVE RESULTS FROM FUNCTION func 
                [KEEPING TASK]
               parameter_list.

Addition

... KEEPING TASK

Effect

You can use this statement 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.


Notes

  • If a function module is started multiple times in a row using asynchronous RFC, the execuction sequence is not fixed, instead it depends in the system availability.
  • If the statement RECEIVE is used in a callback routine, the current work process must be interrupted before the routine is executed, so that the data can be received. If this has not already been done by another action, such as by using the statement WAIT UNTIL, the callback routine is executed after an implicit switch of the work process. A database commit is performed, except during the update.

Addition

... KEEPING TASK

Effect

The addition KEEPING TASK retains the asynchronous RFC connection, and therefore also the context 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 DESTINATION can be specified again, but does not have to be. You are not allowed to specify a group using DESTINATION IN GROUP if a call is performed again. Without the addition KEEPING TASK, an asynchronous RFC connection is finished after the remote function is executed or the results are copied.


Note

You must only use the addition KEEPING TASK if the context of the called function module is required for other function calls.

Continue

RECEIVE - parameter_list