2010 Oct 18 12:52 PM
Hi experts,
I have got some strange problem:
In my program there is IDOC_INPUT_ORDERS which create SO. After that I have sales order number and it is OK.
In same program I want to change created SO so I wrote:
SET UPDATE TASK LOCAL.
BAPI_SALESORDER_CHANGE
but the BAPI return error message that SO number is now processed by WF-BATCH user ...
Also the SO created by IDOC is not set as IN UPDATE TASK so what is wrong ?
Really thanks.
Daniel.
2010 Oct 18 1:13 PM
WF-BATCH is a workflow system user which isprocessing it. Do you have any workflow getting triggered in SAP as soon as a SO is created. If yes try to change the sales order via tcode look at what it says. Second option aspointed out earlier make lopp wait step of 3-4mins if that is the case.
Nabheet
Hi experts,
I have got some strange problem:
In my program there is IDOC_INPUT_ORDERS which create SO. After that I have sales order number and it is OK.
In same program I want to change created SO so I wrote:
SET UPDATE TASK LOCAL.
BAPI_SALESORDER_CHANGE
but the BAPI return error message that SO number is now processed by WF-BATCH user ...
Also the SO created by IDOC is not set as IN UPDATE TASK so what is wrong ?
Really thanks.
Daniel.
2010 Oct 18 12:59 PM
Sales Order change and create updates MANY database tables. The update process is therefore understandably a bit lengthy. When I worked with SD, it was not uncommon to create a sales order and have it show locked for 2-3 minutes immediately after SAVE press. I would suggest that you either build in some delay before you attempt a change or (better yet) do your changes to sales orders created (should be able to capture the doc number in the return) in a later, subsequent process.
2010 Oct 18 1:10 PM
Thanks for your reply.
First of all, the SO which is created from IDOC is processed in dialog. I am waiting for him like you said ~ 2 minutes. It is not a asynchronous process I think.
Furthemore when I put some breakpoint in BAPI_SALESORDER_CHANGE I can see created SO in VBAK.
Whether my thinking is correct that it could be a reason of COMMIT WORK (asynchronous commit) command in IDOC_INPUT_ORDERS fm ?
Maybe BAPI_TRANSACTION_COMMIT will help after IDOC processing ... ?
Thanks
2010 Oct 18 1:13 PM
WF-BATCH is a workflow system user which isprocessing it. Do you have any workflow getting triggered in SAP as soon as a SO is created. If yes try to change the sales order via tcode look at what it says. Second option aspointed out earlier make lopp wait step of 3-4mins if that is the case.
Nabheet
2010 Oct 18 2:09 PM
I have made the next tests and it seems to that WF-BATCH user is blocking the SO.
After the 3-4 minutes waiting at breakpoint, WF-BATCH release the SO and everything was fine.
Because during creating SO also workflow is triggered the question is how to make some kind of COMMIT WORK and WAIT after IDOC_INPUT_ORDERS is performed.
Is there any chance ? Or check somehow that workflow process is finished/closed?
BTW. Thank you guys for the localisation of my problem ...
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |