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'
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'
foreign_amount = wa_ekko-po_cur_usd.
wa_ekko-po_cur_usd = wa_ekko-rlwrt.