Skip to Content

Call FM remotely in Background task


I need some help regarding calling function modules through RFC call in background task in 4.6C.

We are calling some standard FMs in our Z program to perform some actions in a remotely called system and based on the return value from the RFC call we are deciding further processing steps in our program. The Z program takes lot of execution time (due to huge data) and hence is executed in background and when the RFC call is made to the standard FM, the FM also is taking long execution time. Because of the long execution time in the remote system (which also is 4.6C SAP system), a TIME_OUT dump is occuring and due to this the original job (Zprogram) also gets cancelled.

As a solution we are trying to implement the RFC call as a background task, so that both the zprogram and the RFC call happen in background and get executed successfully.

But, while calling the RFC FM in background it is not allowing us to fetch any return values (which is in accordance with the standard SAP behaviour). For us to proceed further in our program we need the return value and hence want an idea to approach this issue.

Please suggest any means to solve this problem.

Many thanks,


Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2010 at 05:56 PM

    You can divide your program into two parts. Whatever part of the program is based on the return code, copy that into a separate remote function module. lets call it as FM1.

    Inside the RFC that gets executed as a background task, you can call function module FM1 and pass back all the values including the return code.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ganesh,

      Thanks for the reply.

      We already have an alternate solution to adjust the design of the Z program but we want to try out any possible solutions from SAP standard (any flag to be set or any settings to be done) instead of changing the design of our Z program.

      We would be really glad to have such a solution as the design change would take a lot of effort and is similar to developing a new program.