‎2009 Jan 20 1:22 PM
Hi all!
I've a problem calling a function in background task. This is the involved code:
CALL FUNCTION 'ZRECEP_COMPRA_DIRECTA_MMPP' IN BACKGROUND TASK
EXPORTING
num_pedido = wg_24_temp-pedido
entrega_exp = wg_24_temp-entrega
estado = wg_24_temp-estado
TABLES
datos_pedido = wt_sd_105_temp[]
wt_ltap = wt_ltap_temp[].
The problem is that function is not executed on background. I execute this code and check SM50, and the process is not there. But the most incredible is that sometimes the background process is executed fine.
I've this code at the beginning of the funcion ZRECEP_COMPRA_DIRECTA_MMPP to ensure the background process could be seen (and debugged) on SM50 (my user is DANIP)
if sy-uname = 'DANIP'.
data: aux value '2'.
while aux = '2'.
endwhile.
endif.
I'm on SAP ECC 6.0
Anybody knows if exists any system parameter which maybe controls something related to background processing?
Thanks and Regards
Dani
‎2009 Jan 20 1:25 PM
Hi
The function module calling in BACKGROUND TASK way runs only if a COMMIT WORK is forced: so have u inserted a COMMIT WORK after calling your fm?
Max
‎2009 Jan 20 1:25 PM
Hi
The function module calling in BACKGROUND TASK way runs only if a COMMIT WORK is forced: so have u inserted a COMMIT WORK after calling your fm?
Max
‎2009 Jan 20 1:33 PM
Hi Max
There was a COMMIT after this code but inside a LOOP that not always was executed. This is the reason why sometimes it works fine. Now i've put another COMMIT inmediately after the CALL FUNCTION
You've solved my problem
Thanks and regards!!
Dani