<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Need code to get exchange rate for a given range. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-code-to-get-exchange-rate-for-a-given-range/m-p/1481267#M225111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently doing a report and I need to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have 2 parameters namely p_year(from year) and p_asof(as of date). Now, &lt;/P&gt;&lt;P&gt;suppose I entered 2005 in the p_asof and 2000 in p_year. I need to get the&lt;/P&gt;&lt;P&gt;exchange rate for each and every year. So that means year 2000, 2001, 2002, &lt;/P&gt;&lt;P&gt;2003 and 2004. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. any sample codes on how to use FM CALCULATE_EXCHANGE_RATE_N and &lt;/P&gt;&lt;P&gt;for the BAPI -&amp;gt; BAPI_EXCHANGERATE_GETDETAIL. Help and suggestions would be &lt;/P&gt;&lt;P&gt;highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you guys and have a nice day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2006 09:41:43 GMT</pubDate>
    <dc:creator>aris_hidalgo</dc:creator>
    <dc:date>2006-08-03T09:41:43Z</dc:date>
    <item>
      <title>Need code to get exchange rate for a given range.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-code-to-get-exchange-rate-for-a-given-range/m-p/1481267#M225111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello experts, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently doing a report and I need to do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have 2 parameters namely p_year(from year) and p_asof(as of date). Now, &lt;/P&gt;&lt;P&gt;suppose I entered 2005 in the p_asof and 2000 in p_year. I need to get the&lt;/P&gt;&lt;P&gt;exchange rate for each and every year. So that means year 2000, 2001, 2002, &lt;/P&gt;&lt;P&gt;2003 and 2004. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. any sample codes on how to use FM CALCULATE_EXCHANGE_RATE_N and &lt;/P&gt;&lt;P&gt;for the BAPI -&amp;gt; BAPI_EXCHANGERATE_GETDETAIL. Help and suggestions would be &lt;/P&gt;&lt;P&gt;highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thank you guys and have a nice day!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 09:41:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-code-to-get-exchange-rate-for-a-given-range/m-p/1481267#M225111</guid>
      <dc:creator>aris_hidalgo</dc:creator>
      <dc:date>2006-08-03T09:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need code to get exchange rate for a given range.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/need-code-to-get-exchange-rate-for-a-given-range/m-p/1481268#M225112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically, you would need use the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;l_year = p_year.&lt;/P&gt;&lt;P&gt;DO while l_year &amp;lt;= p_asof.&lt;/P&gt;&lt;P&gt;   concatenate '01' '01' l_year into l_date separated by '.'.&lt;/P&gt;&lt;P&gt;   call function module.&lt;/P&gt;&lt;P&gt;   write : / results.&lt;/P&gt;&lt;P&gt;   l_year = l_year + 1.&lt;/P&gt;&lt;P&gt;enddo.&lt;/P&gt;&lt;P&gt;                &lt;/P&gt;&lt;P&gt;you can use the bapi - bapi_exchangerate_getdetail&lt;/P&gt;&lt;P&gt;using rate_type = 'M' (moving average)&lt;/P&gt;&lt;P&gt;from_curr = from currency code &lt;/P&gt;&lt;P&gt;to_currency = to currency code&lt;/P&gt;&lt;P&gt;date = l_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2006 09:51:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/need-code-to-get-exchange-rate-for-a-given-range/m-p/1481268#M225112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-08-03T09:51:04Z</dc:date>
    </item>
  </channel>
</rss>

