<?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 statement not adding and mergeing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574400#M2008856</link>
    <description>&lt;P&gt;Hi Preetham&lt;/P&gt;&lt;P&gt;Collect statement is like a Group by Clause in SQL.&lt;/P&gt;&lt;P&gt;So for each combination of&lt;/P&gt;&lt;P&gt;Plant +  BomID +  Material +  Maerial(idnrk)  + vornr + plnnr  ==  sum(menge).&lt;/P&gt;&lt;P&gt;So if you want on any specific one , then you need to handle other also not chaning.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 06:14:54 GMT</pubDate>
    <dc:creator>venkateswaran_k</dc:creator>
    <dc:date>2022-07-06T06:14:54Z</dc:date>
    <item>
      <title>collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574395#M2008851</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I have an Internal table with fields that I want to add and merge. For ex: &lt;/P&gt;
  &lt;P&gt;plant bomID matnr idnrk menge vornr plnnr&lt;/P&gt;
  &lt;P&gt;1100 1028-02 111222 11122205 100 31 5555-1&lt;/P&gt;
  &lt;P&gt;1100 1028-02 111222 11122205 200 33 5555-2&lt;/P&gt;
  &lt;P&gt;1100 1028-01 111222 11122203 200 34 5555-2&lt;/P&gt;
  &lt;P&gt;1100 1028-01 111222 11122203 200 33 5555-2&lt;/P&gt;
  &lt;P&gt;1100 1028-02 111222 11122201 100 33 5555-2&lt;/P&gt;
  &lt;P&gt;Now I want to add the MENGE field(it is type p) according to idnrk and result should be&lt;/P&gt;
  &lt;P&gt;plant bomID matnr idnrk menge vornr plnnr&lt;/P&gt;
  &lt;P&gt;1100 1028-02 111222 11122205 300 31 5555-1&lt;/P&gt;
  &lt;P&gt;1100 1028-02 111222 11122203 400 33 5555-2&lt;/P&gt;
  &lt;P&gt;1100 1028-01 111222 11122201 100 33 5555-2&lt;/P&gt;
  &lt;P&gt;I am using collect statement but it is not working. Kindly suggest&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 10:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574395#M2008851</guid>
      <dc:creator>pritam_baboo49</dc:creator>
      <dc:date>2022-07-04T10:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574396#M2008852</link>
      <description>&lt;P&gt;Why do you say it didn't work?&lt;/P&gt;&lt;P&gt;what is the result ? what is the code used ? &lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 10:41:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574396#M2008852</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-07-04T10:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574397#M2008853</link>
      <description>&lt;P&gt;COLLECT statement "adds and merges" very well in the conditions explained in the ABAP documentation.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 11:21:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574397#M2008853</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-07-04T11:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574398#M2008854</link>
      <description>&lt;P&gt;1. Collect statement could not collect the data according to a specific field( Ex: In you case menge could not be collected for IDNRK only) &lt;/P&gt;&lt;P&gt;2. In your structure collect statement collect the menge according to below highlighted fields.&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;plant bomID matnr idnrk &lt;/STRONG&gt;menge&lt;STRONG&gt; vornr plnnr&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt; Hence collect statement won't fulfill your requirement&lt;/P&gt;&lt;P&gt;3. Solution :Try to use the structure with less no.of fields if possible and use collect. Or use loop statement and add menge.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 12:21:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574398#M2008854</guid>
      <dc:creator>former_member640214</dc:creator>
      <dc:date>2022-07-04T12:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574399#M2008855</link>
      <description>&lt;P&gt;The Collect statement is just adding up but line items are not merging. As stated by Rama Chittimadi, Thanks for the inputs. I am using loop statement.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 06:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574399#M2008855</guid>
      <dc:creator>pritam_baboo49</dc:creator>
      <dc:date>2022-07-06T06:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: collect statement not adding and mergeing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574400#M2008856</link>
      <description>&lt;P&gt;Hi Preetham&lt;/P&gt;&lt;P&gt;Collect statement is like a Group by Clause in SQL.&lt;/P&gt;&lt;P&gt;So for each combination of&lt;/P&gt;&lt;P&gt;Plant +  BomID +  Material +  Maerial(idnrk)  + vornr + plnnr  ==  sum(menge).&lt;/P&gt;&lt;P&gt;So if you want on any specific one , then you need to handle other also not chaning.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 06:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/collect-statement-not-adding-and-mergeing/m-p/12574400#M2008856</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2022-07-06T06:14:54Z</dc:date>
    </item>
  </channel>
</rss>

