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

Conversion Help

Former Member
0 Likes
1,225

Hi,

I have the field for hours IMRG-RECDV and its type is Flot. For example the output for this is displayed as 6,776100000000000E+04.

here 6,776100000000000E+04 means 6.776110101010 and the output will be 67761.

Could anyone let me know how to do this conversion.

Regards,

Ram

9 REPLIES 9
Read only

Former Member
0 Likes
1,088

write v_field exponent 0.

Regards,

Ravi

Read only

0 Likes
1,088

Hi Ravi,

Thanks for the help and also let me know what should be the type we need to take for the display of the field. I want the output to be displayed as 67761.

Read only

0 Likes
1,088

Are you displaying this field in an alv?

Declare another field as char type with appropriate length.

and do like this

data: v_new(22).

write V_field to V_new exponent 0.

condense v_new.

write:/ v_new.

Regards,

Ravi

Read only

Former Member
0 Likes
1,088

hi use this conversion,

CONVERSION_EXIT_ADPCT_OUTPUT

it will Calculation (123.12345) to display (123.12)

Read only

Former Member
0 Likes
1,088

Hi

Try out these function Modules

CEVA_CONVERT_FLOAT_TO_CHAR

KKEK_CONVERT_FLOAT_TO_CURR

If helpful, Pls reward me points

Regards

Manas Ranjan Panda

Read only

Former Member
0 Likes
1,088

hi,

data: v_f type f value 67761.

write v_f exponent 0 decimals 0.

now the output will be 67761.

Regards,

Sailaja.

Read only

0 Likes
1,088

Hi,

The output field component type is IMRc_RECDV. So while displaying this its giving as the same thing. So which component type i need to take for outputting this field after conversion.'

Regards,

Ram

Read only

Former Member
0 Likes
1,088

hi,

Though the type is f, we get the output by using the formatting options along with write.


  data: v_float type f value 67761.
  write v_float exponent 0 decimals 0.

exponent 0 makes the no as 67761.00000000

To get 67761, we have to give decimals 0 addition.

Regards,

Sailaja.

Read only

Former Member
0 Likes
1,088

hi,

data: v_float type <b>IMRC_RECDV</b> value 67761.

write v_float exponent 0 decimals 0.

If you are displaying in ALV, check the post specified by RAVI.

Regards,

Sailaja.