Application Development and Automation 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: 
Read only

VOFM: Condition value

Former Member
0 Likes
1,390

Hi experts,

I'm trying to update the condition value of a condition type using vofm condition value routine. The problem is it is not updating, it always shows 0.00 amount.

  • If maximum value is less than Billing Cap, Condition value (XKOMV-KWERT = 0).

CLEAR lwa_komv.

READ TABLE xkomv INTO lwa_komv

WITH KEY kschl = l_condition_type.

IF sy-subrc EQ 0.

l_tabix = sy-tabix.

IF l_maximum_value GE lwa_zfi_nfo_bill_cap-zwert.

lwa_komv-kwert = ( l_maximum_value - lwa_zfi_nfo_bill_cap-zwert ).

ELSE.

lwa_komv-kwert = 0.

ENDIF.

MODIFY xkomv FROM lwa_komv INDEX l_tabix TRANSPORTING kwert.

xkwert = lwa_komv-kwert.

ENDIF.

5 REPLIES 5
Read only

Former Member
0 Likes
850

Please check the data types of fields(subtracting fields), type should match with assiging field

Read only

Former Member
0 Likes
850

Hi,

you can check the if statement. From your description that the ammount always 0, it seems that

l_maximum_value GE lwa_zfi_nfo_bill_cap-zwert is always fault. You can check the flow of if statement.

If it does only run the statement lwa_komv-kwert = 0, then you can check you value l_maximum_value ,

lwa_zfi_nfo_bill_cap-zwert.

If it's nothing to do with the if statement, then you should check your modify statement. whether the

kwert field in your workarea is modified before updating the data in database table.

Read only

Former Member
0 Likes
850

Check that your routine is active in your testing client. You can use RV80HGEN for routine regeneration.

Read only

Former Member
0 Likes
850

Hi experts,

XKOMV and XKWERT is modified correctly in debug mode with an amount in KWERT field, but when I view the sales order pricing condition in item 10, the condition value remains 0.

Read only

0 Likes
850

Hi Marc,

Did you find the solution to your problem?