12-07-2011 9:11 AM
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
12-08-2011 4:19 AM