2011 May 10 11:36 AM
I guess, if I called 2 FM in background task, both of them will be executed one by one.
if I called 2 FMs in update task, only the last FM will be executed.
Isn't it?
I got a scenario here, I use a export to DATABASE to flag sth. This flag will be checked in a EXIT, which will be called several times. This part of logic will be also called in background task FM. How can I delete this DATABASE flag after all the execution of the program?
2011 May 10 12:57 PM
Hi,
Call FM in background creates a session in background mode in seperate LUW , you can view this in SM58.
If the FM is remote enabled you can achive parallel processing using this technique.
A FM callled on Update task will get executed after the first commit work but the attribute of the FM should be Update Module
Regards
Bikas
2011 May 10 1:53 PM
> Call FM in background creates a session in background mode in seperate LUW , you can view this in SM58.
> If the FM is remote enabled you can achive parallel processing using this technique.
[IN BACKGROUND TASK|http://help.sap.com/abapdocu_702/en/abapcall_function_background_task.htm] doesn't facilitate parallel processing, it is used to maintain the transactional integrity of the RFC call. Hence the name tRFC or "transactional" RFC!
Parallel processing is possible via the [STARTING NEW TASK|http://help.sap.com/abapdocu_702/en/abapcall_function_starting.htm] addition.
2011 May 11 3:53 AM
Is there any way to check whether a FM called in background task has been finished?
2011 May 11 4:05 AM
Yes, you can use SE30 and after process you can search the msg use the FM name.
How to use SE30, u can choose the Transaction at SM35, and process then back, and click at Evaluate, then choose Hit list, you will find the msg.
2011 May 11 4:12 AM
got the FM ID_OF_BACKGROUNDTASK to get the TID then I think I can check the status of it with FM STATUS_OF_BACKGROUNDTASK .
hi Eric,
Is FM called in BACKGROUND TASK the same as we schedule a program run in BACK GROUND?
2011 May 11 5:54 AM
got the FM ID_OF_BACKGROUNDTASK to get the TID then I think I can check the status of it with FM STATUS_OF_BACKGROUNDTASK .
Correct.
Is FM called in BACKGROUND TASK the same as we schedule a program run in BACK GROUND?
No, it is not the same. You can draw analogy of BACKGROUND TASK to CALL FUNCTION ... IN UPDATE TASK. Read the online documentation for further details.
2011 May 12 7:14 AM
hi Suhas Saha , thanks for your reply. But it seems that once the FM executed successfully, the data will be deleted from the DB table, and I can not get any thing from the FM STATUS_OF_BACKGROUNDTASK.
should I use a ENDLESS LOOP to check the status of the FM?
2011 May 12 8:06 AM
Hi Yichao,
You could check with your BASIS team and find out the type(success/failure) and no of records that they maintain for TRFC logs, i guess the Tcode is RZ21.
I am not sure how you can achieve this using endless loop.
Regards,
Chen