abappurchase-orderbadi

How to change PO delivery date via ME_PROCESS_PO_CUST?


I need to update the delivery date of the purchase order.

I used the ME_PROCESS_PO_CUST BAdI in the POST method but it does not update the dates in the EKET table, only the dates on the screen are updated.

Here is the code in the method POST:

 CALL METHOD im_header->get_data
   RECEIVING
     re_data = ls_header_data.

  lt_items = im_header->get_items( ).


  LOOP AT lt_items INTO ls_items.

    lo_item = ls_items-item.
    ls_dati = lo_item->get_data( ).
    lt_schedule = lo_item->get_schedules( ).


    LOOP AT lt_schedule INTO ls_schedule.

      lo_schedule = ls_schedule-schedule.
      ls_meposchedule = lo_schedule->get_data( ).

      IF lv_data GE ls_meposchedule_pai-eindt.
        ls_meposchedule-eindt = lv_data.
      ENDIF.

      lo_schedule->set_data( ls_meposchedule ).

    ENDLOOP.

  ENDLOOP.

Solution

  • FUNCTION EXIT_SAPMM06E_017 is used for EKET update.

    U need to update (SAPLMEPO)ETT[] table, because you can find changes of PO there.

    Cheers :)