Reputation: 11
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.
Upvotes: 0
Views: 6697
Reputation: 1
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.
Upvotes: 0
Reputation: 1290
Please check if there is project enhancement implentation for PO which might be updating field values.
regards, Umar Abdullha
Upvotes: 0