Show TOC

Keeping the Remote ContextLocate this document in the navigation structure

Use

In the FORM routine that searches for the results of an asynchronously called function with RECEIVE RESULTS FROM FUNCTION, addition KEEPING TASK prevents the connection from being closed after receiving the results of the processing.

FORM RETURN_INFO USING TASKNAME.

RECEIVE RESULTS FROM FUNCTION 'RFC_SYSTEM_INFO'

KEEPING TASK

...

ENDFORM.

The relevant remote context (roll area) is kept until the caller terminates the connection. If you specify the same task name, you can re-use the remote context and roll area.

If the remote function module performs interactive tasks such as processing lists or dynpros, screens are displayed until the calling program terminates. If the remote call is made in debugging mode, this mode is visible until the caller dialog is terminated.

Note

You should use the addition KEEPING TASK only if you want to re-use the current remote context for a subsequent asynchronous call.

Keeping a remote context increases storage load and decreases performance due to additional roll area management in the system.