Ansicht
Dokumentation
HR_NZ_ROUNDING_DECIMALS - Round decimals places
rdisp/max_wprun_time - Maximum work process run time SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3upThis documentation is copyright by SAP AG.
Functionality
This function is used to reduce the number of decimals places associated with a field and round the value either up or down in the process.
Example
The input parameter (VALUE_IN) is passed in as type P (Packed decimal) with 5 decimals and contains the value '12.02455'. Parameter CONV_DEC contains the value '2', which signifies the number of decimals the value in VALUE_IN needs to be converted to whilst rounding, before placing the result in parameter VALUE_OUT.
If the value in VALUE_IN was simply moved to a field with 2 decimals, then the value would be incorrectly rounded to '12.02'. This problem is actually a limitation of the MOVE command, in that it only looks at one addition decimal point when rounding (In this case, it looks at the '4' in '12.02455' and ignores the subsequent digits).
This function however, performs the rounding between fields with a varying number of decimals correctly. After executing this function, the resulting value in parameter VALUE_OUT would be '12.03'.
Notes
Further information
Parameters
CONV_DECVALUE_IN
VALUE_OUT
Exceptions
DECIMALS_GREATER_THAN_10NO_ROUNDING_REQUIRED
ROUNDING_ERROR
Function Group
3NZ1CL_GUI_FRONTEND_SERVICES - Frontend Services TXBHW - Original Tax Base Amount in Local Currency
This documentation is copyright by SAP AG.
Length: 1942 Date: 20240523 Time: 113530 sap01-206 ( 74 ms )