Hi,
Did you post invoice for the PO? If so, either you cancel the invoice first and then revoke the entry sheet or check the OMBZ configuration. You may check the note: 1519377 - M7021 when trying to Cancel / Reverse a Material Document after an Invoice Posting. for more details.
Revert back if you are getting M7021 even if the PO is not invoiced.
Regards,
AKPT