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

Regarding floating point to decimal number

Hi Experts,

I have a simple problem Regarding floating point to decimal number.

DATA : w_mittelwert TYPE p DECIMALS 4.

Actually, Mittelwert field is type Float.

Now i want to display this floating number to decimal number.

w_mittelwert = wa_qasr-mittelwert. I initializes like this.

Question: Is it correct or not?

Is it take decimal value from floating point value?

Please help me in this regard?

Advanc appriciate to all !!!!!

Regards

Sai

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2008 at 09:33 AM

    Hello Sai Babu,

    it is faster to type this in a small (local) program and debug it then to write this question in this forum.

    Best Regards,

    Guido

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2008 at 07:48 AM

    Hi,

    yes it should take.

    Regards

    jana

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2008 at 07:51 AM

    hii

    yes its correct way.it should work

    regards

    twinkal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2008 at 09:35 AM

    Hi Sai,

    There is FM existing that can be used to convert Float number to Packed...

    Try searching FLOATPACKED* in SE37. You will get your answer.

    Regards,

    Kunjal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 13, 2009 at 09:29 AM

    solved

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 23, 2013 at 07:52 PM

    Hi Babu,

    Try class CL_ABAP_DECFLOAT. The static method READ_DECFLOAT34 converts float to decimal.

    Regards

    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.