Management of faulty productions in MRP

Hello there

I was examining the MRP module, the production and dismantling works are very successful, in addition, some products may be faulty during production, it should be deducted from the raw material stock produced incorrectly, but not added to the finished product stock.

How do you go about this?

Thank you from now.