2007 Apr 26 12:52 PM
Hi,
i am facing a problen while dividing the currency value in a routines.
i have 2 variables of type KBETR.
data : a type konv-kbetr,
b type konv-kbetr,
c type konv-kbetr.
a = '10.00'.
b = '7.00'.
<b>c = b / a.</b>
when i check this code in simple abap editor SE38 , i
<b>get the result as 0.7</b>
but i am using this calculation in a routine for pricing
FORM FRM_KONDI_WERT_622. and include is RV64A622
when i write the same code in this include, i am gettin <b>the result as 0.1.</b>
Pls help why the system is behaving in diff ways at two places.
Points will be awarded for helpful answers.
Regards,
Sonika
Message was edited by:
Sonika Ahuja
Hi,
i am facing a problen while dividing the currency value in a routines.
i have 2 variables of type KBETR.
data : a type konv-kbetr,
b type konv-kbetr,
c type konv-kbetr.
a = '10.00'.
b = '7.00'.
<b>c = b / a.</b>
when i check this code in simple abap editor SE38 , i
<b>get the result as 0.7</b>
but i am using this calculation in a routine for pricing
FORM FRM_KONDI_WERT_622. and include is RV64A622
when i write the same code in this include, i am gettin <b>the result as 0.1.</b>
Pls help why the system is behaving in diff ways at two places.
Points will be awarded for helpful answers.
Regards,
Sonika
Message was edited by:
Sonika Ahuja
2007 Apr 26 12:54 PM
Hi
FORM FRM_KONDI_WERT_622 will give 0.7 only.
Please check the declaration types are in synchronous with FM types.
Regards,
Sreeram
2007 Apr 26 1:05 PM
Hi
Division and Multiplication won't work properly in routines
Only you can do addtions/substitutions
so better write a Zfun module outside to do the same simplification in that
and call the custom fun module into the routine
(just pass two paramters like konv-kwert to that fun module
and one output parameter as Kwert )
This will serve the purpose
we have done like this and succeeded.
reward points
regards
Anji
2007 Apr 26 1:05 PM
Hi,
i have got where the problem is...
in the attributes of my include there is no checkbox for <b>fixed point arithmetic</b> which should be checked , but i am not able to see that checkbox i mean attribute for that include.
how can i check that attribute for include??
Regards,
Sonika
2007 Apr 26 1:14 PM
I was thinking of that , but as it is standard include wondering how can u change that...
will check any FM which will change the attributes and let u know shortly
2007 Apr 26 1:21 PM
use FM <b>RS_TRDIR_UPDATE</b>,
Pass the structure TRDIR with the field FIXPT as X , hope this will update TRDIR table and solve ur problem
2007 Apr 26 2:03 PM
Hi Chandrashekhar,
i have updated using FM RS_TRDIR_UPDATE, but still division is not working.
i had to do as Anji as suggested by ZFM only.
Thanks.
Regards,
Sonika