07-31-2008 12:51 PM
Hi all,
I m using BAPI_SALESORDER_CHANGE for changing sales order . while modifying condition amount it appends one more line to condition amount instead of updating it . The net value comes correct . The previous line remains there .
how to replace previously exisiting condition amount line ??
07-31-2008 12:53 PM
07-31-2008 1:09 PM
Hiii
My code is this :
wa_conditions-itm_number = wa_contract-posnr.
wa_conditions-cond_value = wa_itab-kbetr.
wa_conditions-cond_type = 'ZPSV'.
wa_conditions-currency = l_curr.
wa_conditions-cond_count = wa_itab-kwmeng.
APPEND wa_conditions TO it_conditions.
wa_conditionsx-itm_number = wa_contract-posnr.
wa_conditionsx-cond_count = wa_itab-kwmeng.
wa_conditionsx-cond_value = 'X'.
wa_conditionsx-currency = 'X'.
wa_conditionsx-cond_type = 'ZPSV'.
wa_conditionsx-updateflag = 'U'.
APPEND wa_conditionsx TO it_conditionsx.
This is not replacing the existing line item in condition amount for line item . It adds one more line
07-31-2008 1:15 PM
07-31-2008 1:16 PM
hiii
try using MODIFY statement instead of APPEND statement
regards
twinkal
07-31-2008 1:17 PM
Siya,
check wether you are following these prerequisites for that:
In general, note that you should:
Only specify fields that should be changed
Select these fields by entering an X in the checkboxes
Enter a U in the UPDATEFLAG field
Always specify key fields when changing the data, including in the checkboxes
The configuration is an exception here. If this needs to be changed, you need to complete it again fully.
Maintain quantities and dates in the schedule line data
Possible UPDATEFLAGS:
U = change
D = delete
I = add
07-31-2008 1:40 PM
It is still not giving required output . I can not use modify stmt here.
07-31-2008 2:09 PM
Hi,
Try to pass COND_UPDAT = 'X' in the CONDITIONS_IN (Structure BAPICOND) table parameter.
Regards,
Bujji