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

Address extension in BAPI_SALESORDER_CREATEFROMDAT2

Former Member
0 Likes
736

Hi experts,

I am using the FM BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders. I am using these parameters:


  CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
      order_header_in     = sl_header
    IMPORTING
      salesdocument       = vl_vbeln
    TABLES
      return              = tl_return
      order_items_in      = tl_items
      order_partners      = tl_partners
      order_conditions_in = tl_conditions
      partneraddresses    = tl_partner_address.

When I put all the address data in order_partners table, it works very fine. but when i put them in partneraddresses I'm getting an error message VP1 199 (No customer master record exists for sold-to party &)

I have linked the entries between order_partners and partneraddresses : order_partners-addr_link = partneraddresses-addr_no

but I'm still having this problem.

Does anyone have an idea?

Thx in advance

<REMOVED BY MODERATOR>

I

Edited and Code Formatted by: Alvaro Tejada Galindo on Jul 9, 2008 11:56 AM

Hi experts,

I am using the FM BAPI_SALESORDER_CREATEFROMDAT2 to create sales orders. I am using these parameters:


  CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
      order_header_in     = sl_header
    IMPORTING
      salesdocument       = vl_vbeln
    TABLES
      return              = tl_return
      order_items_in      = tl_items
      order_partners      = tl_partners
      order_conditions_in = tl_conditions
      partneraddresses    = tl_partner_address.

When I put all the address data in order_partners table, it works very fine. but when i put them in partneraddresses I'm getting an error message VP1 199 (No customer master record exists for sold-to party &)

I have linked the entries between order_partners and partneraddresses : order_partners-addr_link = partneraddresses-addr_no

but I'm still having this problem.

Does anyone have an idea?

Thx in advance

<REMOVED BY MODERATOR>

I

Edited and Code Formatted by: Alvaro Tejada Galindo on Jul 9, 2008 11:56 AM

4 REPLIES 4
Read only

former_member194669
Active Contributor
0 Likes
623

For testing try this way:

First create sold to party in customer Master by using transaction XD01,

Second check whether the sold to party (partner function)is maintained in the customer master.

then use that customer in the bapi.

May be this will give some hint, why this error occured.

Read only

0 Likes
623

Thanks for your answer,

The customer is created in XD01. I want to specify another address that the one filled in the customer master data (XD01)

The sold to party (partner function)is maintained in the customer master. In fact, if I fill partneraddresses with no data it works fine and the order is created.

I don't understand why the error occur only when I specify a more complete address for this customer in partneraddresses

Read only

0 Likes
623

Have you check SAP note 316323 ?

Read only

0 Likes
623

Yes I checked it right now. I added the four mandatory partner roles but still the BAPI returns the error message. And still the BAPI works if I don't pass the partners addresses' parameter