‎2011 Apr 11 9:01 AM
Hi all,
Have problem in the decimals values , please find the Examples
Ex: DATA: l_var1(11) TYPE p DECIMALS 4 ,
l_var2 TYPE KOmV-KBETR."
l_var1 = '29.7250' .
l_var1 = l_var1 * 1000.
l_var3 = l_var1 .
write: l_var3.
correct values is : 29725.00
am get the values 2972500.00.
Please guide me how to correct
Regards,
San
‎2011 Apr 11 9:11 AM
‎2011 Apr 11 9:24 AM
Hi Vikranth,
Thanks for the replying, have corrected in the code please guide me how to come out problem .
Ex: DATA: l_var1(11) TYPE p DECIMALS 4 ,
l_var3 TYPE KOmV-KBETR."
l_var1 = '29.7250' .
l_var1 = l_var1 * 1000.
l_var3 = l_var1 .
write: l_var3.
correct values is : 29725.00
am get the values 2972500.00.
Please guide me how to correct
Regards,
San
‎2011 Apr 11 9:37 AM
Check with other calculation problems....
and as well as your profile settings also..
in my system report is coming fine.
Regards
sas
‎2011 Apr 11 9:42 AM
Hi saslove,
This is happening at the time of the routines in the VF01 while passing the values into XKOMV-KBETR (L_VAR3) field .
Regards,
San
‎2011 Apr 11 9:45 AM
Hello Santosh,
What is the reference UoM or Currency Key for this particular field?
Check the number of decimal places allowed for the same.
BR,
Suhas
‎2011 Apr 11 10:10 AM
Or may be related to the setting "FIXED POINT ARITHMETIC" in Main program ?
‎2011 Apr 11 10:16 AM
>
> Or may be related to the setting "FIXED POINT ARITHMETIC" in Main program ?
Exactly what i was thinking earler. But
... This is happening at the time of the routines in the VF01 ...
made me change my mind
@OP: You may also check if the "Fixed Point Arithmetic" option is checked in the program attributes.
BR,
Suhas
‎2011 Apr 11 10:22 AM
you are not defined the I_var3 data type.
the following code gives ur answer .
DATA: l_var1(11) TYPE p DECIMALS 4 ,
l_var3(11) TYPE p DECIMALS 4,
l_var2 TYPE KOmV-KBETR."
l_var1 = '29.7250' .
l_var1 = l_var1 * 1000.
l_var3 = l_var1 .
write: l_var3.
and u can be modified by an edit mask or convertion exit.
regards
kamal kishore
‎2011 Apr 11 9:44 AM
If you want to Print l_var3...I would suggest you to declate it with relevant data element ..
In your case
DATA: l_var3 type KBETR.
Try practicing that all currency and quantity fileds must be defined with data element reference...
Thanks,
Nag
‎2011 Apr 11 10:18 AM
solved by myself by using the function module
CALL FUNCTION 'ROUND'
EXPORTING
DECIMALS = 2
input = l_wa_zjdd-shecess_d
SIGN = ' '
IMPORTING
OUTPUT = XKOMV-KBETR
EXCEPTIONS
INPUT_INVALID = 1
OVERFLOW = 2
TYPE_INVALID = 3
OTHERS = 4