SAP SQL EXPR AGGR PREC LOSS ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_SQLAGG - Aggregate Function ALLOW_PRECISION_LOSS
This example demonstrates the aggregate function ALLOW_PRECISION_LOSS.

ABAP_SOURCE_CODE
DEMO CL_DEMO_ALLOW_PRECISION_LOSS

ABAP_DESCRIPTION
Sums up decimal values with five or more decimal places and converts them to a decimal number with two decimal places. The result of the aggregate expression differs when using ALLOW_PRECISION_LOSS.
In this example, ALLOW_PRECISION_LOSS first sums up all decimals and then converts them, which is why it performs fewer operations. Without ALLOW_PRECISION_LOSS, each decimal is converted individually and then added up.