<?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: collect in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657907#M291919</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is nothing like that.&lt;/P&gt;&lt;P&gt;BUt you need to append that only if you want a separate internal table with subtptal/totals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Correct way1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab into itab2.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Correct way2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Wrong way.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;endat.&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;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Oct 2006 10:29:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-10-31T10:29:49Z</dc:date>
    <item>
      <title>collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657905#M291917</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;CAn we use append statement soon after using collect statement , bcoz i heard tht it reduced performance.Is it true??Plz clarify&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Ganesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 10:23:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657905#M291917</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T10:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657906#M291918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you write a 'COLLECT' statement it automatically APPENDS the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Hema&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 10:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657906#M291918</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T10:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657907#M291919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is nothing like that.&lt;/P&gt;&lt;P&gt;BUt you need to append that only if you want a separate internal table with subtptal/totals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Correct way1&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab into itab2.&lt;/P&gt;&lt;P&gt;append itab2.&lt;/P&gt;&lt;P&gt;clear itab2.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Correct way2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Wrong way.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;at end of field1.&lt;/P&gt;&lt;P&gt;collect itab.&lt;/P&gt;&lt;P&gt;append itab.&lt;/P&gt;&lt;P&gt;endat.&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;Regards,&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 10:29:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657907#M291919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T10:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657908#M291920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ganesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. When we use collect, we do not use append, for the same internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Collect is a special keyword,&lt;/P&gt;&lt;P&gt;   which instead of blindly appending the record,&lt;/P&gt;&lt;P&gt;   does some extra intelligent logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. When using collect,&lt;/P&gt;&lt;P&gt;   it will first COMPARE all the NON-NUMERIC fields,&lt;/P&gt;&lt;P&gt;   from the workarea with the full internal table,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   - If no matching is found, then only it will apppend the record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  -- if matching is found, then &lt;/P&gt;&lt;P&gt;    it will MODIFY the old record, &lt;/P&gt;&lt;P&gt;   and SUM UP / ADD the Numeric values.&lt;/P&gt;&lt;P&gt; &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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 10:31:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657908#M291920</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T10:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: collect</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657909#M291921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;COLLECT statement has the same effect as inserting the new line so u  not need  to write append again. If an entry with the same key already exists, the COLLECT statement does not append a new line, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should only use the COLLECT statement if you want to create summarized tables. If you use other statements to insert table entries, you may end up with duplicate entries.&lt;/P&gt;&lt;P&gt;GO THROUGH THIS LINK&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2006 10:35:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect/m-p/1657909#M291921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-31T10:35:08Z</dc:date>
    </item>
  </channel>
</rss>

