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: 

Regarding floating point to decimal number

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Hi,

yes it should take.

Regards

jana

Former Member
0 Kudos

hii

yes its correct way.it should work

regards

twinkal

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

solved

arthur_fuscella
Participant
0 Kudos

Hi Babu,

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

Regards