RECEIVE

Syntax

RECEIVE RESULTS FROM FUNCTION func
                parameter list
                [KEEPING TASK].

Addition:

... KEEPING TASK

Effect

This statement can be used in a callback routine specified for the asynchronous RFC, in order to receive output parameters of an asynchronously called function func in the parameter list parameter list, and to assign return values to exceptions.

 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.

Addition

... KEEPING TASK

Effect

With the addition KEEPING TASK, the asynchronous RFC connection is retained, as is the context of the called function module along with it. When a new call is made with the same task ID, the same global data of the function group is addressed. Without the addition KEEPING TASK, an asynchronous RFC connection is finished after the remote function is executed or the results are copied.

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

RECEIVE - parameter_list

Syntax

... [IMPORTING  p1 = a1 p2 = a2 ...]
    [TABLES     t1 = itab1 t2 = itab2 ...]
    [EXCEPTIONS exc1 = n1 exc2 = n2 ... [MESSAGE mess]
                [OTHERS = n_others]].

Effect

With these additions, the defined formal parameters of the function module specified in func are transferred to the actual parameters of the callback routine in the calling program , and return values are assigned to non-class-based exceptions. The meaning of the additions is the same as for a synchronous RFC. In particular, the special exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE can be assigned return values. If no exceptions occur, RECEIVE sets the contents of sy-subrc to 0.

WAIT UNTIL