Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Run the execution of RFC is background

Former Member
0 Kudos

Hi

I want to run the call of the rfc in my program in BACKGROUND.

the requirement is that i want to call the rfc in infinitie loop which should process in background and depending on the next input the background job should stop.

How to achieve it.

2 REPLIES 2

former_member589029
Active Contributor
0 Kudos

You could do the following:


report xxx. "to be scheduled in a background job

DO.

  call function 'RFC' destination xxx......

* based on the return value => exit
  IF return_value EQ 'the value you want'.
    EXIT.
  ENDIF.

ENDDO.

This code will call the RFC repeatetly until the desired value is returned. In that case the loop is left and the background job will end.

However be careful with those infinite loops, because if there is a problem and you don't get the desired value back this background job will run forever.

Regards,

Michael

0 Kudos

I have a question, does using IN BACKGROUND TASK when calling a Function will trigger a dialog workprocess or the background workprocess? I am trying to triggering (using) the background work process but i still does not know how to do it. Anyone? Thank you