Skip to Content

PO Item modification using BADI ME_PROCESS_PO_CUST

This document would give in formation on how to access or change the PO item data before save using different methods.


Create implementation for BADI ME_PROCESS_PO_CUST


go to Method PROCESS_ITEM(This method can be used to change the Item)



  Flg_pers type c,

  ref_pohdr TYPE REF TO if_purchase_order_mm,

  wa_pohdr  TYPE mepoheader,

  wa_item   TYPE mepoitem,

  wa_pitem   TYPE mepoitem.

* This method can be used to get referance(Pointer) for header data

  ref_pohdr = im_item->get_header( ).

* Read header data from above referance

  wa_pohdr = ref_pohdr->get_data( ).

* im_item of PROCESS_ITEM can be used as a referance to get item data

  wa_item = im_item->get_data( ).

* IS_PERSISTENT can be used to check whether item is already created or it is nw entry

  flg_pers = im_item->is_persistent( ).

* We can apply logic for only new items




* in this example I am modifying GR indicator for few conditions

IF wa_pohdr-ekorg EQ ‘1001’ AND wa_item-knttp = ‘F’.

      wa_item-wepos = space.

      im_item->set_data( EXPORTING im_data = wa_item ).


You must be Logged on to comment or reply to a post.
  • Hi Rambabu,

    Thanks for this helpful blog. I just noticed that the method “im_item->get_persistent_data” returns the current delivery date (EINDT) instead of the last posted delivery date, for the item.

    Do you know if there’s any better way to get the delivery date changes, from last posted to current on-screen in ME22N?