I am using the BAPI_PO_CREATE1 for my program. I also need to change the delivery address for the particular item of the Purchase order number. I tried using BAPI_ADDRESSORG_CHANGE for this purpose and i trid doing single test on this bapi but it didnot work.
The parameters i filled in are:
obj_type = BUS2012
obj_id = <purchase order number>
obj_id_ext = ' '
context = 0006
Even then it didnot retrive the address number for the po i had input. I tried putting in item number in obj_id_ext, even this failed to return the ADRNR itself.
But my requirement is to change the delivery address for the given po & item number.
In standard ME21n transaction, whenever delivery address is changed it triggers a new address number & its stored in ADRN2 of EKPO and not in ADRNR of EKPO.I need a BAPI which actually does this purpose that whenever the delivery address changes it should create a new address number & return that number for my processing.
Thanks in advance,