07-22-2009 5:06 PM
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..
07-22-2009 5: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.
07-22-2009 5: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
07-22-2009 5:14 PM
Hi,
Is this the actual code that you are using...
if so please check the spelling of decimal...
thnx
Rahul
07-22-2009 5: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.
07-22-2009 5:18 PM
Hi,
I have unchecked the fixed point arithmetic in my test program and now I get funky values in my test program as well. So the fixed point arithmetic should be the issue. How can I fix it in my exit with the code?
Edited by: jackie stone on Jul 22, 2009 6:19 PM
07-22-2009 5:28 PM
Or may be, is there a FM that I can use to convert values from KG to LB and vice-versa?
07-22-2009 5:34 PM
call function 'UNIT_CONVERSION_SIMPLE'
exporting
input = weight_in
unit_in = 'LB'
unit_out = 'KG'
importing
output = weight_out
07-22-2009 5:41 PM