<?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: gross amount in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735097#M319719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just delete the column it_item-grossamount &lt;/P&gt;&lt;P&gt;now your it_items contain items name and amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_items by items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_items.&lt;/P&gt;&lt;P&gt;at end of it_items-item.&lt;/P&gt;&lt;P&gt; sum.&lt;/P&gt;&lt;P&gt;write  : / 'Sub total' ,it_items-amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last.&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;write : / 'Gross Total', it_items-amount.&lt;/P&gt;&lt;P&gt;end at.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Dec 2006 08:57:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-30T08:57:05Z</dc:date>
    <item>
      <title>gross amount</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735095#M319717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;  i want to calculate the gross amount , i tried with a logic but i m getting gross amount at item level i.e for each record in the int table.&lt;/P&gt;&lt;P&gt;   i have an internal table named it_item, its  fields are  it_item-amount, it_item-grossamount and ....&lt;/P&gt;&lt;P&gt;please tell me how to calculate the gross amount.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Dec 2006 08:03:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735095#M319717</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-30T08:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: gross amount</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735096#M319718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just do the normal additions during the loop iteration and get the total into a variable , and if u want to display it at the last then try to get it by at last /endat (control breaks )in the report .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its in ALV then use the do_sum  option in the list during the field catalog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can u post ur code so that we can see where u r getting the error ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Dec 2006 08:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735096#M319718</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-30T08:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: gross amount</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735097#M319719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just delete the column it_item-grossamount &lt;/P&gt;&lt;P&gt;now your it_items contain items name and amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_items by items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_items.&lt;/P&gt;&lt;P&gt;at end of it_items-item.&lt;/P&gt;&lt;P&gt; sum.&lt;/P&gt;&lt;P&gt;write  : / 'Sub total' ,it_items-amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at last.&lt;/P&gt;&lt;P&gt;sum.&lt;/P&gt;&lt;P&gt;write : / 'Gross Total', it_items-amount.&lt;/P&gt;&lt;P&gt;end at.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        SHIBA DUTTA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Dec 2006 08:57:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735097#M319719</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-30T08:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: gross amount</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735098#M319720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use AT LAST then give SUM. and get the gross amount from the amount field.&lt;/P&gt;&lt;P&gt;Dont forget to take the value from the field within that control break statements. &lt;/P&gt;&lt;P&gt;other wise it will restore the old value outside of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take the example given.&lt;/P&gt;&lt;P&gt;in that it calculates the gross amount of sno.&lt;/P&gt;&lt;P&gt;and the field you want to sum must be number field. no character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  Z_TESTYUVA                              .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : Begin of it_sno occurs 0,&lt;/P&gt;&lt;P&gt;        sno TYPE i,&lt;/P&gt;&lt;P&gt;        value(2) TYPE c,&lt;/P&gt;&lt;P&gt;       END of it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : count Type i Value 0,&lt;/P&gt;&lt;P&gt;     count1 Type i Value 0,&lt;/P&gt;&lt;P&gt;     sno_temp Type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 123.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A1'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 123.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A2'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 123.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A3'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 124.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A2'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 125.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A1'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 125.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A3'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_sno-sno = 128.&lt;/P&gt;&lt;P&gt;it_sno-value = 'A1'.&lt;/P&gt;&lt;P&gt;Append it_sno.&lt;/P&gt;&lt;P&gt;clear it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at it_sno.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LAST.&lt;/P&gt;&lt;P&gt;SUM.&lt;/P&gt;&lt;P&gt;sno_temp = it_sno-sno.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Write sno_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*result is 871.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For yours it will be like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at it_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT LAST.&lt;/P&gt;&lt;P&gt;SUM.&lt;/P&gt;&lt;P&gt;gross_amount = it_item-amount.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_item-grossamount = gross_amount.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Dec 2006 09:13:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gross-amount/m-p/1735098#M319720</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-30T09:13:11Z</dc:date>
    </item>
  </channel>
</rss>

