Application Development and Automation 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: 
Read only

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

Former Member
0 Likes
923

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
Read only

Former Member
0 Likes
490

try like this

data : vp type p decimals 3.

vp = <your float value>.

write : / vp.

regards

shiba dutta

2 REPLIES 2
Read only

Former Member
0 Likes
491

try like this

data : vp type p decimals 3.

vp = <your float value>.

write : / vp.

regards

shiba dutta

Read only

varma_narayana
Active Contributor
0 Likes
490

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>