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

BAPI_SALESORDER_SIMULATE - Error...

madan_ullasa
Contributor
0 Likes
3,561

Hi friends,

I am using BAPI_SALESORDER_SIMULATE to get the pricing.... I am in version 4.6C. Though I am passing all the reqd. parameters I get this error in the return table.

Error -

E |VP112|Please enter sold-to party or ship-to party

Can anyone let me know whats going wrong. i have checked all the notes also. Points assured to all the replies...

Regards,

Madan...

12 REPLIES 12
Read only

Former Member
0 Likes
2,565

Let me think.........what could possibly be wrong.

Read only

0 Likes
2,565

see the smaple code below..

DATA : st_head TYPE bapisdhead,

it_item TYPE STANDARD TABLE OF bapiitemin WITH HEADER LINE,

it_item_out TYPE STANDARD TABLE OF bapiitemex WITH HEADER LINE,

it_partner TYPE STANDARD TABLE OF bapipartnr WITH HEADER LINE,

it_cond TYPE STANDARD TABLE OF bapicond WITH HEADER LINE,

it_return TYPE STANDARD TABLE OF bapireturn with header line,

it_sold_to TYPE STANDARD TABLE OF BAPISOLDTO with header line,

it_ship_to type standard table of BAPISHIPTO with header line,

st_sales_doc type BAPIVBELN-VBELN,

st_return type bapireturn .

st_head-doc_number = '0048004512'.

st_head-DOC_TYPE = 'ZCQ'.

st_head-sales_org = 'AP'.

st_head-distr_chan = 'CM'.

st_head-division = '00'.

st_head-sales_grp = '630'.

st_head-sales_off = '6300'.

st_head-req_date_h = '20080701'.

st_head-cd_type1 = 'ZOM1'.

*st_head-po_method = 'TELE'.

st_head-PURCH_NO = 'C1203'.

*st_sales_doc = '0048004512'.

*it_sold_to-SOLD_TO = '0000003009'.

*append it_sold_to.

*clear it_sold_to.

*

*it_ship_to-ship_TO = '0000003009'.

*append it_ship_to.

*clear it_ship_to.

*it_partner-PARTN_NUMB = '0000003009'.

*append it_partner.

*clear it_partner.

CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'

EXPORTING

order_header_in = st_head

  • CONVERT_PARVW_AUART = 'X'

IMPORTING

  • SALESDOCUMENT = st_sales_doc

  • SOLD_TO_PARTY = it_sold_to

  • SHIP_TO_PARTY = it_ship_to

  • BILLING_PARTY =

return = it_return

TABLES

order_items_in = it_item

order_partners = it_partner

  • ORDER_SCHEDULE_IN =

order_items_out = it_item_out

  • ORDER_CFGS_REF =

  • ORDER_CFGS_INST =

  • ORDER_CFGS_PART_OF =

  • ORDER_CFGS_VALUE =

  • ORDER_CFGS_BLOB =

  • ORDER_CCARD =

  • ORDER_CCARD_EX =

  • ORDER_SCHEDULE_EX =

order_condition_ex = it_cond

  • ORDER_INCOMPLETE =

  • MESSAGETABLE =

  • EXTENSIONIN =

  • PARTNERADDRESSES =

.

LOOP AT it_return into st_return.

WRITE:/ st_return-message.

ENDLOOP.

Read only

0 Likes
2,565

Madan,

why did you actually comment this below code:

*it_partner-PARTN_NUMB = '0000003009'.
*append it_partner.
*clear it_partner.

in tables tab ORDER_PARTNERS Partners, such as sold-to party, ship-to party are entered into this table.

it should be pass to FM.

Amit.

Read only

0 Likes
2,565

Hi,

I was passing it. But still i was having the same error.. I was kind of doing trial n error methods. Even if i uncomment all those statements I still get this error..

Regards,

Madan..

Read only

0 Likes
2,565

pass atleast these three info to this table

PARTN_ROLE
PARTN_NUMB
ITM_NUMBER

Read only

0 Likes
2,565

Hi ,

Still the same error !!! Is it because of 4.6C version?

st_head-doc_number = '0048004512'.

st_head-DOC_TYPE = 'ZCQ'.

st_head-sales_org = 'AP'.

st_head-distr_chan = 'CM'.

st_head-division = '00'.

st_head-sales_grp = '630'.

st_head-sales_off = '6300'.

st_head-req_date_h = '20080701'.

st_head-cd_type1 = 'ZOM1'.

st_head-PURCH_NO = 'C1203'.

it_partner-PARTN_NUMB = '0000003009'.

it_partner-PARTN_ROLE = 'AG'.

it_partner-ITM_NUMBER = '10'.

append it_partner.

clear it_partner.

CALL FUNCTION 'BAPI_SALESORDER_SIMULATE'

EXPORTING

order_header_in = st_head

  • CONVERT_PARVW_AUART = 'X'

IMPORTING

  • SALESDOCUMENT = st_sales_doc

  • SOLD_TO_PARTY = it_sold_to

  • SHIP_TO_PARTY = it_ship_to

  • BILLING_PARTY =

return = it_return

TABLES

order_items_in = it_item

order_partners = it_partner

  • ORDER_SCHEDULE_IN =

order_items_out = it_item_out

  • ORDER_CFGS_REF =

  • ORDER_CFGS_INST =

  • ORDER_CFGS_PART_OF =

  • ORDER_CFGS_VALUE =

  • ORDER_CFGS_BLOB =

  • ORDER_CCARD =

  • ORDER_CCARD_EX =

  • ORDER_SCHEDULE_EX =

order_condition_ex = it_cond

  • ORDER_INCOMPLETE =

  • MESSAGETABLE =

  • EXTENSIONIN =

  • PARTNERADDRESSES =

.

LOOP AT it_return into st_return.

WRITE:/ st_return-message.

ENDLOOP.

Read only

0 Likes
2,565

Madan,

Exactly.

When you create an SD document with the SD BAPIs or SD function modules, the system carries out a partner check. During an item proposal, if this is not required, the system processes error message VP112 'Please enter sold-to party or ship-to party'.

You need correction in SD_SALES_HEADER_MAINTAIN

refer OSS 195497.

Amit.

Read only

0 Likes
2,565

Hi,

This notes is for version 4.6B and lower. I think this is taken care of in 4.6C and above..

Thanks.

Madan.

Read only

0 Likes
2,565

You have a conversion routine that is why you are not selecting the correct partner role. look at table TPAUM for your lang key

and cooresponding lang-specific partner function and then you will see the correct partner function to use.

Read only

0 Likes
2,565

Hi, maybe it is because you use an item number for the soldto partner. A sales order needs a soldto partner on header level so with ITM_NUMBER blank:

it_partner-PARTN_NUMB = '0000003009'.
it_partner-PARTN_ROLE = 'AG'.
it_partner-ITM_NUMBER = '000000'.

Regards Jack

Read only

Former Member
0 Likes
2,565

Hi,

Are you pass the values in below structure.Check once

ORDER_PARTNERS LIKE BAPIPARTNR

Regards

jana

Read only

madhu_vadlamani
Active Contributor
0 Likes
2,565

Hi Madan,

Are you using this bapi in sap or from external system. Just use german key words. That will resolve.

Regards,

Madhu.