SAP Materials Management
In standard SAP setup PO line item can be deleted even after invoice document is posted. Normal business process / users may think its bug in the system. But this is a standard SAP behavior and in case if setting up of deletion indicator is to be restricted then it can be achieved using enhancements (user exit)
The reason why this option has been provided has be explained in SAP Note : 1658472 - Item can be deleted in transaction ME22N after full goods receipt/invoice receipt.
When all the procurement process is finished, it must be possible to flag the Purchase Order item for deletion for archiving purposes.
Items are considered closed if the following criteria are fulfilled and can be deleted for archive processing.
Items are considered as closed if:
SAP Note Reference : https://launchpad.support.sap.com/#/notes/1658472