<?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: Re: Internal table. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219037#M1008096</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;Your purpose can be solved using COLLECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It adds all the numeric fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Jul 2008 05:40:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-21T05:40:58Z</dc:date>
    <item>
      <title>Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219025#M1008084</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 multiple rows with the same date field in an internal table , i need to sum up the amount for the same date. could any body let me know how to do the same.&lt;/P&gt;&lt;P&gt;following is the internal table format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;customer no  ,| date | amount&lt;/P&gt;&lt;P&gt;123                | 20080720| 100.00&lt;/P&gt;&lt;P&gt;123                |20080720| 200.00&lt;/P&gt;&lt;P&gt;123                |20080715| 100.00&lt;/P&gt;&lt;P&gt;123               |20080715|500.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ouput format should be &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;123 | 20080720|300.00&lt;/P&gt;&lt;P&gt;123|20080715|600.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 15:18:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219025#M1008084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T15:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219026#M1008085</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;u can use &lt;STRONG&gt;collect&lt;/STRONG&gt; statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnks and rgds,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;raghul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 15:23:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219026#M1008085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219027#M1008086</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 the fields customer no and date are char. type and amount is of type p/f field then use collect statement to achieve ur requirment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; itab1 = itab.&lt;/P&gt;&lt;P&gt; collect itab1.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here itab (with header line) contains ur entries&lt;/P&gt;&lt;P&gt;itab1 (with header line) will contain ur output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 15:32:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219027#M1008086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T15:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219028#M1008087</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;Use the Collect statement on the internal table. It will update the table against the char fields by adding all the numeric fields. For Help press Cltr' + F1 on collect statement in abap editor, it will give you sample code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naresh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 15:42:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219028#M1008087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219029#M1008088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friend,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;itab1 and itab2 are of same structure.&lt;/P&gt;&lt;P&gt;fs_ itab1 - work area(field string) for itab1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at itab1.&lt;/P&gt;&lt;P&gt;  collect fs_ itab1 into itab2.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this link on COLLECT which has more options:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://members.tripod.com/sap_abap/collect.htm" target="test_blank"&gt;http://members.tripod.com/sap_abap/collect.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chandra Sekhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 16:31:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219029#M1008088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T16:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219030#M1008089</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;U can use the control break statement like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at itab &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum = Sum + &amp;lt;amt field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; At end of &amp;lt;date field&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;final itab field name&amp;gt;  = sum&lt;/P&gt;&lt;P&gt;&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;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sharin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sharin varghese on Jul 21, 2008 9:55 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: sharin varghese on Jul 21, 2008 9:55 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219030#M1008089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219031#M1008090</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;Use &lt;STRONG&gt;COLLECT&lt;/STRONG&gt; statement.&lt;/P&gt;&lt;P&gt;It sums up all the numeric value with same key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the link for detail concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your case if work area be WA and internal table be itab , the syntax will be &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;COLLECT wa into itab&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anirban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:27:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219031#M1008090</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219032#M1008091</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 can just use simple collect itab statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   this statement will help you to sum up the imilar fields and&lt;/P&gt;&lt;P&gt;group them together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  it will add up only the numeric fields and group the other fields..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219032#M1008091</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219033#M1008092</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;           Try this logic,this will solve ur issue,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; Loop at ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     At End of date.&lt;/P&gt;&lt;P&gt;         Sum.&lt;/P&gt;&lt;P&gt;    write : amount.  ( it is total amount for corresponding date ) &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;&lt;/P&gt;&lt;P&gt;Hope it is helps,,,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards,&lt;/P&gt;&lt;P&gt; T.Durai murugan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:30:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219033#M1008092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219034#M1008093</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;  As also said by others use the COLLECT statement while populating data in the internal table, as it will add all the numeric fields where the key field are similar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  or during displaying the records you can use AT NEW statement like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AT NEW date.&lt;/P&gt;&lt;P&gt;   SUM.&lt;/P&gt;&lt;P&gt;   WRITE 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;With luck,&lt;/P&gt;&lt;P&gt;Pritam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219034#M1008093</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219035#M1008094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COLLECT &amp;lt;WA&amp;gt;  ... &amp;lt;ITAB&amp;gt; works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check ..&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;Raju Mummidi.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:45:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219035#M1008094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T04:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219036#M1008095</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;Use the COllect statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Collect &amp;lt;Internal Table name&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sentence internally adds the numeric fields based on the non-numeric fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mohammadi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 04:48:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219036#M1008095</guid>
      <dc:creator>former_member497886</dc:creator>
      <dc:date>2008-07-21T04:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Internal table.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219037#M1008096</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;Your purpose can be solved using COLLECT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It adds all the numeric fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jul 2008 05:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/re-internal-table/m-p/4219037#M1008096</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-21T05:40:58Z</dc:date>
    </item>
  </channel>
</rss>

