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: 

Conditions in BAPI sales order change

Former Member
0 Kudos

When I enter a condition in BAPI SAles order change having some existing condition type with different condition value. It goes and appends the condition into the set of condition making two records of same condition type and different value. I would like it to update one record with new value. How should I do it?

This is my code :

if y_wa_konv-kbetr ne y_wa_konv1-kbetr.

move: y_k_x to y_wa_condx-cond_value,

y_k_x to y_wa_condx-cond_type,

y_wa_konv-kschl to y_wa_cond-cond_type,

y_wa_vbap-posnr to y_wa_cond-itm_number.

y_lv_kbetr = ( y_wa_konv-kbetr / 10 ).

move y_lv_kbetr to y_wa_cond-cond_value.

endif.

endif.

move: y_k_u to y_wa_condx-updateflag,

y_wa_vbap-posnr to y_wa_cond-itm_number.

append y_wa_cond to y_i_cond.

append y_wa_condx to y_i_condx.

1 REPLY 1

Former Member
0 Kudos

Hi,

Check if this thread helps.

ashish