In a report, a value different to zero is calculated for a formula although the result should have been zero.
The values of the operands are converted into floating point display for the evaluation of formulas.Small rounding errors can occur here which basically cannot be avoided.In this way, it can happen that figures do not add up to zero after the conversion, although they do in the more exact display.
This can cause the following symptoms:
- If two such values are divided in a formula, the result can assume values different from zero depending on the rounding.
- During addition of very large numbers (more than 15 characters) there may be inaccuracies at the last characters which can be traced back to rounding errors.
- The problem can be avoided by rounding in the formula.
Example: Instead of (#-#)*100/#
the formula should be defined as follows:
(INT((#-#)*10000))/10000 *100/#
or equally
(INT((#-#)*10000))/(100*#)
- Use a set for the addition instead of a formula line. The total of a set is not calculated as a formula line. There is no conversion in floating point numbers. That is why there can be no rounding errors when using sets.
Report Writer, formula line
----- SUPPORTGUIDE 20010411140028 -----
REPORTWRITER, SGRW_FORMULA, SGRW_AMOUNT, SGRW_DATA, SGRW_DOCU_CONS_NOTE
SGRW_OM SGRW_PS SGRW_PC SGRW_SL SGRW_PCA SGRW_EC SGRW_LIS
No comments:
Post a Comment