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

Problem whit BAPI_SALESORDER_CREATEFROMDAT2 when use pricing condition

Former Member
0 Likes
995

Hi All,

I have a problem whit BAPI_SALESORDER_CREATEFROMDAT2 when I try to use pricing conditions with two values on the same sales item.

Iu2019m tried to pass these values in the same item:

first value

bapicond-itm_number = bapicondx-itm_number = 10. "(for example)

bapicond-cond_st_no = bapicondx-cond_st_no = '017'. "as found from pricing procedure

bapicond-cond_count = bapicondx-cond_count = '0'. "after investigation in KONV table

bapicond-cond_type = bapicondx-cond_type = 'ZDES'.

bapicond-cond_value = some_value. bapicondx-cond_value = 'X'.

bapicondx-updateflag = 'U'.

APPEND: bapicond, bapicondx.

and second value

bapicond-itm_number = bapicondx-itm_number = 10. "(for example)

bapicond-cond_st_no = bapicondx-cond_st_no = '021'. "as found from pricing procedure

bapicond-cond_count = bapicondx-cond_count = '0'. "after investigation in KONV table

bapicond-cond_type = bapicondx-cond_type = 'ZMER'.

bapicond-cond_value = some_value. bapicondx-cond_value = 'X'.

bapicondx-updateflag = 'U'.

APPEND: bapicond, bapicondx.

But only the first value has successfullyu2026

Any ideas what am I doing wrong?

Thanks,

Alesandro

3 REPLIES 3
Read only

Former Member
0 Likes
680

Hi,

I think the problem is there with the cond_count. Please change this value to no. of conditions given by you. In your example you have passed the value 0 for the cond_count. It shuld be 2 and also please pass the same value in the conditionx table.

Hope it will help you..

Thanks,

Shailendra

Read only

Former Member
0 Likes
680

Hi,

Are you passing the logic_switch parameter with fields 'PRICING' ( pricing type ) and COND_HANDL = 'X'? If not try to pass this parameter to the BAPI and then test if it works.

Br,

Advait

Read only

Former Member
0 Likes
680

One more thing I noticed is that for the parameter bapicondx-updateflag , you are passing 'U' , but for create it should be 'I' if I'm not wrong.

Br,

Advait