SAP SELECT ALLOW PRECISION LOSS ABAP Statements



Get Example source ABAP code based on a different SAP table
  


• ALLOW_PRECISION_LOSS ABAP_OSQL_AGG_FUNC

ABAP_SQLAGG - ALLOW_PRECISION_LOSS

ABAP_SYNTAX
... ALLOW_PRECISION_LOSS( SUM( $[DISTINCT$] sql_exp )

What does it do?
The ALLOW_PRECISION_LOSS statement can improve the performance of an aggregate expression agg_exp at the cost of accuracy of the result. This function should only be used on decimal values and when loss of precision is acceptable. Currently, SUM is the only supported aggregate expression.



Latest notes:

A different result is not necessarily obtained when using the ALLOW_PRECISION_LOSS statement to sum up decimal values. A different result and simultaneous improvement in performance is only obtained during certain complex operations. One example is when operations are carried out in a different order to reduce the total number of operations. See the executable example below for further details.
NON_V5_HINTS
ABAP_HINT_END

ABAP_EXAMPLE_ABEXA
Aggregate function, allow precision loss
ABAP_EXAMPLE_END

Return to menu