In some of business case of MM ( Material Management ), you need to make all field in commitment item in SAP Change Purchase Requisition ( ME52N ) to be read only based on condition.
You can configure most of field of SAP Purchase Requisition ( ME52N ) to be input or read only through SPRO Configuration but SPRO have a limit, it can’t control all field on Commitment Item Tab.
For this case , i will use example : User cannot change commitment Item data in purchase Requisition ( Preq ) document after that particular Preq document has been released 5 ( EBAN-BANPR )
Basically, SAP Preq ( ME52N ) commitment item field always input-able although all other field read only. but you can control it by creating an enhancement point .
You need to create enhancement point which located in KACB Function Group and LKACBF01 Include program and in feldmodifikation_normal subroutine.
You can see on the picture above, I create enhancement-point and put ths code:
data : ls_eban type eban.
select single * from eban into ls_eban where banfn = cobl–awkey.
if ls_eban–banpr = ’05’.
loop at gt_coblf into l_coblf.
l_coblf–input = 0.
modify gt_coblf from l_coblf TRANSPORTING input.
Note : You just need to modify data ( L_COBLF-INPUT = 0 ) in internal table GT_COBLF .
Then the result is :