<?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 Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729616#M1772147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ronaldo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define as data type p is not what i wanted, I need to define all the amount as the same data type 'CURR', see the screen shot above of the type 'CURR'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Aug 2013 01:18:06 GMT</pubDate>
    <dc:creator>derek_yang</dc:creator>
    <dc:date>2013-08-30T01:18:06Z</dc:date>
    <item>
      <title>Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729612#M1772143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run into a very weird issue when calling function module '&lt;SPAN class="L0S33"&gt;'CONVERT_TO_LOCAL_CURRENCY', the result of the exchange rate is 100000 times of the actual value I expected. See the details here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/270148" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Then I call function module like below:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FUNCTION &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'CONVERT_TO_LOCAL_CURRENCY'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;datlo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreign_amount&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lv_value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreign_currency&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'EUR'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_currency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'USD'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type_of_rate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'M'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IMPORTING&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exchange_rate&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lv_liccf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_amount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lv_amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXCEPTIONS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_rate_found&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; overflow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_factors_found &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_spread_found&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; derived_2_times&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;6&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;/ lv_liccf&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ lv_amount&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;lv_convert &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;lv_value * lv_liccf&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;Given the lv_value to 1000, and after the run, the lv_amount is correctly converted to 1333.3, but the lv_liccf is return as &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;1.3333000000000000E+05&lt;/STRONG&gt;&lt;/SPAN&gt;. Which is 100000 times of the actual value. So as a result the lv_convert is 100000 times of 1333.3, which didn't make much sense to me.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the test code I written in my local, The idea in real program is that I stored this exchange rate in a table, so next time when doing the conversion, if I am sure the criteria is the same, I just get this exchange rate value directly from database instead of call conversion function module again, but obviously I get some issues here, so I have below questions:&lt;/P&gt;&lt;P&gt;1. I debug into the code, but didn't even get much clue about this, does anyone know what happened here?&lt;/P&gt;&lt;P&gt;2. How can I avoid this problem if I don't want to call the conversion function module again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is highly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Derek&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S55"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 11:20:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729612#M1772143</guid>
      <dc:creator>derek_yang</dc:creator>
      <dc:date>2013-08-29T11:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729613#M1772144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Derek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you check if you are using the right data type for the lv_convert ? As far as my understanding I dont seee any issues with the FM, it is only wiht the field LV_CONVERT . Correct me If I am wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 18:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729613#M1772144</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-08-29T18:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729614#M1772145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Check&lt;/P&gt;&lt;P&gt;declare the variable with value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;TYPE p DECIMALS 2&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 19:15:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729614#M1772145</guid>
      <dc:creator>ronaldo_aparecido</dc:creator>
      <dc:date>2013-08-29T19:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729615#M1772146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data type for both 'lv_amount', 'lv_value' and 'lv_convert' are declared as data type 'CURR', which is the 'Currency field, stored as DEC', like below:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/270512" /&gt;&lt;/P&gt;&lt;P&gt;I didn't see anything wrong here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 01:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729615#M1772146</guid>
      <dc:creator>derek_yang</dc:creator>
      <dc:date>2013-08-30T01:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729616#M1772147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ronaldo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define as data type p is not what i wanted, I need to define all the amount as the same data type 'CURR', see the screen shot above of the type 'CURR'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 01:18:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729616#M1772147</guid>
      <dc:creator>derek_yang</dc:creator>
      <dc:date>2013-08-30T01:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729617#M1772148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Derek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not understand how you define a variable with data type CURR in code because elementary data type for 'CURR' is packed decimal and syntax is as suggested by Ronaldo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 03:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729617#M1772148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-08-30T03:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729618#M1772149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exchange rates are saved in Exponential format to save the accuracy of the rates as minor difference in 3rd or 4th decimal place make a difference. So the they are saved in such a way internally. I would suggest to set the flag READ_TCURR = 'X' that should give you the exchange rate in external format i think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Arindam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2013 03:54:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729618#M1772149</guid>
      <dc:creator>arindam_m</dc:creator>
      <dc:date>2013-08-30T03:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729619#M1772150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The function READ_TCURR is not for "give you the exchange rate in external format i think". It is to handle the buffer / read from table:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/365804" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 20:54:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729619#M1772150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-17T20:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Function module 'CONVERT_TO_LOCAL_CURRENCY' return wrong exchange rate</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729620#M1772151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I was having similar issues until I declared the exchange rate fields as " UKURS_CURR". See the test code below. I also had an issue with the local amount for very small quantities. For example the exchange rate from MXN to USD is 0.07667 but when I enter 1 MXN as foreign_amount and try to convert to USD, I get zero as local_amount &lt;SPAN __jive_emoticon_name="angry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/408/images/emoticons/angry.gif"&gt;&lt;/SPAN&gt;. That is why I took the exchange rate field instead &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.sap.com/408/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alfonzo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;*&amp;amp;---------------------------------------------------------------------*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp; Report&amp;nbsp; ZBW_CONVERT_TO_LOCAL_CURRENCY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp;---------------------------------------------------------------------*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31" style="font-family: courier new,courier; font-size: 8pt;"&gt; *&amp;amp;---------------------------------------------------------------------*&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt; &lt;SPAN class="L0S52"&gt;REPORT &lt;/SPAN&gt;zbw_convert_to_local_currency&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt; &lt;SPAN class="L0S52"&gt;DATA&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_drt&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;kurst_curr&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_fixrat &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_forfac &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_locamo &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_locfac &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_price&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_rate&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;UKURS_CURR&lt;SPAN class="L0S55"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; v_ratex&amp;nbsp; &lt;SPAN class="L0S52"&gt;TYPE &lt;/SPAN&gt;f&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt; v_price &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt; &lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FUNCTION &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'CONVERT_TO_LOCAL_CURRENCY'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52" style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; EXPORTING&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;datum&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreign_amount&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_price&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreign_currency&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'MXN'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_currency&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'USD'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type_of_rate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'M'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52" style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; IMPORTING&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exchange_rate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_rate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreign_factor&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_forfac&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_amount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_locamo&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_factor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_locfac&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exchange_ratex&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_ratex&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fixed_rate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_fixrat&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; derived_rate_type &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;v_drt&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52" style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; EXCEPTIONS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_rate_found&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_factors_found&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; no_spread_found&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; derived_2_times&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;4&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;OTHERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;5&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'exchange_rate'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_rate&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'foreign_factor'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_forfac&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'local_amount'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_locamo&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'local_factor'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_locfac&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'exchange_ratex'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_ratex&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'fixed_rate'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_fixrat&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;: &lt;/SPAN&gt;/ &lt;SPAN class="L0S33"&gt;'derived_rate_type'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;, &lt;/SPAN&gt;v_drt&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52" style="font-family: courier new,courier; font-size: 8pt;"&gt; ENDIF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: courier new,courier;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 21:00:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-convert-to-local-currency-return-wrong-exchange-rate/m-p/9729620#M1772151</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-01-17T21:00:23Z</dc:date>
    </item>
  </channel>
</rss>

