Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IN UPDATE TASK problem with CRM_ORDER_SAVE

bbalci
Contributor
0 Kudos

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

3 REPLIES 3

ravi_lanjewar
Contributor
0 Kudos

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.

SuhaSaha
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Also, please check the code in functions CRM_ORDER_MAINTAIN and CRM_ORDER_SAVE if any implicit / explicit commit work is triggered.

Regards,

Shyam