2023 Feb 17 6:00 AM
I need to display a value up to 2 decimal places. When it comes to values like 0.50 it will display like 0.5 only, but I need 0.50 .
What should I do ?
2023 Feb 17 6:27 AM
Hi Pratiksha,
Have the data declaration for the variable as packed with decimals equals to 2.
DATA lv_dec TYPE p DECIMALS 2 .
Thanks,
Pavan
2023 Feb 17 6:27 AM
Hi Pratiksha,
Have the data declaration for the variable as packed with decimals equals to 2.
DATA lv_dec TYPE p DECIMALS 2 .
Thanks,
Pavan
2023 Feb 17 7:11 AM
2023 Feb 17 7:15 AM
Please provide a minimal reproducible example.
This one works:
data value type p length 8 decimals 2.
value = '0.50'.
write value.
2023 Feb 17 9:44 AM
How is
2023 Feb 18 12:59 PM
Hi Pratiksha,
I hope this helps. Define the 'correct' type to 'p' and hopefully it will work. Cheers!!! 🙂
PARAMETERS:
p_num1 TYPE p DECIMALS 2.