Application Development and Automation 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: 
Read only

User WF-Batch is already processing Purchase Order

Former Member
0 Likes
3,669

Hi Experts,

I am getting this error message

'User WF-Batch is already processing Purchase Order '

We have an interface and we are trying to Post Invoice for the POs, if we dont find SAP PO for an external PO number, we will create Retro PO(Program will create a PO with details in SAP and will release with  BAPI_PO_RELEASE).

This error is not consistent, its appearing sometimes only, for the scenario when one SAP PO and one Retro PO are getting posted to One Invoice.

<Priority normalized by moderator>

Thank you so much in advance for your help.

Regards,

Arpit Varma

Message was edited by: Vinod Kumar

Hi Experts,

I am getting this error message

'User WF-Batch is already processing Purchase Order '

We have an interface and we are trying to Post Invoice for the POs, if we dont find SAP PO for an external PO number, we will create Retro PO(Program will create a PO with details in SAP and will release with  BAPI_PO_RELEASE).

This error is not consistent, its appearing sometimes only, for the scenario when one SAP PO and one Retro PO are getting posted to One Invoice.

<Priority normalized by moderator>

Thank you so much in advance for your help.

Regards,

Arpit Varma

Message was edited by: Vinod Kumar

3 REPLIES 3
Read only

Aashish28
Contributor
0 Likes
1,900

Hiii,

        Have you configure workflow for PO Release strategy ??? Because in workflow for background processing WF-BATCH user is responsible , so for the particular scenario which was you described ( when one SAP PO and one Retro PO are getting posted to One Invoice ) when BAPI_PO_RELEASE calls at that time i thing your workflow trigger and your PO processed by background user WF-BATCH please check your workflow for PO Release strategy something that has missed , or you can do one thing when you got message (User WF-Batch is already processing Purchase Order ') RUN report SWEL ( before this please turn on event trace - swels )check whether your workflow is triggering or not  for your scenario and you can check background job and debug it .

Read only

Former Member
0 Likes
1,900

dear varma,

It seems PO is in SM12 lock queue, before creating Retro PO call the below FM "DEQUEUE_EMEKKOE" and delete the lock for PO.

regards

goudham

Read only

0 Likes
1,900

goudham thangavelu wrote:

It seems PO is in SM12 lock queue, before creating Retro PO call the below FM "DEQUEUE_EMEKKOE" and delete the lock for PO.

Oh boy... If a document is locked, then it is needed to complete a transaction. Forcing such lock removal could jeopardize data integrity. This is very dangerous. Kindly refrain from suggesting such solutions.

To OP - lock errors usually occur because of timing. One transaction need to complete fully before the next one may start. You can look up any lock error question on SCN and will find the same advice everywhere. Either insert some wait period between the transactions or consider doing all the "regular" transactions first and then all the "retro" ones afterwards.