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

Issue with simple calculation

Hello, Can someone please tell me what I am doing wrong here. With this code I am getting a right value of 7.85 into m_kbetr_lb in my test program but I am getting a value of 784844.72 in my user-exit . I am not sure what is going on here. Any suggestions please.

data : m_kbetr_kg like komv-kbetr,
          m_kbetr_lb  like komv-kbetr,
          m_lb            type p deciamls 5 value '2.20462'.

m_kbetr_kg = 356 / 100.
m_kbetr_lb  = m_kbetr_kg * m_lb
write :/ m_kbetr_lb..

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 Jul 22, 2009 at 04:15 PM

    Hi,

    In the Report Attribute you see the check box Fixed Point Arithmetic which is checked. Where as in the user exit this might not be happened.

    If you uncheck Fixed Point Arithmetic check box and execute the program.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2009 at 04:11 PM

    Hi,

    your user exit has the option Fixed point arithmetic unchecked.

    So, you have to disconsider decimals, besides they are shown in debug, you calculation don't consider them.

    Frisoni

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2009 at 04:14 PM

    Hi,

    Is this the actual code that you are using...

    if so please check the spelling of decimal...

    thnx

    Rahul

    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.