Show TOC

Technical Notes about the Formula OperatorsLocate this document in the navigation structure

Test of <Expression> = 0

The test for whether a mathematical expression results in the value 0 is used to avoid problems caused by rounding operations that use the query abs(<Expression>) < 10**-6. In other words, all values in the interval [-10**-6, 10**-6] = [-0.000001; 0.000001] are considered to be 0.

Display of NULL Values

Values that do not exist (NULL values) are displayed as empty cells.

The OLAP processor handles NULL values as follows when making calculations using formulas:

Note

Below, 'N' stands for NULL value, 'D' stands for the result of a division by 0, 'X' stands for the error indicator (value does not exist), 'W' stands for any valid value, and '*' stands for any value.

  • NOERR(X) = 0, NDIV0(D) = 0, O1(N) = N and O1(X) = X for all remaining one-digit operators O1.
  • O2(N,N) = N, O2(X,*) = X and O2(*,X) = X for all two-digit operators.
  • O2(N,W) = O2(0,W) and O2(W,N) = O2(W,0) except for the following combinations, which return 'N' as the result:
    • N * W
    • W * N
    • N / W
    • N %A W
    • N %_A W
    • N %RT W
    • N %GT W
    • N %CT W
    • N ** W
    • N DIV W
    • N MOD W

More information: SAP Note 794006.

Result for Non-Defined Mathematical Operations

If an operation is executed that is not permitted mathematically or is not defined (for example, division by 0 or square roots of negative values), depending on the operation, the corresponding string that you specified in Customizing is output and the calculation is terminated. In Customizing, you can specify the string for Division by Zero and Data Does Not Exist. See SAP Reference IMG → SAP Customizing Implementation Guide → SAP NetWeaver Business Warehouse→ Settings for Reporting and Analysis → General Settings for Reporting and Analysis → Display of Numeric Values in Business Explorer.

This means that all formulas in which the incorrect formula appears are not calculated.

You can suppress this behavior by compounding the expression that leads to the error with the NDIV0() or NOERR() operators (more information: Data Functions).

Caution

When you use these operators, check that the result can be interpreted meaningfully by the user, even in the case of errors.

ABAP Code for Calculating Operators

If you are in doubt, you can check how the operators function in the ABAP code (include LRRK0F10, form LOC_RECHNEN).