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: 

BAPI_PO_CREATE1 Delivery address issue

Former Member
0 Kudos

Hi all,

I am using BAPI_PO_CREATE1 to create a PO with external PO number assignment.

For the header I am filling the following

POHEADER

POHEADERX

POADDRVENDOR for the header address

For the item I am filling the following

POITEM

POITEMX

POADDRDELIVERY

In the POADDRDELIVERY table I am filling the PO_ITEM, NAME, CITY, STREET AND REGION.

However after the PO is created, the address at the PO header is being updated correctly from the POADDRVENDOR,

But the delivery address at the PO item doesn't seem to update the manual address from POADDRDELIVERY, instead it is taking the address from the customer.

I am not sure if this is because of the external PO number assignment or not, but that is a requirement.

I have searched the forum, but failed to find any answer. Please advise.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Are you providing country in the address. Because generally for any address creation Country is mandatory - please check by providing Country.

Former Member
0 Kudos

Hi

First thing it could be a configuration setting that pulls customer data instead of what you push. This you can test by creating PO manual (ME21N). If you can create with delivery address, then it must be wrong with BAPI call.pick up the PO and see what get BAPI/read BAPI returns - you can use same pattern.

Hope it helps

RP

Former Member
0 Kudos

Hi,

You can check this issue in debug. Put the break point in below code and trace the issue.

Include: L2012F18   (BAPI Incoude)

FORM move_item_addr_out TABLES imt_cmmda   STRUCTURE cmmda

                                ext_address STRUCTURE bapimepoaddrdelivery.

Thanks,

Kiran.

venkateswaran_k
Active Contributor

Hi Riki,

ARe you passing any value to the field ADDR_NO  in the POADDRDELIVER table.

Try by not giving any value in the field addr_no.

0 Kudos

Hi All,

Venkateswaran - I am not passing ADDR_NO into POADDRDELIVERY table..

Sabyasachi -  I tried passing the country to the address, it did not work...

Raj - can you please point out where would that config be please...

Kiran - i have thoroughly debugged through the bapi, couldn't find a clue...

0 Kudos

Riki, Please try creating PO manually with same data you are trying to create using API. if you are able to create PO fine, Then it will not be config issue..

RP

Former Member
0 Kudos

You can try to use BAPI_PO_GETDETAIL1/ BAPI_PO_GETDETAIL.

It will allow you to view the details of an existing PO. From this, you'll know the data needed.