Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

function module to convert float value to data type 'dec'

Former Member
0 Kudos

Hi experts,

In a report i need to convert float value to the data type 'DEC'. How to convert it. Is there any function module for this conversion.

Thanks and Regards,

Vaibhav Tiwari.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

try like this

data : vp type p decimals 3.

vp = <your float value>.

write : / vp.

regards

shiba dutta

2 REPLIES 2

Former Member
0 Kudos

try like this

data : vp type p decimals 3.

vp = <your float value>.

write : / vp.

regards

shiba dutta

varma_narayana
Active Contributor
0 Kudos

Hi ..

We can do like this...

Data : V_float type F value '12345.67'.

Data: V_dec type P Decimals 2.

Write:/ V_float exponent 0. "This will display it like Type P

or

Write V_float to V_dec EXPONENT 0.

Write:/ V_dec.

reward if Helpful.

<b></b>