<?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: Internal Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226452#M138013</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;If you have a ALV report then all the totals / subtotals by specific fields can be done by the user using the toolbar options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, you will have to use the AT NEW / ON CHANGE commands with in the Internal table LOOP and calculcate the totals manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Apr 2006 05:47:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-18T05:47:26Z</dc:date>
    <item>
      <title>Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226450#M138011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an internal table with 3 fields namely matnr,date &amp;amp; GR qty. Now from this internal table...i have to calculate the GR qty for each material based on dates and range of dates?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 05:36:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226450#M138011</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T05:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226451#M138012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can do this using the internal table control/events like AT NEW and SUM. Its not that difficult to build a logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Regards,&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 05:44:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226451#M138012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T05:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226452#M138013</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;If you have a ALV report then all the totals / subtotals by specific fields can be done by the user using the toolbar options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, you will have to use the AT NEW / ON CHANGE commands with in the Internal table LOOP and calculcate the totals manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : Please mark all the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 05:47:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226452#M138013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T05:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226453#M138014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;This you can do using control brake statments .&lt;/P&gt;&lt;P&gt;that is at new-endat, at first, at last etc&lt;/P&gt;&lt;P&gt;for every change in material you can sum up the quantites according to date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 05:48:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226453#M138014</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T05:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226454#M138015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with this logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SORT itab BY date matnr.&lt;/P&gt;&lt;P&gt;LOOP AT itab INTO wa_itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUM = SUM + wa_itab-gr_qty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  AT END OF date.&lt;/P&gt;&lt;P&gt;    wa_itab_1-date = wa_itab-date.&lt;/P&gt;&lt;P&gt;    wa_itab_1-matnr = wa_itab-matnr.&lt;/P&gt;&lt;P&gt;    wa_itab_1-gr_qty = SUM.&lt;/P&gt;&lt;P&gt;    APPEND wa_itab_1 TO new_itab.&lt;/P&gt;&lt;P&gt;    CLEAR wa_itab_1.&lt;/P&gt;&lt;P&gt;    CLEAR SUM.&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;Prakashsingh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prakashsingh Mehra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Prakashsingh Mehra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 05:54:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226454#M138015</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T05:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226455#M138016</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;or use an extra int. table(sumtab) to calculate sums:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at itab.
 move-corresponding itab to sumtab.
 collect sumtab. 
endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 06:10:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226455#M138016</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-04-18T06:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226456#M138017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Put control break AT END OF date inside the loop and inside it calculate the total by using SUM.&lt;/P&gt;&lt;P&gt;If ALV, just assign 'X' to subtotal/Total for the specified field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sangeeta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 06:46:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226456#M138017</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T06:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226457#M138018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chandra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can build a logic inside the loop of your internal table.&lt;/P&gt;&lt;P&gt;Sort the internal table&lt;/P&gt;&lt;P&gt;Loop the table&lt;/P&gt;&lt;P&gt;Keep on summing the qty ( untill your date condition is satisfied ). &lt;/P&gt;&lt;P&gt;Once u reach the last material either move the data to another internal table or write ( as per your req ).&lt;/P&gt;&lt;P&gt;For the same logic u can use AT END ,, ENDAT control processing inside the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get a look of a small piece of code doing somewhat similar workout.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BEGIN OF matqty OCCURS 0,&lt;/P&gt;&lt;P&gt;         matnr(5) TYPE c ,&lt;/P&gt;&lt;P&gt;         date LIKE sy-datum,&lt;/P&gt;&lt;P&gt;         qty TYPE i,&lt;/P&gt;&lt;P&gt;       END OF matqty.&lt;/P&gt;&lt;P&gt;DATA : sum TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  matqty-matnr = '10001'.&lt;/P&gt;&lt;P&gt;  matqty-date = '20060413'.&lt;/P&gt;&lt;P&gt;  matqty-qty = 10.&lt;/P&gt;&lt;P&gt;  APPEND matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  matqty-matnr = '10001'.&lt;/P&gt;&lt;P&gt;  matqty-date = '20060412'.&lt;/P&gt;&lt;P&gt;  matqty-qty = 20.&lt;/P&gt;&lt;P&gt;  APPEND matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  matqty-matnr = '10001'.&lt;/P&gt;&lt;P&gt;  matqty-date = '20060419'.&lt;/P&gt;&lt;P&gt;  matqty-qty = 30.&lt;/P&gt;&lt;P&gt;  APPEND matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  matqty-matnr = '10002'.&lt;/P&gt;&lt;P&gt;  matqty-date = '20060413'.&lt;/P&gt;&lt;P&gt;  matqty-qty = 10.&lt;/P&gt;&lt;P&gt;  APPEND matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  matqty-matnr = '10002'.&lt;/P&gt;&lt;P&gt;  matqty-date = '20060419'.&lt;/P&gt;&lt;P&gt;  matqty-qty = 10.&lt;/P&gt;&lt;P&gt;  APPEND matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SORT matqty BY matnr.&lt;/P&gt;&lt;P&gt;  LOOP AT matqty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    " Date Condition.&lt;/P&gt;&lt;P&gt;    IF matqty-date &amp;lt; sy-datum.&lt;/P&gt;&lt;P&gt;       sum  = sum + matqty-qty.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    AT END OF matnr.&lt;/P&gt;&lt;P&gt;        WRITE: / matqty-matnr , sum.&lt;/P&gt;&lt;P&gt;        ULINE.&lt;/P&gt;&lt;P&gt;        CLEAR SUM.&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;Give it a try and if helps please reward point and close thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any doubt , Please reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mayank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Apr 2006 07:01:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/1226457#M138018</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-18T07:01:31Z</dc:date>
    </item>
  </channel>
</rss>

