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

Decimal Problem while division in abap

Hi dudes,

I'm using following statement in the report

l_steuer_ep-zzfwgross_SGD = ( ep-zzfwgross ) / ( w_exrate-EXCH_RATE ) .

where EP-ZZFWGROSS = 30694.30-

and W_EXRATE-EXCH_RATE = 0.77851

Resultant value definitely will be greater than 30694 logically thinking...

but i'm getting 0.39- .

Both zzfwgross as well as zzfwgross_sgd are Same Data Types. I dont know why its happening...

My Actual requirement is to convert Currency which is in USD(zzfwgross) into SGD (zzfwgross_sgd)

<removed by moderator>

Regards,

Annamalai.

Edited by: Thomas Zloch on Nov 17, 2011 1:20 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2011 at 11:36 AM

    Hi,

    Make sure the 'Fixed point arithmetic' checkbox is checked in attributes of program.

    However, this checkbox is visible for type 'Executable program' not for include program.

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2011 at 11:23 AM

    Search in SDN for fixed point arithmetic

    Kesav

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 17, 2011 at 11:38 AM

    Hi AnnaMalai(Brother Mountain)

    -(is that your name..?? Pls forgive me if wrong ..;-) )

    If you want to convert to USD to SGD, you need not to use formulas,

    there will be many Functional Modules available to convert,

    For ex: CONVERT_TO_FOREIGN_CURRENCY

    you can use these FMs to convert the currencies, it would be the best option..

    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.