Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BADI ME_PROCESS_PO_CUST set shipping data not saved

Former Member
0 Kudos

Hello,

I am implementing BADI IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM to set the shipping point based on my own customizing ( SM30).

The implementation works fine and the correct data is populated to the screen, But after I save the shipping point goes back to previous value.

Scnéario:  ME21N: create the order and change the shipping point via the badi.

                 Save

                 ME22N: after saving the purchase order has the old value.

Thanks for you help.

Here after my code:

  " GET PO Items
   CALL METHOD im_item->get_data
     RECEIVING
       re_data = lt_item.

   CHECK lt_item-reslo IS NOT INITIAL.

   SELECT SINGLE shipping_point
       FROM ZSHIPPOINTDET
       INTO lv_ship
       WHERE plant = lt_item-werks
         AND storage_location = lt_item-lgort
         AND issu_storage_loc = lt_item-reslo.

   " Compare shipping Data
   CALL METHOD im_item->get_shipping_data
     RECEIVING
       re_ekpv = ls_ship.

   CHECK ls_ship IS NOT INITIAL.

   " Setting the shipping Point
   IF lv_ship <> ls_ship-vstel.
     ls_ship-vstel = lv_ship.
     lv_shipupdate = 'X'.
   ENDIF.

   IF lv_shipupdate = 'X'.
     CALL METHOD im_item->set_shipping_data
       EXPORTING
         im_ekpv = ls_ship.

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

2 REPLIES 2

Former Member
0 Kudos

Hello Achref,

i have the same issue as you.

How did you solve it?

thanks,

Meriem.

somraj-2022
Member
0 Kudos

Hi,

Any solution for this.

Regards,

Som