Hi nandha,
1.one way is to use decimal.
2. see code (just copy paste)
REPORT abc NO STANDARD PAGE HEADING.
DATA: X TYPE P DECIMALS 3 VALUE '1.267',
Y TYPE F VALUE '125.456E2'.
WRITE: / X DECIMALS 0, "output: 1
/ X DECIMALS 2, "output: 1.27
/ X DECIMALS 5, "output: 1.26700
/ Y DECIMALS 1, "output: 1.3E+04
/ Y DECIMALS 5, "output: 1.25456E+04
/ Y DECIMALS 20. "output: 1.25456000000000E+04
3. u can also use write to WRITE TO a FIELD
( instead of displaying)
Hope it helps.
regards,
amit m.
rounding down is nothing but truncating the decimals part, isn't it? So if the value is 11.2, you want 11 and if the value is 11.9, even then you want 11, correct?
Use TRUNC for the purpose.
Add a comment