Skip to Content
Former Member
Apr 07, 2010 at 07:48 AM

PO Header Z field is not updated, using classic BADI ME_PROCESS_PO_CUST


Hi Experts,

I have implemented classic badi ME_PROCESS_PO_CUST using interface METHOD if_ex_me_process_po_cust~post.

However the ZZDISPO field i created in PO header is not update, so i tried with standard field which is IHREZ, it is not updated as well. Is it something wrong with my code?

below is my code:

  break abap01.
  DATA: ls_mepoitem TYPE mepoitem,
      ls_mepoheader TYPE mepoheader,
      g_dispo TYPE dispo,
      cl_po TYPE REF TO cl_po_header_handle_mm.

  ls_mepoheader = im_header->get_data( ).

  IMPORT g_dispo TO g_dispo FROM MEMORY ID 'g_dispo'.
  IF g_dispo IS NOT INITIAL.
    ls_mepoheader-zzdispo = g_dispo.
    ls_mepoheader-ihrez = '12345'.

* Updating the Header
    cl_po ?= im_header.
    cl_po->my_ibs_firewall_on = 'X'.
    CALL METHOD im_header->set_data( im_data = ls_mepoheader ).
    CALL METHOD im_header->set_changed( ).

Any help is greatly appreciated.