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: 

FM READ_EXCHANGE_RATE not calculating ratios for the currency units

former_member207873
Participant
0 Kudos
1,921

Hi Experts,

     I have been using FM READ_EXCHANGE_RATE and found out in the function module documentation that

The exchange rate valid on the specified date is read from table TCURR according to the currency key and the exchange rate type. The ratios for the currency units from table TCURF are transferred to the calling program in addition to the exchange rate determined.

     But anyhow it is not calculating the ratios for the corresponding currencies ? Because of this I am forced to write one select query inside the loop. Has anyone of you met with the same issue in this particular function module.

BR.

1 ACCEPTED SOLUTION

0 Kudos
575

Hi.

1. Check existing value of the FM input paramater 'KURST' field 'TCURV' table.

2. Values of 'GDATU' field in 'TCURF' and 'TCURR' table are saved INVERTED-DATE type

    So, if you insert date-typed value to 'GDATU' field in 'TCURF' and 'TCURR' table

    you must convert date-typed value to inverted-date type.

    You can convert data type using 'CONVERT' command.

  ex) CONVERT DATE dat1 INTO INVERTED-DATE dat2.

       CONVERT INVERTED-DATE dat1 INTO DATE dat2.

Good luck for you!!

2 REPLIES 2

0 Kudos
576

Hi.

1. Check existing value of the FM input paramater 'KURST' field 'TCURV' table.

2. Values of 'GDATU' field in 'TCURF' and 'TCURR' table are saved INVERTED-DATE type

    So, if you insert date-typed value to 'GDATU' field in 'TCURF' and 'TCURR' table

    you must convert date-typed value to inverted-date type.

    You can convert data type using 'CONVERT' command.

  ex) CONVERT DATE dat1 INTO INVERTED-DATE dat2.

       CONVERT INVERTED-DATE dat1 INTO DATE dat2.

Good luck for you!!

0 Kudos
575

Oh...it is there in the form exporting parameters Foreign Factor and Local Factor. We have to add one more line of programming considering with these factors. Thats it...

BR.