<?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: Processing Internal Table - AT END or ATLAST in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198130#M1520775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;first you need to sort your table by WBS and then apply loop, Use AT END OF event for wbs and calculate the sum of WBS.&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;data: sum type i value = 0.&lt;/P&gt;&lt;P&gt;sort table by EBS.&lt;/P&gt;&lt;P&gt;loop at table.&lt;/P&gt;&lt;P&gt;at end of wbs.&lt;/P&gt;&lt;P&gt;sum = sum + wbs.&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;try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;lalit Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Aug 2010 09:35:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-10T09:35:10Z</dc:date>
    <item>
      <title>Processing Internal Table - AT END or ATLAST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198129#M1520774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;S.No                WBS               matnr                                       menge                                    menge1&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;1	00000507	0010000503	00010	1000.000		0.000&lt;/P&gt;&lt;P&gt;2	00000507	0010000504	00010	900.000		0.000&lt;/P&gt;&lt;P&gt;3	00000507	0010000511	00030	3000.000		0.000&lt;/P&gt;&lt;P&gt;4	00000507	0010000511	00060	2000.000		0.000&lt;/P&gt;&lt;P&gt;5	00000531	0010000511	00010	1000.000		0.000&lt;/P&gt;&lt;P&gt;6	00000531	0010000511	00040	1000.000		0.000&lt;/P&gt;&lt;P&gt;7	00000532	0010000511	00020	2000.000		0.000&lt;/P&gt;&lt;P&gt;8	00000532	0010000511	00050	1000.000		0.000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above is an internal table.&lt;/P&gt;&lt;P&gt;how to code that the output should be in such a manner that all identical WBS quantity should be added and displayed correspondingly in the same internal table itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S.No                WBS               matnr                                       menge                                    menge1&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;1	00000507	0010000503	00010	1000.000		0.000&lt;/P&gt;&lt;P&gt;2	00000507	0010000504	00010	900.000		0.000&lt;/P&gt;&lt;P&gt;3	00000507	0010000511	00030	3000.000		0.000&lt;/P&gt;&lt;P&gt;4	00000507	0010000511	00060	2000.000		6900.00&lt;/P&gt;&lt;P&gt;5	00000531	0010000511	00010	1000.000		0.000&lt;/P&gt;&lt;P&gt;6	00000531	0010000511	00040	1000.000		2000.00&lt;/P&gt;&lt;P&gt;7	00000532	0010000511	00020	2000.000		0.000&lt;/P&gt;&lt;P&gt;8	00000532	0010000511	00050	1000.000		3000.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should be the output.&lt;/P&gt;&lt;P&gt;Help with the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for yout time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 09:20:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198129#M1520774</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T09:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Processing Internal Table - AT END or ATLAST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198130#M1520775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;first you need to sort your table by WBS and then apply loop, Use AT END OF event for wbs and calculate the sum of WBS.&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;data: sum type i value = 0.&lt;/P&gt;&lt;P&gt;sort table by EBS.&lt;/P&gt;&lt;P&gt;loop at table.&lt;/P&gt;&lt;P&gt;at end of wbs.&lt;/P&gt;&lt;P&gt;sum = sum + wbs.&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;try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;lalit Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 09:35:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198130#M1520775</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T09:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Processing Internal Table - AT END or ATLAST</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198131#M1520776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please follow the below step .&lt;/P&gt;&lt;P&gt; - Make sure WBS is the first field in your internal table. &lt;/P&gt;&lt;P&gt; - It must be sorted.&lt;/P&gt;&lt;P&gt;- Calculate the sum for each loop&lt;/P&gt;&lt;P&gt;-  Use AT END Control break and update the table with calculated sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the below program created based on your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at it_tab INTO lw_tab.&lt;/P&gt;&lt;P&gt;lv_sum = lv_sum + lw_tab-menge1.&lt;/P&gt;&lt;P&gt;  at END OF wbs.&lt;/P&gt;&lt;P&gt;    READ TABLE it_tab ASSIGNING &amp;lt;fs_tab&amp;gt; INDEX sy-tabix.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      &amp;lt;fs_tab&amp;gt;-total = lv_sum.&lt;/P&gt;&lt;P&gt;      clear lv_sum.&lt;/P&gt;&lt;P&gt;    endif.&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;This above code snippet work fine as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deban&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 10:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/processing-internal-table-at-end-or-atlast/m-p/7198131#M1520776</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-10T10:04:37Z</dc:date>
    </item>
  </channel>
</rss>

