Skip to Content
0
Former Member
Nov 27, 2006 at 06:39 PM

Locking issue in workflow with conseutive database update

594 Views

Dear Workflowers,

We are in ECC 5.0 and release 6.40. We went live for SAP in February and we are currently using workflow in PLM module for DMS and ECM.

We have been facing this locking issue randomly happened in our production and quality system. The error from workflow log is "Document XXXX is locked by WF-BATCH". I have two steps in workflow one is to update the document user( from originator to editor with custom BO "zdraw" new method "setuser") and the next step is to update the document status( BO "zdraw" "setstatus" method which inherited form standard BO "draw").

I have tried to use "wait" (1st try) , statements "BAPI_DOCUMENT_ENQUEUE", "BAPI_DOCUMENT_DEQUEUE" (2nd try) and "Commit work and wait" (3rd try) to add one step in between, however the issue remains.

The other question I had was we need to write "commit work" when we use BAPI to perform database update in the ABAP program. But I don't see "commit work" in the method of BO(for example "setstatus" in "draw" object) which performs database update. How does workflow perform DB update properly without "commit work" by referencing standard method?

Could anyone please share your expertise with the issue I am facing?

Thank you in advance,

Merta