<?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/3697474#M890243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Kumar,
Have a look the following .

&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_detail.
  IF s_waers[] IS NOT INITIAL.
    "Select-Option s_waers is a internal table
    "You cant pass s_waers as a variable, as foreign_currency in CONVERT_TO_FOREIGN_CURRENCY function module.
    "What you have to do is read the table s_waers for perticalular currency and pass through function module
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
      EXPORTING
        date             = sy-datum
        foreign_currency = s_waers " You cant pass like this as s_waers is internal table.
        local_amount     = it_detail-dmbtr
        local_currency   = bkpf-waers
        type_of_rate     = 'M'
      IMPORTING
        foreign_amount   = it_detail-dmbtr.
    IF sy-subrc &amp;lt;&amp;gt; 0.
    ENDIF.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Apr 2008 03:18:25 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-04-16T03:18:25Z</dc:date>
    <item>
      <title>Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697469#M890238</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;I tried the following FM to convert Currency, Sy-Subrc = 0.&lt;/P&gt;&lt;P&gt; pls advise me if i am wrong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IT_DETAIL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If s_waers is not initial.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CONVERT_TO_FOREIGN_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 = s_WAERS&lt;/P&gt;&lt;P&gt;              LOCAL_AMOUNT     = it_detail-dmbtr&lt;/P&gt;&lt;P&gt;              LOCAL_CURRENCY   = bkpf-waers&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            rate             = 0&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              TYPE_OF_RATE     = 'M'&lt;/P&gt;&lt;P&gt;         IMPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            exchange_rate    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;              FOREIGN_AMOUNT   = it_detail-dmbtr&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            foreign_factor   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            local_factor     =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            exchange_ratex   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&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;             OTHERS           = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc&amp;lt;&amp;gt; 0&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 01:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697469#M890238</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T01:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697470#M890239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How is the currency key input field (s_WAERS) defined?&lt;/P&gt;&lt;P&gt;It should be char field with value of currency code in it (eg USD).&lt;/P&gt;&lt;P&gt;If it is select option as the name implies the code will not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 02:12:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697470#M890239</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T02:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697471#M890240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s_waers defined as ,  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:  s_waers   FOR  bkpf-waers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 02:28:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697471#M890240</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T02:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697472#M890241</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;You have to define a new variable of char type and pass currency code to it. Then use this as input value to currency code parameter of the FM.&lt;/P&gt;&lt;P&gt;You cannot use select option directly in the FM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 02:32:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697472#M890241</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T02:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697473#M890242</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;/P&gt;&lt;P&gt;  see the usage of FM,&lt;/P&gt;&lt;P&gt;Compare with you code and fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : l_skb1   like skb1.&lt;/P&gt;&lt;P&gt;data: l_amount like fdes-wrshb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'CONVERT_TO_FOREIGN_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 = l_skb1-waers---This is a structure&lt;/P&gt;&lt;P&gt;                  local_amount     = fdes-wrshb&lt;/P&gt;&lt;P&gt;                  local_currency   = fdes-dispw&lt;/P&gt;&lt;P&gt;             importing&lt;/P&gt;&lt;P&gt;                  foreign_amount   = l_amount&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;                  others           = 6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 03:13:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697473#M890242</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T03:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697474#M890243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Kumar,
Have a look the following .

&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_detail.
  IF s_waers[] IS NOT INITIAL.
    "Select-Option s_waers is a internal table
    "You cant pass s_waers as a variable, as foreign_currency in CONVERT_TO_FOREIGN_CURRENCY function module.
    "What you have to do is read the table s_waers for perticalular currency and pass through function module
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
      EXPORTING
        date             = sy-datum
        foreign_currency = s_waers " You cant pass like this as s_waers is internal table.
        local_amount     = it_detail-dmbtr
        local_currency   = bkpf-waers
        type_of_rate     = 'M'
      IMPORTING
        foreign_amount   = it_detail-dmbtr.
    IF sy-subrc &amp;lt;&amp;gt; 0.
    ENDIF.
  ENDIF.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;

Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 03:18:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697474#M890243</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-16T03:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697475#M890244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S_waers is not an internal table. It is selection screen field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 05:15:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697475#M890244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T05:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697476#M890245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No its an internal table if use select-options for s_waers then its an internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 05:19:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697476#M890245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-16T05:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697477#M890246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is a selection-screen field and at the same time an internal table with the following structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sign type c
option type char02
low type werks
high type werks
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2008 05:27:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3697477#M890246</guid>
      <dc:creator>peter_ruiz2</dc:creator>
      <dc:date>2008-04-16T05:27:47Z</dc:date>
    </item>
  </channel>
</rss>

