Always return to Peoplebooks when you are about to write a new function. A quick search might save you a lot of time. This is what I've done when I was about to write a new function to convert currency from US dollar to any other currency on the PS_RT_RATE_TBL (rate table).
PeopleSoft already delivers such a function for you to use. The function is ConvertCurrency.
ConvertCurrency(amt, currency_cd, exchng_to_currency, exchng_rt_type, effdt, converted_amt [, error_process [, round] [, rt_index]])