Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8735

Getting incorrect value while converting to USD Currency.

$
0
0

Hi All,

 

I am trying to convert HUF amount(Hungarian Currency Format) to USD Amount.While doing this calculation exchange rate is taken when the document is created i.e.Doc creation Date..But i want the exchange rate to be exchange rate for today(Day when report is run).

Please Help ASAP.

 

 

Code for Currency Conversion which i used is following -

 

CLEAR wa_po_curr_usd .

     REFRESH  it_po_curr_usd .

     wa_ekko-netpr = wa_ekko-rlwrt.

     IF is_cdhdr-udate IS NOT INITIAL. .

       DATA : lcurr LIKE tcurc-waers .

       IF wa_ekko-waers NE c_usd.

         CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'

           EXPORTING

             client           = sy-mandt

             date             = is_cdhdr-udate

             foreign_currency = c_usd

             local_amount     = wa_ekko-netpr

             local_currency   = wa_ekko-waers

             type_of_rate     = 'M'

             read_tcurr       = 'X'

           IMPORTING

          foreign_amount   = wa_ekko-po_cur_usd.

       ELSE.

         wa_ekko-po_cur_usd = wa_ekko-rlwrt.

       ENDIF.

     ENDIF.


Viewing all articles
Browse latest Browse all 8735

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>