Get Example source ABAP code based on a different SAP table
ID RECEIVE • RECEIVE RESULTS FROM FUNCTION ABAP Statement
RECEIVE> Short Reference >
ABAP_SYNTAX RECEIVE RESULTS FROM FUNCTION func> $[KEEPING TASK$]> parameter_list>.>
ABAP Addition ... KEEPING TASK>
What does it do? 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.
Latest notes:
Callback routines without a RECEIVE> statement are possible in the syntax but are not desired and are to be viewed as programming errors. Callback routines without a RECEIVE> statement behave implicitly in the same way as when the addition KEEPING TASK> is specified for RECEIVE>.
Before the statement RECEIVE> is executed in a callback routine, the current work process is interrupted in order to receive the data. 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. This results in a database commit> except during the update>. ABAP_HINT_END • KEEPING TASK RECEIVE RESULTS FROM FUNCTION
ABAP Addition
What does it do? The addition 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 pool is addressed. A destination specified directly using DESTINATION> can 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 have been transferred.
Latest notes: The addition KEEPING TASK> should be used only if the RFC session of the called function module is required for further function calls. ABAP_HINT_END