Start of Content Area

 Process documentation Asynchronous RFC (aRFC)  Locate the document in its SAP Library structure

ARFC are similar to transactional RFCs, in that the user does not have to wait for their completion before continuing the calling dialog. However, asynchronous RFCs have three important distinguishing features.

      When the caller starts an asynchronous RFC, the called server must be available to accept the request.

The parameters of asynchronous RFCs are not logged to the database, but sent directly to the server.

      Asynchronous RFCs allow the user to carry on an interactive dialog with the remote system.

      The calling program can receive results from the asynchronous RFC.

You can use asynchronous remote function calls whenever you need to establish communication with a remote system, but do not want to wait for the result of the function module before continuing processing. Asynchronous RFCs can also be sent to the same system. In this case, the system opens a new session (window). You can then switch between the calling dialog and the called session, and vice versa.

To start a remote function call asynchronously, use the following syntax:

CALL FUNCTION Remotefunction STARTING NEW TASK Taskname

DESTINATION ...

EXPORTING...

TABLES   ...

EXCEPTIONS...

Note

The following calling parameters are available:

       TABLES

passes references to internal tables. All of the function module’s table parameters must contain values.

       EXPORTING

passes values of fields and field strings from the calling program to the function module. In the function module, the corresponding formal parameters are defined as import parameters.

       EXCEPTIONS

See Using Predefined Exceptions for RFCs

 

RECEIVE RESULTS FROM FUNCTION Remotefunction is used in a FORM routine to receive the results of an asynchronous RFC. The following receiving parameters are available:

       IMPORTING

       TABLES

       EXCEPTIONS

Addition KEEPING TASK keeps an asynchronous connection open after the results have been sent. The relevant remote context (role area) is kept for re-use until the caller terminates the connection.

More Information

You can find more information about aRFC in:

      Call Properties of Asynchronous RFC

      Receiving Results from an Asynchronous RFC

      Keeping Remote Contexts

      Parallel Processing with Asynchronous RFC

      You can find a description of the various statements for aRFC in:

      CALL FUNCTION - STARTING NEW TASK

      RECEIVE

      WAIT UNTIL

      RFC Example

 

 

 

 

End of Content Area