Skip to Content
0
Former Member
Jan 09, 2015 at 07:27 AM

BADI ME_PROCESS_PO_CUST set shipping data not working

1077 Views

Hello,

I m trying to change the shipping point in ME21N ...

I am using the badi me_process_po_cust and the method process_item.

After the execution of badi nothing happens.

Here is my code:

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

CHECK lt_item-reslo IS NOT INITIAL.


I read the new shipping data from a z table



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

" 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.
ENDIF.


I have the endless loop problem ( i ll deal with later), for the moment I am stopping the seond iteration in debugging by changing the value of the lv_shipupdate variables.


I ll be waiting for your comments.


Best regards.