Application Development 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: 

Modifying condtions amount using BAPI_SALESORDER_CHANGE

tanuja_wa
Explorer
0 Kudos

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 ??

7 REPLIES 7

Former Member
0 Kudos

hiii

refer to following link

regards

twinkal

tanuja_wa
Explorer
0 Kudos

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

Former Member
0 Kudos

hi modify the table it_conditions instead of appending

Former Member
0 Kudos

hiii

try using MODIFY statement instead of APPEND statement

regards

twinkal

0 Kudos

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

tanuja_wa
Explorer
0 Kudos

It is still not giving required output . I can not use modify stmt here.

Former Member
0 Kudos

Hi,

Try to pass COND_UPDAT = 'X' in the CONDITIONS_IN (Structure BAPICOND) table parameter.

Regards,

Bujji