Symptom
After posting confirmation with material documentation using API API_PROD_ORDER_CONFIRMATION_2_SRV, lock error can be found in Reprocess Goods Movements(COGI).
message : CO469 > Order xxxxxx is already being processed by YYYYYY.
YYYYY is the user ID who called the API.
The same issue can also occurs when cancelling the confirmation.
Environment
SAP S/4HANA Cloud, Public Edition.
Reproducing the Issue
Use API API_PROD_ORDER_CONFIRMATION_2_SRV to post confirmation with goods movement for a production order.
Cause
For API or cancellation of a production order, the automatic goods receipts or backflushes are always performed in the update program.
This means that the posting of goods movements in the update program is started from an online process. For this, an update process is created in addition to an online process. The update process runs independently of the online process. Due to this, the lock issue can happen. This cannot be avoid.
Resolution
Use app "Schedule Posting of Predefined Confirmation Processes" to create and schedule a job to process goods movements after confirmation or cancellation.
If the job can be scheduled for several times a day, every hour, or even more frequently, it could clean up errors like locks in COGI.
Keywords
CO469, API_PROD_ORDER_CONFIRMATION_2_SRV , COGI, Reprocess Goods Movements, confirmation, goods movement. , KBA , PP-SFC-EXE-CON-2CL , Confirmation (Public Cloud) , Problem