<?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: ABAP DOC count in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791142#M1122176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume first field of internal table is Material, follow this algo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort the internal table by material.
loop on internal table.

  at new material.
   clear count.
  endat.

  count = count + 1.

 at end of material.
  write work_area-material , count.
 endat

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Dec 2008 16:26:54 GMT</pubDate>
    <dc:creator>Pawan_Kesari</dc:creator>
    <dc:date>2008-12-04T16:26:54Z</dc:date>
    <item>
      <title>ABAP DOC count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791141#M1122175</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 a internal table of the following format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material  |  doc#&lt;/P&gt;&lt;P&gt;1000  |  1001&lt;/P&gt;&lt;P&gt;1000  |  1002         &lt;/P&gt;&lt;P&gt;1000  |  1003&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2000  | 2001&lt;/P&gt;&lt;P&gt;2000  | 2002&lt;/P&gt;&lt;P&gt;2000  | 2003&lt;/P&gt;&lt;P&gt;2000  | 2004&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to a extend the progam to get total material doc count from that &lt;STRONG&gt;internal table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material  |  Count&lt;/P&gt;&lt;P&gt;1000 | 3&lt;/P&gt;&lt;P&gt;2000 | 4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to accomplish this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:22:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791141#M1122175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DOC count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791142#M1122176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume first field of internal table is Material, follow this algo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
sort the internal table by material.
loop on internal table.

  at new material.
   clear count.
  endat.

  count = count + 1.

 at end of material.
  write work_area-material , count.
 endat

endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791142#M1122176</guid>
      <dc:creator>Pawan_Kesari</dc:creator>
      <dc:date>2008-12-04T16:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DOC count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791143#M1122177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to loop the internal table and then use AT NEW statement.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: count type I value 0.&lt;/P&gt;&lt;P&gt;data: begin of new_itab occurs 0,&lt;/P&gt;&lt;P&gt;material like matrn,&lt;/P&gt;&lt;P&gt;count  type I,&lt;/P&gt;&lt;P&gt;end of new_itab.&lt;/P&gt;&lt;P&gt;loop at itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at new itab-material&lt;/P&gt;&lt;P&gt;clear count.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at end of itab-material.&lt;/P&gt;&lt;P&gt;new_itab-material = itab-material.&lt;/P&gt;&lt;P&gt;new_itab-count = count.&lt;/P&gt;&lt;P&gt;append new_itab.&lt;/P&gt;&lt;P&gt;endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:30:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791143#M1122177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T16:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DOC count</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791144#M1122178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks guys .. worked like charm&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Dec 2008 16:35:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-doc-count/m-p/4791144#M1122178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-12-04T16:35:43Z</dc:date>
    </item>
  </channel>
</rss>

