<?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: Reg: Collect statement in internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104228#M104296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Nov 2005 10:37:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-11-29T10:37:25Z</dc:date>
    <item>
      <title>Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104223#M104291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   Can any one tell me wether we can use the collect statement in an internal table which has no header line&lt;/P&gt;&lt;P&gt;if it can be used can anyone please send me a sample snippet&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;Guhapriyan Subrahmanyam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:22:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104223#M104291</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-29T10:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104224#M104292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;	COLLECT is used to create unique or compressed datasets. The key fields are the default key fields of the internal table itab. &lt;/P&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types), the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;******************&lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;*****************&lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;If it helps you award points and close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:26:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104224#M104292</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-29T10:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104225#M104293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeap, there is no problem.&lt;/P&gt;&lt;P&gt;But you need a structure, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: w_1 type ty_1 ,&lt;/P&gt;&lt;P&gt;      it_1 type table of ty_1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;collect w_1 into it_1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alexandre Nogueira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:26:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104225#M104293</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-29T10:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104226#M104294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guhapriyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used the collect statement in the way as shown..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN of I_ALLOCATIONS OCCURS 0,&lt;/P&gt;&lt;P&gt;        PSPNR LIKE PRPS-PSPNR,&lt;/P&gt;&lt;P&gt;        PSPID LIKE PROJ-PSPID,&lt;/P&gt;&lt;P&gt;        PSPHI LIKE PRPS-PSPHI,&lt;/P&gt;&lt;P&gt;        POST1 LIKE PROJ-POST1,&lt;/P&gt;&lt;P&gt;        ZZLOB LIKE PROJ-ZZLOB,&lt;/P&gt;&lt;P&gt;        WERKS LIKE PROJ-WERKS,&lt;/P&gt;&lt;P&gt;        SOBID LIKE HRP1001-SOBID,&lt;/P&gt;&lt;P&gt;        OBJID LIKE HRP1001-OBJID,&lt;/P&gt;&lt;P&gt;        BEGDA LIKE HRP1001-BEGDA,&lt;/P&gt;&lt;P&gt;        ENDDA LIKE HRP1001-ENDDA,&lt;/P&gt;&lt;P&gt;        PROZT LIKE HRP1001-PROZT,&lt;/P&gt;&lt;P&gt;        LOB   LIKE HRP1000-STEXT,&lt;/P&gt;&lt;P&gt;        TEMP  TYPE P decimals 2,&lt;/P&gt;&lt;P&gt;        TYPE(3),&lt;/P&gt;&lt;P&gt;        ZROLE LIKE PA0001-ZROLE,&lt;/P&gt;&lt;P&gt;        HOLID TYPE P decimals 2,&lt;/P&gt;&lt;P&gt;        LEAVE TYPE P decimals 2,&lt;/P&gt;&lt;P&gt;        DAYS  TYPE P decimals 2,&lt;/P&gt;&lt;P&gt;       END of I_ALLOCATIONS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:  I_ALLOCATION LIKE I_ALLOCATIONS OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************Populate I_ALLOCATIONS **************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_ALLOCATIONS.&lt;/P&gt;&lt;P&gt;    COLLECT I_ALLOCATIONS INTO I_ALLOCATION.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i had requirement like u, but this one is rather simple...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the required data in an I_Table which dont require Header line..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Later on collect this particular I_Table in other I_Table1 with the Header Line...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104226#M104294</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-29T10:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104227#M104295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes u can add line into itab which has no header line.&lt;/P&gt;&lt;P&gt;Check the below link.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb36a1358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Abdul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:33:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104227#M104295</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2005-11-29T10:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reg: Collect statement in internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104228#M104296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you use only COLLECT to fill an internal table, COLLECT makes sure that the internal table does not contain two entries with the same default key fields. &lt;/P&gt;&lt;P&gt;If, besides its default key fields, the internal table contains number fields (see also ABAP/4 number types ), the contents of these number fields are added together if the internal table already contains an entry with the same key fields. &lt;/P&gt;&lt;P&gt;If the default key of an internal table processed with COLLECT is blank, all the values are added up in the first table line. &lt;/P&gt;&lt;P&gt;If you specify wa INTO , the entry to be processed is taken from the explicitly specified work area wa . If not, it comes from the header line of the internal table itab . &lt;/P&gt;&lt;P&gt;After COLLECT , the system field SY-TABIX contains the index of the - existing or new - table entry with default key fields which match those of the entry to be processed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2005 10:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-collect-statement-in-internal-table/m-p/1104228#M104296</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-11-29T10:37:25Z</dc:date>
    </item>
  </channel>
</rss>

