06-16-2008 8:50 PM
Hey folks ,
the issue is when i run a report in background the job got cancelled because of the error SG106 which is coming through CONVERT_TO_LOCAL_CURRENCY function module. The error says the translation result
1.000.000.000,00 is too large. in detail it says The result of a conversion between two currencies is an amount which is too large to be stored. but the field length i am using is NETWR which can store upto 100 billion dollars. Can somebody help me what would be the exact problem. Whether i have to change the field length or some change has to be done in the standard FM . Its an urgent issue and any help would be properly rewarded.
Thanks
Larry
06-17-2008 7:41 AM
Iarry,
have a look at this and make your data same as below decleared as wrbtr not netwr:
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING DATE = BKPF-WWERT
FOREIGN_CURRENCY = BKPF-WAERS
LOCAL_CURRENCY = T001-WAERS
FOREIGN_AMOUNT = BSEG-WRBTR
RATE = BKPF-KURSF
TYPE_OF_RATE = 'M'
IMPORTING EXCHANGE_RATE = KURS
LOCAL_AMOUNT = BSEG-DMBTR
FOREIGN_FACTOR = FAKTOR-F
LOCAL_FACTOR = FAKTOR-L
FIXED_RATE = FIXKURS
EXCEPTIONS NO_RATE_FOUND = 4
NO_FACTORS_FOUND = 8.
Amit.
06-17-2008 7:35 AM
Hi Larry,
Could you please check whether the value which is passed to this FM is correct. There could be a possibility of incorrect value ( incorrect no. of decimal places etc ) being passed to the FM & hence the output is a large value.
Best regards,
Prashant
06-17-2008 7:41 AM
Iarry,
have a look at this and make your data same as below decleared as wrbtr not netwr:
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING DATE = BKPF-WWERT
FOREIGN_CURRENCY = BKPF-WAERS
LOCAL_CURRENCY = T001-WAERS
FOREIGN_AMOUNT = BSEG-WRBTR
RATE = BKPF-KURSF
TYPE_OF_RATE = 'M'
IMPORTING EXCHANGE_RATE = KURS
LOCAL_AMOUNT = BSEG-DMBTR
FOREIGN_FACTOR = FAKTOR-F
LOCAL_FACTOR = FAKTOR-L
FIXED_RATE = FIXKURS
EXCEPTIONS NO_RATE_FOUND = 4
NO_FACTORS_FOUND = 8.
Amit.