EKPO fields not updated after PROCESS_ITEM method set_data in ME21N

 ̄綄美尐妖づ 提交于 2021-01-29 06:10:09

问题


I'm trying to change field WEORA and BSTAE in ME21n through BADI me_process_po_cust, method PROCESS_ITEM. I have successfully changed the value in the screen, BUT when I saved the PO, table EKPO is not updated with the new value. Am I missing something? Do I need to commit?

DATA: ls_mepoitem_set TYPE mepoitem.
DATA: cl_po TYPE REF TO cl_po_header_handle_mm.
DATA: ls_mepoitem TYPE mepoitem.
FIELD-SYMBOLS: <fs_item> TYPE mepoitem.

ls_mepoitem = im_item->get_data( ).

ls_mepoitem_set = ls_mepoitem.
ls_mepoitem_set-bstae = '0004'.
ls_mepoitem_set-weora = abap_true.
ASSIGN ls_mepoitem_set TO <fs_item>.
CALL METHOD im_item->set_data( EXPORTING im_data = <fs_item> ).

cl_po ?= lm_poheader.
IF NOT cl_po->my_recheck_queue IS INITIAL.
   CLEAR cl_po->my_recheck_queue.
ENDIF.

回答1:


Please check if there is project enhancement implentation for PO which might be updating field values.

regards, Umar Abdullha




回答2:


I had the same mistake and I was able to resolve it by using the same code shown before in IF_EX_ME_PROCESS_PO_CUST->PROCESS_ITEM.

I had to call im_item->get_data( ) to get the data from the position and the set method work perfectly.



来源:https://stackoverflow.com/questions/52921599/ekpo-fields-not-updated-after-process-item-method-set-data-in-me21n

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!