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

Exponential to Numeric Conversion in ABAP

Former Member
0 Likes
14,816

Hi,

This is regrardng the conversion of Exponential to Numeric values in ABAP.I have an exponential Value 4.8E+47 .I want to convert to numerical .If i use the Exponential Function ,It is agian yielding another Exponent value.

If the Power is more than 47,then there could be multiple steps and In all the case ,it is giving exponent values only.

But I need the numeric value which later should rounded off to 3 decimals.

Please guide me if there is any Function module or a way to resolve this issue.

Regards,

Kranti Yamparala.

10 REPLIES 10
Read only

Former Member
0 Likes
8,399

declare a variable of type I.

and move the exponential value to this variable. this variable will have the numeric value.

Read only

NAeda
Contributor
8,399

Hi Kranti,

Use

data: Var type P with decimal 3.

move the value to Var.

it works for me.

regards

Aeda

Read only

Former Member
0 Likes
8,399

Hi Aeda...

Thanks for your reply.

When i tried in the way it is working small exponentails and it is dumping for E+21.

Any pointer to this?

Regards,

KY.

Read only

xient
Explorer
8,399

Hi Kranti,

you just have to move once to a float variable. Rightafter you can move the float value to any variable you need.

Kind regards,

Yavuz

Read only

0 Likes
8,399

Have you checked the topic post date?

Read only

8,399

Yes - I did. Does it chance anything? Is there a rule not to reply to old postings?!

Old postings are also references for "new" problems - so it makes no sence to find unsolved postings. Or not?!

Read only

philippeaddor
Active Participant
0 Likes
8,399

I agree with Yavuz, I came across this when looking for an answer to the same problem - 12 years later! It's sad to see that many users don't understand that a forum is here to help others with the same issue too and not only themselves.

Read only

Former Member
0 Likes
8,399

Dear Kranti,

Please check at link http://scn.sap.com/thread/1271914 for same problem

with regards

vikas pandey

Read only

8,399

Hey Vikas,

did you ever try the given FM there? First of all there is no FM called "QSS0_FLTP_TO_CHAR_CONVERSION" in every system, as you maybe take notice of the prefix. There are just these FMs called " CHAR_FLTP_CONVERSION" or "FLTP_CHAR_CONVERSION". Maybe you mean them. But, nevertheless these are not easy to use FM. Maybe you should try and read the other postings in advance.

As I said in my post - and this is the fastest way - you just have to move. That's all. No FM, no Method no nothing ...

Just:
e_output = l_float = i_input.

Yavuz

Read only

Former Member
0 Likes
8,399

Dear Kranti,

Please check this thread Simple routine to convert exponential values to float that solves this issue.

Regards,

Mohammed Mohsen