<?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: reports in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162161#M457471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RK,&lt;/P&gt;&lt;P&gt;  If it is a report without using alvs,&lt;/P&gt;&lt;P&gt;You can calculate the total anounts by converting al the amounts into a single currency in a field and then summing it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you r itab is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1 amount currency&lt;/P&gt;&lt;P&gt;abc    100      USD&lt;/P&gt;&lt;P&gt;def     50        INR&lt;/P&gt;&lt;P&gt;gre     200      INR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want to sum up according to a single currency say INR,&lt;/P&gt;&lt;P&gt;then calculate the anount in INR in an extra field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.
if itab-currency = 'USD'.
itab-amtinr = itab-ampunt * 45. "45 Rs = 1 USD
else.
itab-amtinr = itab-amount.
else.
modify itab index sy-tabix.
endif.
endloop.

to calculate the totals line:

loop at itab.
at last.
sum.
clear itab-amount.
clear itab-currency.
append itab.
endat.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 May 2007 08:34:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-02T08:34:30Z</dc:date>
    <item>
      <title>reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162159#M457469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in reports there r different fields related to different currrencies like dollars,rupees etc. but how can we get total output in only one currency name like rupeees or dollars?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 08:26:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162159#M457469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T08:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162160#M457470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We need to use the currency conversion for this one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look at the below program how the conversion will be made&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.

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;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you close the threads whcih you got answers&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>Wed, 02 May 2007 08:29:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162160#M457470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T08:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162161#M457471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RK,&lt;/P&gt;&lt;P&gt;  If it is a report without using alvs,&lt;/P&gt;&lt;P&gt;You can calculate the total anounts by converting al the amounts into a single currency in a field and then summing it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you r itab is like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field1 amount currency&lt;/P&gt;&lt;P&gt;abc    100      USD&lt;/P&gt;&lt;P&gt;def     50        INR&lt;/P&gt;&lt;P&gt;gre     200      INR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you want to sum up according to a single currency say INR,&lt;/P&gt;&lt;P&gt;then calculate the anount in INR in an extra field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.
if itab-currency = 'USD'.
itab-amtinr = itab-ampunt * 45. "45 Rs = 1 USD
else.
itab-amtinr = itab-amount.
else.
modify itab index sy-tabix.
endif.
endloop.

to calculate the totals line:

loop at itab.
at last.
sum.
clear itab-amount.
clear itab-currency.
append itab.
endat.
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 08:34:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162161#M457471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T08:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162162#M457472</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;There is a field with a description called "Value in Local Currency" so wat ever be the currency format of a particular document this field would give the document value in local currency this field is normally find in finance tables "BSIS,BSAS,BSID,BSAD,BSIK,BSAK,BSEG etc. the field name is "DBMTR"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 08:42:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162162#M457472</guid>
      <dc:creator>former_member15255</dc:creator>
      <dc:date>2007-05-02T08:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162163#M457473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi r k,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;u can do this by using control brake events is the loop and endloop.&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;seshu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 08:45:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162163#M457473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T08:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: reports</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162164#M457474</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;Hope that all your queries have been solved. It seems that there are many of your threads that have been asnwered and you have not awarded points to all who deserve that ... please award the needful points and do close the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Jayant .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2007 09:08:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reports/m-p/2162164#M457474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-02T09:08:37Z</dc:date>
    </item>
  </channel>
</rss>

