05-12-2011 8:23 AM
Hello,
I'm trying to write a program to update one field on CRM order documents,
but i need to run it in background with update task.
- I created a function module and called CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE functions
in this function module consequently,
- I set the tick "Update Module" and "Start.immed." in attributes of this function module,
- I called the function module with IN UPDATE TASK additon in a program
- I used COMMIT WORK command after calling this function module.
if I use IN UPDATE TASK addition ,
function is not working and not updating table VBLOG
and no return message in my workplace.
But same coding is working perfectly if I don't use IN UPDATE TASK.
Is there way to understand what's wrong, or a trace possibility?
Thanks in advance.
Bulent
05-12-2011 9:57 AM
Hi,
You check vblog table in debug mode before executing the commit statement. After commit VBLOG entry delated if executied successfully. You can check with SO01 transaction if any error occurs.
05-12-2011 10:12 AM
Hello Bulent,
The entry in VBLOG is retained if the there is any error during the update work process otherwise it is removed from VBLOG.
Why don't you check the behavior of your FM in "update debugging"? That should throw more light on how the FM works in update work process.
@Ravi:
You can check with SO01 transaction if any error occurs
If there is an error during the update the record in VBLOG updated again. Check the online documentation on [UPDATE TASK|http://help.sap.com/abapdocu_702/en/abapcall_function_update.htm].
BR,
Suhas
05-12-2011 11:39 AM
Also, please check the code in functions CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE if any implicit / explicit commit work is triggered.
Regards,
Shyam