How to handle circular reference in batches for cases of re-processing
We are in Pharma industry and occasional cases or re-processing take place. For formulation products (tablet), a product - when identified to be out-of-specification (OOS), needs to re-processed. We have an intermediate product (called BULK) and a finished product (FG) - which consumes the bulk. Re-processing may happen at intermediate stage (BULK) or at the final stage (FG/FINISHED PRODUCT). The output of a batch being OOS, is identified at a later stage. So, a batch for BULK item is created and FG item is charged to the BULK batch, leading to circular reference.
Also, we have another division, where API is manufactured. There, OOS items are identified at bulk stage it self and are corrected by floating another batch for the same item - where the OOS bulk is charged and the In-Spec Bulk is produced. As a result, a circular reference is created here as well.