Find a discrepancy in the creation of the transactions. Note that the WIP assembly return has a transaction id smaller than the WIP completion though the creation times differ in this aspect.
Cause
In this case, the txn id of completion is larger than return
txn. So, in processing return txn, the prior completion qty was zero.
That made the return value so big and hit variance account for the
discrepancy btw returned value and reduced inventory value.
This is explained in the following bug: Bug 9502821> - WRONG VALUE IN ACCOUNTING OF WIP COMPLETION RETURN TRANSACTION
Solution
To implement the solution, please execute the following steps:
1. Download and review the readme and pre-requisites for :R12.BOM.C
2. Ensure that you have taken a backup of your system before applying the recommended patch.
3. Apply the patch in a test environment.
4. Confirm the following file versions: patch/115/sql/CSTLCWPB.pls 120.1.12010000.2 patch/115/manualsteps/ad_apply_patch.xml 120.4 patch/115/sql/CSTPACPB.pls 120.1.12010000.2
5. Retest the issue.
6. Migrate the solution as appropriate to other environments.