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

create sales order using bapi_salesorder_creatrfromdat2

Former Member
0 Likes
1,089

hi all,

i am trying to run bapi 'BAPI_SALESORDER_CREATEFROMDAT2' in se37 by passing doc type in header structure and sold to party in 'ORDER_PARTNERS' structure but it is giving me errors saying

iam passing sold-to party PARTN_NUMB from ORDER_PARTNERS and passing doc type also.still it is showing the same error.

E VP 112 Please enter sold-to party or ship-to party

E V4 219 Sales document was not changed

can anybody please help me out.

8 REPLIES 8
Read only

Former Member
0 Likes
1,042

hi all,

i passed wa_kunnr-partn_numb = wa_sourcedata-kunnr.

wa_kunnr-itm_number = wa_sourcedata-posnr.

wa_kunnr-partn_role = 'AG'.

still the above messages please enter the sold to party and sales document has to be changed is coming again.can u guys let me know how to trigger the same.thanks

Read only

0 Likes
1,042

Hi,

You have to pass Ship to Party & Sold to Party, both. If both the customers are same then pass the data as follows :




wa_kunnr-partn_numb = wa_sourcedata-kunnr.
wa_kunnr-partn_role = 'AG'.

append wa_kunnr to it_kunnr.
clear wa_kunnr.

wa_kunnr-partn_numb = wa_sourcedata-kunnr.
wa_kunnr-partn_role = 'WE'.

append wa_kunnr to it_kunnr.
clear wa_kunnr.

Thanks & Regards,

Faheem.

Read only

0 Likes
1,042

hi,

i gave the partner role for both sold to party and ship to party as u said.but still the same messages are coming.

wa_kunnr-partn_role = 'SP'.

wa_kunnr-partn_numb = wa_sourcedata-kunnr.

APPEND wa_kunnr TO it_kunnr.

CLEAR wa_kunnr.

wa_kunnr-partn_role = 'SH'.

wa_kunnr-partn_numb = wa_sourcedata-kunnr.

APPEND wa_kunnr TO it_kunnr.

clear wa_kunnr.

here as per the our standards the sold to party is SP and ship to party is SH.

please enter sold to party or ship to party and

sales document was not changed is coming again.

Read only

0 Likes
1,042

hi faheem,

i tried the sold to party and ship to party with AG and WE.know it is working fine.but iam getting other errors.

iam passing kbetr amout value for the condition types ZRSS, ZOTB, ZCSS, ZMSC and ZITB.

wa_kbetr-itm_number = 'ZRSS'.

wa_kbetr-cond_value = wa_sourcedata-kbetr1.

APPEND wa_kbetr TO it_kbetr.

wa_kbetr-itm_number = 'ZOTB'.

wa_kbetr-cond_value = wa_sourcedata-kbetr2.

APPEND wa_kbetr TO it_kbetr.

wa_kbetr-itm_number = 'ZCSS'.

wa_kbetr-cond_value = wa_sourcedata-kbetr3.

APPEND wa_kbetr TO it_kbetr.

wa_kbetr-itm_number = 'ZMSC'.

wa_kbetr-cond_value = wa_sourcedata-kbetr4.

APPEND wa_kbetr TO it_kbetr.

wa_kbetr-itm_number = 'ZITB'.

wa_kbetr-cond_value = wa_sourcedata-kbetr5.

APPEND wa_kbetr TO it_kbetr.

know iam getting the error as

SALES_HEADER_IN has been processed successfully

Condition is missing in pricing procedure A V ZPCNOT

The sales document is not yet complete: Edit data

Sales document was not changed

Read only

0 Likes
1,042

hi faheem,

can u please tell the solution how to solve the below error

Condition is missing in pricing procedure A V ZPCNOT.thanks.

Read only

0 Likes
1,042

Hi Komal,

It is pretty clear from the message that the condition your passing is not available in Pricing Procedure. Ask your SD consultant to check whether that condition exist or not.

Thanks & Regards,

Faheem.

Read only

0 Likes
1,042

hi faheem,

i asked my sd consultant regarding the same.he has maintained those pricing conditions.still iam not getting the solution.

Read only

0 Likes
1,042

hi faheem,

thanks a lot,its been resolved.