Hello Gurus,
I am trying to do paralle processing in ABAP. I am having few issues. I am calling a custom function module in a loop where I pass the invocie number and I want back the amount calcualted (based on some custom logic) in custom function module.
After the parallel processing is finsihed, I want all the amounts for different invocies to be written on output screen. But the issue is, the screen-output does not show all amounts for all invocies passed. Sometimes it shows the amount for last invocie multiple times, sometimes not.
Please help.
LOOP AT GI_VBRK INTO wa_VBRK. index = sy-tabix. CONCATENATE 'Task' index into taskname. "Generate Unique Task Name CALL FUNCTION 'Z_CALCULATE_AMOUNT' STARTING NEW TASK taskname DESTINATION IN GROUP system performing set_function_done on end of task EXPORTING P_VBELN = WA_VBRK-VBELN EXCEPTIONS system_failure = 1 MESSAGE mess communication_failure = 2 MESSAGE mess resource_failure = 3. ENDLOOP. LOOP AT GI_DATA INTO WA_DATA WRITE:/ 'AMOUNT'. WA_DATA-AMOUNT. ENDLOOP. form set_function_done using taskname. receive results from function 'Z_CALCULATE_AMOUNT' importing AMOUNT = v_AMOUNT. functioncall1 = done. WA_DATA-AMOUNT = V_AMOUNT. APPEND WA_DATA TO GI_DATA. endform.Regards,
TG