‎2012 Oct 29 9:40 AM
Hi experts,
I have issue to call a z-fm in background task in report program. This piece of code is working when I call the z-fm in background task in a user-exit.
But when I put these piece of codes in a report program, it doesn't even get triggered as I check from SM58 and no entries there.
Did I miss something here?
LOOP AT gt_mara INTO gwa_mara.
CALL FUNCTION 'Z_FM_MM_PLANT_VAL_EXT' IN BACKGROUND TASK
EXPORTING
tcode = gc_mm01
wmara = gwa_mara
wmarc = gwa_source_plant
wmbew = gwa_source_valuation.
ENDLOOP.
Appreciate your opinions, thanks.
Regards,
Marlson
‎2012 Oct 29 9:47 AM
‎2012 Oct 29 9:47 AM
‎2012 Oct 29 9:52 AM
Hi Marslon,
Please make sure that the FM is not using any of the frontend services like the class cl_gui_frontend_services. If yes it wont work in the background jobs.
I had a similar issue where this was the rootcause.
Regards,
Akhil