2006 Oct 31 7:54 AM
hi SDNers,
Iam using BAPI_SALESORDER_CHANGE to change items of the SO-updating the values for pricing-conditions of the items.
for ex:ZDC1,ZDS2.
The problem is after the BAPI is run,I see only the first condition type ZDC1 two times in the item of the SO.
can any one suggest the potential cause of the error;if I had missed out filling any mandatory structure required!
The piece of the condition structure I populated.
i_conditions_in-itm_number = itab-posnr.
i_conditions_in-cond_type = 'ZDC1'.
i_conditions_in-cond_value = w_kbetr.
i_conditions_in-cond_p_unt = '1'.
append i_conditions_in.
i_conditions_in-itm_number = itab-posnr.
i_conditions_in-cond_type = 'ZDS2'.
i_conditions_in-cond_value = u_kbetr.
i_conditions_in-cond_p_unt = '1'.
append i_conditions_in.
i_conditions_inx-itm_number = itab-posnr.
i_conditions_inx-cond_type = 'ZDC1'.
i_conditions_inx-updateflag = 'U'.
i_conditions_inx-cond_value = 'X'.
i_conditions_inx-cond_p_unt = 'X'.
append i_conditions_inx.
i_conditions_inx-itm_number = itab-posnr.
i_conditions_inx-cond_type = 'ZDS2'.
i_conditions_inx-updateflag = 'U'.
i_conditions_inx-cond_value = 'X'.
i_conditions_inx-cond_p_unt = 'X'.
append i_conditions_inx.
w_kbetr,u_kbetr are calculated values.
Thanks in Advance.
Mahendhar
2006 Oct 31 8:08 AM
I couldnt find any problem with the code. Maybe try passing the currency and ignore Condition pricing unit(COND_P_UNT). Try this way and see if this can help you.
Also try changing the sales order manually via VA02 and adding these two condition types and see if you are successful.
Kind Regards
Eswar
2006 Nov 14 5:49 AM
2006 Nov 14 7:21 AM
Hi,
Try using COND_COUNT field in condition_in table.
'01' for 'ZDC1'
'02' for 'ZDS2'
Also in conditions_inx mark the COND_COUNT flag 'X'
Hope this helps you.
Regards,
Roshan
2006 Nov 14 7:53 AM
Hi Roshan,
Thanks for the reply,
A search in SDN has made me understand that we have to set the 'LOGIC_SWITCH-COND_HANDLE' to 'X'.But am using version 4.5 B,where I cannot find this parameter.
Any one confirm me if this is the cause of my error,if yes any workaround possible for my case.
Thanks
Mahendhar Reddy
2007 Feb 26 1:56 AM
followed a work around to do with bdc ,as the prior versions of SAP doesn't allow these features with sales order change bapi.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |