Ansicht
Dokumentation
OIJY_ROUND_DECIMALS - OIL TSW : Round decimals places
PERFORM Short Reference Vendor Master (General Section)This 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
OIJYRFUMSV00 - Advance Return for Tax on Sales/Purchases RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 1942 Date: 20240523 Time: 123707 sap01-206 ( 43 ms )