Skip to Content
avatar image
Former Member

Process_item not updating EKPO ME21N : S4hana

Dear all

I have added custom fields using CMOD at item level in me21n , Based on custom fields value i have to change field weunb value to X in ekpo , i have used BADI method PROCESS_ITEM , it is transferring X to weunb , but it is triggering when user press enter at item level .

in a case if user press SAVE button directly , it is not getting triggered if it is a custom tab.

for other tab at item level , it is getting triggered .

I have tried methods CHECK and POST ,it is not working ...

This is the coding block i have used in all three methods

IF im_item IS BOUND.
 ls_po_item_data = im_item->get_data( ). IF ls_po_item_data-zval = 'CCV'.
 ls_po_item_data-weunb = 'X'.
 im_item->set_data( im_data = ls_po_item_data ).

How to rectify this

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Aug 04, 2017 at 05:25 AM

    How did you manage the custom fields, e.g. in ME_GUI_PO_CUST, did you manage the RE_CHANGED parameter in TRANSPORT_FROM_DYNP.

    Also did you actually implement a LOOP on every item in the CHECK method of ME_PROCESS_PO_CUST.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raymond Giuseppi

      I have done screen enhancement through MM06E005

      These are the function exits i have used

      EXIT_SAPMM06E_012 --->here i have done validation

      EXIT_SAPMM06E_016 --->pushing data into subscreen0111

      EXIT_SAPMM06E_018 --->pushing out data from subscreen0111 here i am passing e_ci_update = 'X'.

      Screen exit

      SAPMM06E 0111

      Here is coding block under method check

      DATA  lt_po_item TYPE purchase_order_items.
          DATA ls_po_item TYPE purchase_order_item. DATA  ls_po_item_data TYPE       mepoitem. 
      IF im_header IS BOUND. lt_po_item = im_header->get_items( ). ENDIF.
      LOOP AT lt_po_item INTO ls_po_item. IF ls_po_item-item IS BOUND. ls_po_item_data = ls_po_item-item->get_data( ).
      IF ls_po_item_data-val = 'CCC'. ls_po_item_data-weunb = 'X'. ls_po_item-item->set_data( im_data = ls_po_item_data ).