on 07-16-2015 2:34 PM
Hi,
Struggling with this error, I have searchd the forum but couldn't find anything relevant...
Is this a common error?
How to solve it?
In BW 7.3
I am using CONVERT_TO_LOCAL_CURRENCY in a routine where I have as input data
data: fl type AUSP-ATFLV.
data: p type p decimals 5.
fl = SOURCE_FIELDS-EXCHG_RATE. //where fl = 1,1538240000000000E+04
p = fl.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
DATE = 19.03.2013
FOREIGN_AMOUNT = 61,13
FOREIGN_CURRENCY = EUR
LOCAL_CURRENCY = THB
RATE = p
IMPORTING
LOCAL_AMOUNT = RESULT
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5
OTHERS = 6.
Well,
this ends in error because function doesn't handle rate = 12538.24000 or better it doesn't handle any rate with 10 digits or more!
As we know we have in the World so many rates with E+04, E+05, a.s.o
How can we solve this?
Should I raise it to SAP?
Thank you
Hi Paulo,
You are correct, SAP is not able to handle the exceeding data length. In the FM CONVERT_TO_LOCAL_CURRENCY the RATE ( RATE = p ) is of type UKURS_CURR field which is of 9 length with 5 decimal places. So if your input value exceeds this length FM will fail.
Define your data type P as UKURS_CURR.
i.e. DATA: p TYPE UKURS_CURR.
Then you should be good. However if you take it to SAP guys I doubt they will change it as it is a very generic FM which is used in almost every finance calculation in SAP so changing it will break SAP
Please let me know if there are any questions.
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thank you for your help and confirmation that I am not the only one seeing this error 🙂
I tried to convert to that type UKURS_CURR but I got an error on this step:
data: fl type AUSP-ATFLV.
data: p5 type UKURS_CURR.
fl = SOURCE_FIELDS-EXCHG_RATE.
p5 = fl.
An exception (CX_SY_CONVERSION_OVERFLOW) occurred in p5 when fl = 12345.45632
Any more ideas?
Thank you
As this function is used in so many FI calculations I wonder why there aren't so much "complains" like mine
Paulo,
If you execute the FM locally in SE37 and pass the same value - does it return a result ..?
If it does , then check the data types of your variables in the code - see if you can use a float instead of decimal or vice versa to see if that helps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.