cancel
Showing results for 
Search instead for 
Did you mean: 

Disable fields to edit using BADI for ME22N

masna_7
Participant
0 Kudos
326

hi Experts,

 

Can anyone please let me know how to Disable/Grey Out the fields using a BADI for ME22N.

I am trying to disable the fields PO Quantity and Net Price at Item Overview tab, if this does not work particularly I can disable the whole tab to edit as well.

I am using BADI GOS_SRV_SELECT to try and disable the fields to edit in ME22N transaction. The greying out condition is based on EKKO-UNSEZ = 'Pending'.

Are we actually disabling the fields to edit here ? If yes, how ?

or are we displaying any error message when someone edits the field values ? 

Can someone help me with the logic Please ?

 

Help Greatly appreciated !

Thanks

View Entire Topic
raymond_giuseppi
Active Contributor
0 Kudos

The GOS_SRV_SELECT is linked to the GOS, handle the attachment widget, and is therefore not relevant here.

The classic PO BAdI is ME_PROCESS_PO_CUST.

  • The FIELDSELECTION_ITEM method only controls specific fields.
  • PROCESS_ITEM method (obtaining header information with GET_HEADER and GET_DATA and item information with GET_PREVIOUS_DATA and GET_DATA) could reverse the user's modifications and generate a warning message.
  • It is also possible to use an implicit enhancement in FM MEPOBADI_FS_ITEM which handles SAP reserved BAdI ME_PROCESS_PO  method FIELDSELECTION_ITEM
masna_7
Participant
0 Kudos

Hi Raymond,

 

I have tried to use that ME_PROCES_PO_CUST. there are already implementations available in my system using this BADI. I have tried to set a breakpoint and tried to trigger it through the transaction ME22N. But, I was unable to trigger that breakpoint ?

 

masna_7_0-1730388281298.png

Please consider the above Image, I am trying tp disable the field PO Quantity and Net Price based on Our reference field as highlighted above.  Can you please share some pseudo code on how to achieve this using BADI ?

Thanks.

raymond_giuseppi
Active Contributor
0 Kudos
  1. Add a break-point in FM FIELDSELECTION_ITEM.
  2. Check if the BAdI implementation in your system is actually active (changing the quantity must triiger the method PROCESS_ITEM)
masna_7
Participant
0 Kudos

Hi Raymond,

 

If I understood correctly, by using the FM MEPOBADI_FS_ITEM, I have to write an implicit enhancement on the end of this FM and disable the fields by using the Metafields concept. Is that true ? If yes, how can I find the metafield numbers for these PO Quantity and Net Price fields ?

 

Regards

raymond_giuseppi
Active Contributor
Check TYPE-POOLS MMMFD.