*&---------------------------------------------------------------------*
*& Report Z_BARRY_CONVERT_CURRENCY *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT z_barry_convert_currency .
DATA: jine LIKE bseg-wrbtr .
DATA: date LIKE sy-datum .
date = '20070519' .
DATA: fa LIKE bseg-wrbtr ,
fc LIKE t001-waers ,
lc LIKE t001-waers ,
ty like tcurr-KURST .
fa = 3 .
fc = 'EUR' .
lc = 'ATS' .
ty = 'M'.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
date = date
foreign_amount = fa
foreign_currency = fc
local_currency = lc
type_of_rate = ty
IMPORTING
local_amount = jine
EXCEPTIONS
no_rate_found = 1
OTHERS = 2.
WRITE:/ jine