I saw a lot of questions about how to disable a standard field in ME22N and ME21N. So I decided to share my solution for this problem.
First of all, SAP don't offer an standard way for reach this solution. And in my case i wanted to include some specific code to decide disable or not that field.
Lets solve the problem!
In the end of function MEPOBADI_FS_ITEM include the implicit enhancement.
ENHANCEMENT 1 ZENH_LOCK_PO_STANDARD_FIELD. "active version
data fields type table of zmmt001 with header line.
data field_selection type MMPUR_FS.
data parameters TYPE abap_parmbind_tab.
data param_line TYPE abap_parmbind.
data lock_po type ref to zcl_lock_po_field.