Skip to Content
author's profile photo Former Member
Former Member

Floating point conversation

Dear all,

In a particular filed i entered value as 60.800 kg. But when i try to pick the value i found that the value is stored in floating pont format ie 6.080000000000e+00 . Actually i need it in integer format .Is any function module available to convert floating point to integer.

Regards

Mahesh V

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Nov 30, 2007 at 06:33 AM

    Hi,

    Use FM KKEK_CONVERT_FLOAT_TO_CURR

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 06:36 AM

    <b>KKEK_CONVERT_FLOAT_TO_CURR</b>

    OR

    <b>CHAR_FLTP_CONVERSION .</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 06:43 AM

    <b>Declare it as type P</b>

    i.e,

    <b>Data : v_float type f,

    v_dec type p decimals 3.

    v_dec = v_float.</b>

    <b>write : v_float, v_dec.</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 09:24 AM

    Why use a function module?

    DATA: l_val_int type i,
          l_val_flt type f,
          l_val_pck type p decimals 2.
    
    l_val_flt = '6.080000000000e+00'.
    
    l_val_int = l_val_flt.
    l_val_pck = l_val_pck.

    matt

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.