Skip to Content

Need code to get exchange rate for a given range.

Hello experts,

I am currently doing a report and I need to do the following:

1. I have 2 parameters namely p_year(from year) and p_asof(as of date). Now,

suppose I entered 2005 in the p_asof and 2000 in p_year. I need to get the

exchange rate for each and every year. So that means year 2000, 2001, 2002,

2003 and 2004.

2. any sample codes on how to use FM CALCULATE_EXCHANGE_RATE_N and

for the BAPI -> BAPI_EXCHANGERATE_GETDETAIL. Help and suggestions would be

highly appreciated.

Again, thank you guys and have a nice day!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2006 at 09:51 AM

    Basically, you would need use the below logic.

    l_year = p_year.

    DO while l_year <= p_asof.

    concatenate '01' '01' l_year into l_date separated by '.'.

    call function module.

    write : / results.

    l_year = l_year + 1.

    enddo.

    you can use the bapi - bapi_exchangerate_getdetail

    using rate_type = 'M' (moving average)

    from_curr = from currency code

    to_currency = to currency code

    date = l_date.

    Regards

    Anurag

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.