<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963429#M395857</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;1. u can validate before inserting the currency into ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single WAERS from TCURT into  wa_waers
    where waers = val_data_waers
    and SPRAS = 'EN'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. now chk the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sy-subrc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; of above stmnt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. if it is '0' insert, else reject&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;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Feb 2007 06:10:21 GMT</pubDate>
    <dc:creator>anversha_s</dc:creator>
    <dc:date>2007-02-23T06:10:21Z</dc:date>
    <item>
      <title>Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963428#M395856</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 have a Ztable with company code, plant , currency fields and others.&lt;/P&gt;&lt;P&gt;I have to validate the currency in the Ztable against the currency in the standard table of SAP.&lt;/P&gt;&lt;P&gt;Is there any function module available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:06:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963428#M395856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963429#M395857</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;1. u can validate before inserting the currency into ztable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select single WAERS from TCURT into  wa_waers
    where waers = val_data_waers
    and SPRAS = 'EN'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. now chk the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;sy-subrc&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; of above stmnt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. if it is '0' insert, else reject&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;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:10:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963429#M395857</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-02-23T06:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963430#M395858</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;If u r validating selection screen then do as bewlo:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT SINGLE kwert 
              INTO xxx-kwert
              WHERE ... IN s_...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any check table refered against the currency field, if so use taht table for validating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u r asking for validation in the tabel u can refer the currecy field against a check table, so it will vlaidate automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Currency key u have to see table &amp;lt;b&amp;gt;TCURC.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;U can refer this code for currency conversion&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: gd_fcurr TYPE tcurr-fcurr,
      gd_tcurr TYPE tcurr-tcurr,
      gd_date  TYPE sy-datum,
      gd_value TYPE i.

gd_fcurr = 'EUR'.
gd_tcurr = 'GBP'.
gd_date  = sy-datum.
gd_value = 10.

PERFORM currency_conversion USING gd_fcurr
                                  gd_tcurr
                                  gd_date
                         CHANGING gd_value.



* Convert value to Currency value 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  currency_conversion
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      --&amp;gt;P_GD_FCURR  text
*      --&amp;gt;P_GD_TCURR  text
*      --&amp;gt;P_GD_DATE   text
*      &amp;lt;--P_GD_VALUE  text
*----------------------------------------------------------------------*
FORM currency_conversion  USING    p_fcurr
                                   p_tcurr
                                   p_date
                          CHANGING p_value.

  DATA: t_er        TYPE tcurr-ukurs,
        t_ff        TYPE tcurr-ffact,
        t_lf        TYPE tcurr-tfact,
        t_vfd       TYPE datum,
        ld_erate(12)   TYPE c.

  CALL FUNCTION 'READ_EXCHANGE_RATE'
    EXPORTING
*       CLIENT                  = SY-MANDT
      date                    = p_date
      foreign_currency        = p_fcurr
      local_currency          = p_tcurr
      TYPE_OF_RATE            = 'M'
*       EXACT_DATE              = ' '
   IMPORTING
      exchange_rate           = t_er
      foreign_factor          = t_ff
      local_factor            = t_lf
      valid_from_date         = t_vfd
*       DERIVED_RATE_TYPE       =
*       FIXED_RATE              =
*       OLDEST_RATE_FROM        =
   EXCEPTIONS
     no_rate_found           = 1
     no_factors_found        = 2
     no_spread_found         = 3
     derived_2_times         = 4
     overflow                = 5
     zero_rate               = 6
     OTHERS                  = 7
            .
  IF sy-subrc EQ 0.
    ld_erate = t_er / ( t_ff / t_lf ).
    p_value = p_value * ld_erate.
  ENDIF.
ENDFORM.                    " currency_conversion&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/country/country_curr.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/country/country_curr.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if this helsp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Judith Jessie Selvi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963430#M395858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963431#M395859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can use foll currency fm :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the exchange rate using the function module READ_EXCHANGE_RATE.&lt;/P&gt;&lt;P&gt;Convert it to local currency by using CONVERT_TO_LOCAL_CURRENCY.&lt;/P&gt;&lt;P&gt;CONVERT_TO_FOREIGN_CURRENCY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward for the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:26:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963431#M395859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963432#M395860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi sachin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how did u solve the issue with the above FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:32:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963432#M395860</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2007-02-23T06:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963433#M395861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont want any currency conversions like from GBP to UDS or so..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to check if the currency in my Ztable is matching with the one which is maintained in standard table at the time of config or so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If both the currencies are same, I have my logic for further processing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:36:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963433#M395861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963434#M395862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tell me the table name and field name, which field u r referring?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also R u validating in the program? if so tell me the selection parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963434#M395862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Currency</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963435#M395863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TCURC.&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;Prabhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Feb 2007 06:46:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency/m-p/1963435#M395863</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-23T06:46:00Z</dc:date>
    </item>
  </channel>
</rss>

