Application Development and Automation 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: 
Read only

Delivery Address change BAPI required

Former Member
0 Likes
2,971

Hi,

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,

Supriya.

Hi,

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,

Supriya.

4 REPLIES 4
Read only

Former Member
0 Likes
1,537

Hi Supriya,

Try implementing the BADI ME_PROCESS_PO_CUST,

to view/change the item details during the creation/change of the PO.

Rajeev

Read only

0 Likes
1,537

Hi Supriya,

Please try to get the existing data by calling the 'BAPI_ADDRESSORG_GETDETAIL'. You will get the ADRNR here & then change the address via 'BAPI_ADDRESSORG_CHANGE'.

Regards,

Suresh Datti

Read only

Former Member
0 Likes
1,537

Hi,

I am trying to do exactly the same, how did you manage to change the delivery adress in a purchase order item ?

Thanks

Marion

Read only

igor-schukovets
Associate
Associate
0 Likes
1,537

Hello Supriya,

sometimes things are not as they seem.

Everything you need is just to specify the storage location on the corresponding purchase item in order to store the reference delivery address (which is stored in EKPO-ADRN2) when post the purchase order.

This operation can be done by both BAPI BAPI_PO_CREATE1 or BAPI_PO_CHANGE or by using OData API Service called API_PURCHASEORDER_PROCESS if you use S/4HANA.

Best Regards,

Igor