2008 Jul 21 11:32 PM
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.
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.
2008 Jul 22 2:04 AM
Please check the data types of fields(subtracting fields), type should match with assiging field
2008 Jul 22 2:28 AM
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.
2008 Jul 22 2:42 AM
Check that your routine is active in your testing client. You can use RV80HGEN for routine regeneration.
2008 Jul 22 3:08 PM
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.
2010 Mar 25 10:40 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |