When Production Order create against Sales Order
If I have applied reason of rejection manually while creating sales order then system deletes the Production Order relevant to that Sales Order Item.
But if I have applied same reason of rejection at FORM userexit_save_document_prepare then system saves the order with Reason of rejection but it does not delete the Production Order rather it runs MRP.
Please let me know where I can applied reason of rejection to restrict the Production order creation in sales order.
Note - If I have applied the reason of rejection at the time of entering the Sales Item then it restrict the sales order to create through interface with reason "unable to update schedule lines since item line has been grayed out". So we need to put the reason of rejection at a time before creating Production Order in sales order.