Hello Lavinia,
I only find information about setting deletion flag to prouction orders can be achieved with below:
The best option would be an implementation of BAdI WORKORDER_UPDATE,
method REORG_STATUS_ACT_CHECK. You can use transaction SE18 to display
a BAdI definition and to create an implementation. Please note that
this BAdI is only available as of release ECC 6.00 and higher.
Best regards,
Jason