<?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/3040385#M719551</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at the right side of the = the calculation is done..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then we are storing the value in the left side variable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info about data type and conversion..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For learning ABAP data types&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch07.htm" target="test_blank"&gt;http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch07.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will really help you a lot...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for Conversion of data type..&lt;/P&gt;&lt;P&gt;See the DATA conversion topic of below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch09.htm#AssignmentStatements" target="test_blank"&gt;http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch09.htm#AssignmentStatements&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it is helpul&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2007 11:46:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-12T11:46:48Z</dc:date>
    <item>
      <title>Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040383#M719549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello folks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am a total beginner, so please forgive me my stupid questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the  code below for currency conversion. It works fine. However i wonder why the field ld_erate is of type char. And how can abap do aritmetics like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ld_erate = t_er  * ( t_lf / t_ff ) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with a char-string. Is there a good document that explains this or similar operations? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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,
      t_er        TYPE tcurr-ukurs,
      t_ff        TYPE tcurr-ffact,
      t_lf        TYPE tcurr-tfact,
      t_vfd       TYPE datum,
      ld_erate(12)   TYPE c.


gd_tcurr = 'EUR'.
gd_date  = sy-datum.
gd_value = SOURCE_FIELDS-/BIC/ZFPN_KZ1.
gd_fcurr = SOURCE_FIELDS-CURRENCY.


  CALL FUNCTION 'READ_EXCHANGE_RATE'
    EXPORTING
*       CLIENT                  = SY-MANDT
      date                    = gd_date
      foreign_currency        = gd_fcurr
      local_currency          = gd_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_lf / t_ff ) .
    gd_value = gd_value * ld_erate.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 11:41:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040383#M719549</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T11:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040384#M719550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in ur code u r doing operations on fields whose type is decimal and not character....&lt;/P&gt;&lt;P&gt;tcurr-ffact,tfact,ukurs all are of type decimal 9.&lt;/P&gt;&lt;P&gt;after doing the operation u r storing it in charecter type variable......!!!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 11:45:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040384#M719550</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T11:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040385#M719551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at the right side of the = the calculation is done..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then we are storing the value in the left side variable...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more info about data type and conversion..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For learning ABAP data types&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch07.htm" target="test_blank"&gt;http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch07.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will really help you a lot...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and for Conversion of data type..&lt;/P&gt;&lt;P&gt;See the DATA conversion topic of below link..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch09.htm#AssignmentStatements" target="test_blank"&gt;http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/ch09.htm#AssignmentStatements&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward points if it is helpul&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;ilesh 24x7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2007 11:46:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/currency-conversion/m-p/3040385#M719551</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-12T11:46:48Z</dc:date>
    </item>
  </channel>
</rss>

