<?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: Currency conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087512#M99836</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;Are both amount fields defined as currency field with decimal 2 (e.g. konp-kbetr)? Internally 2 decimals are added anyway, from here your factor 100 comes - it's just a question how don't get mixed up with different field definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2005 10:51:01 GMT</pubDate>
    <dc:creator>christian_wohlfahrt</dc:creator>
    <dc:date>2005-11-11T10:51:01Z</dc:date>
    <item>
      <title>Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087509#M99833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi developers, i try to convert from a currency to anothr using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            DATE             = SY-DATUM&lt;/P&gt;&lt;P&gt;            FOREIGN_AMOUNT   = P_PREZZO&lt;/P&gt;&lt;P&gt;            FOREIGN_CURRENCY = F_VBAK-WAERK&lt;/P&gt;&lt;P&gt;            LOCAL_CURRENCY   = V_DIVISA_NEGOZIO&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            rate             = TCURR-UKURS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            TYPE_OF_RATE     = 'YSEV'&lt;/P&gt;&lt;P&gt;            READ_TCURR       = 'X'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            LOCAL_AMOUNT     = V_FOREIGN_AMOUNT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the result i get back seems to be 100 times greater than i expected, as decimals are included in the integer part of the value.&lt;/P&gt;&lt;P&gt;Have you got any suggestions?&lt;/P&gt;&lt;P&gt;Thankx a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087509#M99833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T10:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087510#M99834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you have to check your TYPE_OF_RATE.&lt;/P&gt;&lt;P&gt;LOCAL_CURRENCY give 'WAERS'(assign directly) AND JUST CHECK IT UP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Deepak333 k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Deepak333 k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087510#M99834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T10:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087511#M99835</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;check this it may help you......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
       EXPORTING
*    CLIENT                  = 001
        DATE                    = sy-datum
         FOREIGN_CURRENCY        = wa1-WAERS " here you need to declare your foreign currency i.e USD
         LOCAL_CURRENCY          = TCURR-FCURR
         FOREIGN_AMOUNT          = wa1-DMBTR " here you need to declare your amount field.
*    RATE                    = tcurr-ukurs
        TYPE_OF_RATE            = 'M'        " check this also the average rate
*    READ_TCURR              = 'X'
      IMPORTING
        EXCHANGE_RATE           = tcurr-UKURS
*    FOREIGN_FACTOR          =
        LOCAL_AMOUNT            = wa1-TOTAL  " this is the field where the converted amt has to be displayed.
*    LOCAL_FACTOR            =
*    EXCHANGE_RATEX          =
*    FIXED_RATE              =
*    DERIVED_RATE_TYPE       =
*  EXCEPTIONS
*    NO_RATE_FOUND           = 1
*    OVERFLOW                = 2
*    NO_FACTORS_FOUND        = 3
*    NO_SPREAD_FOUND         = 4
*    DERIVED_2_TIMES         = 5
*    OTHERS                  = 6
               .
 IF SY-SUBRC &amp;lt;&amp;gt; 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
**         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Translate foreign currency amount to local currency&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An amount in local currency is calculated from a specified foreign currency amount. For this, you may either specify the translation rate manually (Parameter RATE) or have the system determine it from table TCURR on the basis of the rate type, date and currency key. Because the ratios for the units of the currencies involved in the translation are significant for this translation, table TCURF is always read by the program, and there must be a valid entry there for the data specified. IF exchange rate fixing is defined for the exchange rate type TYPE_OF_RATE or an alternative exchange rate is defined for the currency pair, this information is transferred to the calling program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When table TCURR is read, the foreign currency key is always taken as the first part of the key and the local currency as the second part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points for helpfull answers and close the thread if your question is solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:50:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087511#M99835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T10:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087512#M99836</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;Are both amount fields defined as currency field with decimal 2 (e.g. konp-kbetr)? Internally 2 decimals are added anyway, from here your factor 100 comes - it's just a question how don't get mixed up with different field definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 10:51:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087512#M99836</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2005-11-11T10:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087513#M99837</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;Here is the sample code.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_AMOUNT_TO_CURRENCY'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          date             = sy-datum&lt;/P&gt;&lt;P&gt;          foreign_currency = 'USD'&lt;/P&gt;&lt;P&gt;          foreign_amount   = '2000.00'&lt;/P&gt;&lt;P&gt;          local_currency   = 'EUR'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;          local_amount     = amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.If so,kindly reward points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 12:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087513#M99837</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2005-11-11T12:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087514#M99838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Please look in to tcurx table to know no of decimals&lt;/P&gt;&lt;P&gt;    defined for currency.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 13:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087514#M99838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T13:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087515#M99839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Domenico.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like your local curency, has 0 decimal places - you shoul look for this information in transaction OY04 (IMG- general settings-Currencies).&lt;/P&gt;&lt;P&gt;If your currency is in this table - so it has no decimals places and as resul of conversion you got X100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards Vitali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 14:19:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087515#M99839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T14:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Currency conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087516#M99840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After that function call use write with currency option it will give the exact result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write p_prezzo into new_variable with currenty f_vbak-werk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Satya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2005 14:31:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/1087516#M99840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-11T14:31:13Z</dc:date>
    </item>
  </channel>
</rss>

