‎2007 Oct 16 5:36 AM
Hello experts .please tell me how to change the decimal places. My statement is like this.
absmg type ce1whas-absmg. (absmg is quantity field with 3 decimal places. I want to make it only 2 decimal places).Thanks for all the replies.
‎2007 Oct 16 5:40 AM
try using the DEIMALS extension of the WRITE statement.
data: menge type menge_D value '1234'.
write:/ menge decimals 2.
Regards,
Amit
Reward all helpful replies
‎2007 Oct 16 7:32 AM
Hi,
You can change the decimal placing as follows:
System - User Profile - Own Data
In the Defaults tab set the Decimal Notation required ....
Reward points if useful.
‎2007 Oct 17 9:09 AM
Hi Shiva,
You can use the following's program logic 2 if you want to round up to ceiling.
If you notice that assigning it to the following logic 1 it will only round up to ceiling if the last digit is more than or equal to 5.
Logic 1
Data : l_value type p decimals 2.
l_value = menge.
Write : / l_value.
-
Logic 2
data: l_value type p decimals 3,
l_temp type n,
l_len type n,
l_string type string.
parameters : menge type menge_D.
l_value = menge.
l_string = l_value.
l_len = strlen( l_string ) - 2.
l_temp = l_string+l_len(1).
if l_temp > 0.
l_string = l_value + '0.01'.
endif.
write : / l_string(l_len).
Hope the above helps.
Br,
Loo
‎2007 Oct 17 9:11 AM
Hi Shiva
You can change the decimal placing as follows:
<b>System - User Profile - Own Data</b>
Give your Decimal places notation here.
Regards,
Sree