Skip to Content
0
Nov 23, 2020 at 08:11 AM

Message no. MEPO151 occurred ,when update PO item delivery date use badi ME_PROCESS_PO_CUST

67 Views

Hello every one,

Message no. MEPO151【Data from Business Add-In ME_PROCESS_PO_CUST not adopted】 occurred ,

when update PO item delivery date use badi ME_PROCESS_PO_CUST, but in my friend's system, the same solution ,there is no error message occurred.

Below is my source, how to fix this issue?

METHOD if_ex_me_process_po_cust~process_item.

DATA: ls_mepoitem TYPE mepoitem.

DATA: 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.

wa_item = im_item->get_data( ).

DATA: lv_tmp TYPE datum.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

date_external = wa_item-eeind

IMPORTING

date_internal = lv_tmp

EXCEPTIONS

date_external_is_invalid = 1

OTHERS = 2.

lv_tmp = lv_tmp + wa_item-plifz.

CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'

EXPORTING

date_internal = lv_tmp

IMPORTING

date_external = wa_item-eeind

EXCEPTIONS

date_internal_is_invalid = 1

OTHERS = 2.

im_item->set_data( EXPORTING im_data = wa_item ).

ENDMETHOD.