on 09-11-2014 11:34 AM
Dear All,
My requirement: I have a plant consider 0900, we have updated the plant address in MEAN Tcode.
I can see an entry in ADRC table, but while creating the PO in ME21N by giving the plant as 0900, system is fetching
the old address, not the new address.
Please suggest me the solution and if any code.
Thanks in Advance
Sandeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhijit,
Thanks for the reply.
We need the data to be pulled from ekpo-adrn2, which we have created in MEAN tcode.
this address will be the default address for plant 0900.
I found one badi ME_PROCESS_PO_CUST~PROCESS_ITEM.
but my logic is unable to display delivery address it in ME21N.
Please send me the logic how to display new address in PO.
Hi Felipe,
I have done the coding like this, please let me know if i am wrong.
DATA: ls_mepoitem TYPE mepoitem,
ls_mepoitemx TYPE mepoitemx,
ls_mepoheader TYPE REF TO if_purchase_order_mm,
ls_mepoheader2 TYPE mepoheader,
header TYPE ekko,
lv_adrnr TYPE adrnr,
ls_ekpo TYPE ekpo,
ls_adrc TYPE adrc,
ls_cmmda TYPE cmmda.
ls_mepoheader = im_item->get_header( ).
ls_mepoheader2 = ls_mepoheader->get_data( ).
ls_mepoitem = im_item->get_data( ).
IF ls_mepoitem-adrn2 IS INITIAL AND
ls_mepoitem-lgort IS NOT INITIAL AND
ls_mepoitem-werks = '0900'.
SELECT SINGLE *
FROM ekpo
INTO ls_ekpo
WHERE werks = ls_mepoitem-werks
* AND ekgrp = ls_mepoheader2-ekgrp
AND wepos = ls_mepoitem-wepos.
* and adrn2 = ls_mepoitem-adrn2.
ls_ekpo-adrn2 = '00091647'.
IF sy-subrc = 0.
ls_mepoitem-adrn2 = ls_ekpo-adrn2.
CALL METHOD im_item->set_data
EXPORTING
im_data = ls_mepoitem.
ENDIF.
Hi Sandeep,
Try changing the address from the path below:
SPRO >>Enterprise Structure>>Definition>>Logistics General>>Define Copy Check Plant >>Define Plant
Regards,
Ashvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.