Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

convert_to_local_currency

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member181995
Active Contributor
0 Kudos

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.

2 REPLIES 2

former_member223537
Active Contributor
0 Kudos

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

former_member181995
Active Contributor
0 Kudos

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.