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: 

Does RFC call in background task ensure it runs in background process?

Former Member
0 Kudos

Hi Gurus,

I called one RFC enabled function module in BACKGROUND task without giving any destination as shown below.

 
CALL FUNCTION 'ZK_XX' IN BACKGROUND TASK
            EXPORTING.......

COMMIT WORK.

When I put an infinite inside the RFC FM and checked in SM50. It was running in dialog work process.

Then I added the below code after the call of the FM and COMMIT WORK, and ran the program after putting an infinite loop inside the RFC.

 
CALL FUNCTION 'ZK_XX' IN BACKGROUND TASK
            EXPORTING.......

CALL FUNCTION 'START_OF_BACKGROUNDTASK'
            EXPORTING
              startdate = sy-datum
              starttime = sy-uzeit.

COMMIT WORK. 

Now SM50 had two work processes occupied, one was a dialog one and the other was a background one.

I could conclude for sure that calling the RFC in background does not mean that it will run in background work process.

Also when the FM START_OF_BACKGROUNDTASK is called after it, it occupies two WPs as explained above. Wanted to confirm from the experts regarding this behaviour of RFC call in background task. Because if we take the term 'In background task' in literal sense, it creates the confusion that it will always run in background WP.

Note: I have read the SAP Help regarding this topic and want ot just confirm the behaviour and my understanding.

Thanks a lot for your help!!

Warm Regards,

Raveesh

Edited by: Raveesh Saurabh on Dec 7, 2011 10:12 AM

1 REPLY 1

Former Member
0 Kudos

Can anyone please reply.

Thanks,

Raveesh