‎2010 Jan 13 9:16 PM
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
‎2010 Jan 14 6:21 AM
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
‎2010 Jan 14 7:07 AM
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
‎2010 Jan 14 7:09 AM
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