<?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: convert currency in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579162#M589650</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;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  Z_BARRY_CONVERT_CURRENCY                                    *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_barry_convert_currency                .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: jine  LIKE bseg-wrbtr .&lt;/P&gt;&lt;P&gt;DATA: date LIKE sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date = '20070519' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: fa LIKE bseg-wrbtr ,&lt;/P&gt;&lt;P&gt;      fc LIKE t001-waers ,&lt;/P&gt;&lt;P&gt;      lc LIKE t001-waers ,&lt;/P&gt;&lt;P&gt;      ty like tcurr-KURST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fa = 3 .&lt;/P&gt;&lt;P&gt;fc = 'EUR' .&lt;/P&gt;&lt;P&gt;lc = 'ATS' .&lt;/P&gt;&lt;P&gt;ty = 'M'.&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             = date&lt;/P&gt;&lt;P&gt;    foreign_amount   = fa&lt;/P&gt;&lt;P&gt;    foreign_currency = fc&lt;/P&gt;&lt;P&gt;    local_currency   = lc&lt;/P&gt;&lt;P&gt;    type_of_rate     = ty&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    local_amount     = jine&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    no_rate_found    = 1&lt;/P&gt;&lt;P&gt;    OTHERS           = 2.&lt;/P&gt;&lt;P&gt;WRITE:/ jine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2007 11:59:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-30T11:59:20Z</dc:date>
    <item>
      <title>convert currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579161#M589649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I have two fields one is dmbtr(amount in local currency) and hwaer(currency). As of now it is displaying like 100 usd&lt;/P&gt;&lt;P&gt;                                         150 skk&lt;/P&gt;&lt;P&gt;                                         200 eur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need to change all currencys to skk that means above I need to change to&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;                              100 skk&lt;/P&gt;&lt;P&gt;                              150 skk&lt;/P&gt;&lt;P&gt;                               200 skk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to use the function module convert_to_local_currency I mean what are the parameters I need to pass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send me some sample code for the above requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 11:57:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579161#M589649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T11:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: convert currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579162#M589650</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;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  Z_BARRY_CONVERT_CURRENCY                                    *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  z_barry_convert_currency                .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: jine  LIKE bseg-wrbtr .&lt;/P&gt;&lt;P&gt;DATA: date LIKE sy-datum .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date = '20070519' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: fa LIKE bseg-wrbtr ,&lt;/P&gt;&lt;P&gt;      fc LIKE t001-waers ,&lt;/P&gt;&lt;P&gt;      lc LIKE t001-waers ,&lt;/P&gt;&lt;P&gt;      ty like tcurr-KURST .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fa = 3 .&lt;/P&gt;&lt;P&gt;fc = 'EUR' .&lt;/P&gt;&lt;P&gt;lc = 'ATS' .&lt;/P&gt;&lt;P&gt;ty = 'M'.&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             = date&lt;/P&gt;&lt;P&gt;    foreign_amount   = fa&lt;/P&gt;&lt;P&gt;    foreign_currency = fc&lt;/P&gt;&lt;P&gt;    local_currency   = lc&lt;/P&gt;&lt;P&gt;    type_of_rate     = ty&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    local_amount     = jine&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    no_rate_found    = 1&lt;/P&gt;&lt;P&gt;    OTHERS           = 2.&lt;/P&gt;&lt;P&gt;WRITE:/ jine .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 11:59:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579162#M589650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T11:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: convert currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579163#M589651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXPORTING DATE = BKPF-WWERT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOREIGN_CURRENCY = BKPF-WAERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOCAL_CURRENCY = T001-WAERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOREIGN_AMOUNT = BSEG-WRBTR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RATE = BKPF-KURSF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPE_OF_RATE = 'M'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMPORTING EXCHANGE_RATE = KURS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOCAL_AMOUNT = BSEG-DMBTR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOREIGN_FACTOR = FAKTOR-F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOCAL_FACTOR = FAKTOR-L&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIXED_RATE = FIXKURS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS NO_RATE_FOUND = 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NO_FACTORS_FOUND = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open Transaction se37 , neter the FM name as CONVERT_TO_LOCAL_CURRENCY, display, now in tool bar click the "function module documentation" button for more info.&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   = foreign_amount       &lt;/P&gt;&lt;P&gt;          FOREIGN_CURRENCY = t005-curha     "USD      &lt;/P&gt;&lt;P&gt;          LOCAL_CURRENCY   = T000-MWAER     "GBP      &lt;/P&gt;&lt;P&gt;     IMPORTING                                    &lt;/P&gt;&lt;P&gt;          LOCAL_AMOUNT     = LOCAL_AMOUNT  &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             = SYST-DATUM&lt;/P&gt;&lt;P&gt;        FOREIGN_AMOUNT   = for_amount&lt;/P&gt;&lt;P&gt;        FOREIGN_CURRENCY = 'USD'&lt;/P&gt;&lt;P&gt;        LOCAL_CURRENCY   = 'GPP'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           TYPE_OF_RATE = 'M'  &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        LOCAL_AMOUNT     = loc_ammount&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_RATE_FOUND    = 1&lt;/P&gt;&lt;P&gt;        OVERFLOW         = 2&lt;/P&gt;&lt;P&gt;        NO_FACTORS_FOUND = 3&lt;/P&gt;&lt;P&gt;        NO_SPREAD_FOUND  = 4&lt;/P&gt;&lt;P&gt;        DERIVED_2_TIMES  = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The call calculates the "GPP" value of a given "USD" value based on TCURR's 'official averadge rate' of the current day. Sorry, I just translated the german term, but this is the rate, that is used for international money transfer.&lt;/P&gt;&lt;P&gt;Pls. remember that someone has to fill TCURR with correct values &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you find my answer useful, please don't forget the reward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 12:00:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579163#M589651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T12:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: convert currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579164#M589652</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.&lt;/P&gt;&lt;P&gt; For this, you may either specify the translation rate manually (Parameter RATE) &lt;/P&gt;&lt;P&gt;or have the system determine it from table TCURR on the basis of the rate type, date and currency key.&lt;/P&gt;&lt;P&gt; Because the ratios for the units of the currencies involved in the translation are significant for this translation,&lt;/P&gt;&lt;P&gt; 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;hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Reshma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 12:01:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579164#M589652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: convert currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579165#M589653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;date = &amp;lt;date&amp;gt;&lt;/P&gt;&lt;P&gt;foreign_amount = &amp;lt;other amount&amp;gt;&lt;/P&gt;&lt;P&gt;foreign_currency = &amp;lt;other currency&amp;gt;&lt;/P&gt;&lt;P&gt;local_currency = &amp;lt;skk&amp;gt;&lt;/P&gt;&lt;P&gt;type_of_rate = &amp;lt;exchange rate&amp;gt;&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;local_amount = &amp;lt;amount&amp;gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;no_rate_found = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/  amount.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2007 12:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-currency/m-p/2579165#M589653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-30T12:02:00Z</dc:date>
    </item>
  </channel>
</rss>

