<?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: looping the internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096036#M1182754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;try this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_tab INTO wa_tab.
"Copy to anothr wrk area as we r using at on date remaining fields will be initial
  wa_tab1 = wa_tab. 
  ADD wa_tab-snt TO w_sum. "store it to a variable
  AT END OF  date.
    wa_tab1-snt = w_sum.
    APPEND wa_tab1 TO it_tab1.
    CLEAR w_sum. "clear at end of each date
  ENDAT.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jan 2009 04:56:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-28T04:56:00Z</dc:date>
    <item>
      <title>looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096030#M1182748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guru's,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the internal table  itab. in that the fields are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date                     snt              sabah    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01.01.2009           1000            0000&lt;/P&gt;&lt;P&gt;02.01.2009            2000           0000&lt;/P&gt;&lt;P&gt;02.01.2009            3000           0000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here i need to calculate the data sccording to the date wise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which means &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;01.01.2009             1000          0000&lt;/P&gt;&lt;P&gt;02.01.2009             5000          0000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any one help me how to do the loop here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Best Regards,&lt;/P&gt;&lt;P&gt;Praveen.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:23:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096030#M1182748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096031#M1182749</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;You need to first sort the internal table based on the date. Later use 'collect' statement and see if its working. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at ITAB.&lt;/P&gt;&lt;P&gt;collect ITAB.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this  way its not working, use ON CHANGE OF and calculate as u needed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any more details.&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;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:27:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096031#M1182749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096032#M1182750</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;try this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

sort &amp;lt;internal table&amp;gt; by &amp;lt;field name&amp;gt; asccending/descending

loop at &amp;lt;internal table&amp;gt;



endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ritesh J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096032#M1182750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096033#M1182751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Control statements AT END OF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort iatb by Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT Itab INTO WA. &lt;/P&gt;&lt;P&gt;  AT END OF DATE. &lt;/P&gt;&lt;P&gt;    SUM. &lt;/P&gt;&lt;P&gt;    ..........&lt;/P&gt;&lt;P&gt;  ENDAT. &lt;/P&gt;&lt;P&gt;&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;Hope this helps...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:34:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096033#M1182751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096034#M1182752</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;Go through this abap help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb36d5358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Deepthi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:37:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096034#M1182752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096035#M1182753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Praveen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test the following code and in the final internal table where you find date = '99991231' this row is the sum of the date and at the end you will also find date = '99991231' it the Grand total, i have tested is is working fine, hope will solve out your problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TYPES: BEGIN OF t_name,
  date LIKE sy-datum,
  amount1 TYPE p,
  amount2 TYPE p,
  END OF t_name.

DATA: it1_sum TYPE STANDARD TABLE OF t_name WITH HEADER LINE,
      wa_it1_sum TYPE t_name,
      it2_sum TYPE STANDARD TABLE OF t_name WITH HEADER LINE,
      wa_it2_sum TYPE t_name.


wa_it1_sum-date = '20080103'.
wa_it1_sum-amount1 = 500.
wa_it1_sum-amount2 = 200.
APPEND wa_it1_sum  TO it1_sum.
wa_it1_sum-date = '20080101'.
wa_it1_sum-amount1 = 100.
wa_it1_sum-amount2 = 200.
APPEND wa_it1_sum  TO it1_sum.
wa_it1_sum-date = '20080102'.
wa_it1_sum-amount1 = 500.
wa_it1_sum-amount2 = 10000.
APPEND wa_it1_sum  TO it1_sum.
wa_it1_sum-date = '20080102'.
wa_it1_sum-amount1 = 105000.
wa_it1_sum-amount2 = 20500.
APPEND wa_it1_sum  TO it1_sum.
wa_it1_sum-date = '20080103'.
wa_it1_sum-amount1 = 21000.
wa_it1_sum-amount2 = 22000.
APPEND wa_it1_sum  TO it1_sum.

SORT it1_sum BY date.
LOOP AT it1_sum INTO wa_it1_sum.

  APPEND wa_it1_sum TO it2_sum.
  AT END OF date.
    SUM.
    wa_it1_sum-date = '99991231'.
    APPEND wa_it1_sum TO it2_sum.
  ENDAT.

  AT LAST.
    SUM.
    wa_it1_sum-date = '99991231'.
    APPEND wa_it1_sum TO it2_sum.
  ENDAT.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if any problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:53:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096035#M1182753</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-01-28T04:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096036#M1182754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praveen,&lt;/P&gt;&lt;P&gt;try this code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;LOOP AT it_tab INTO wa_tab.
"Copy to anothr wrk area as we r using at on date remaining fields will be initial
  wa_tab1 = wa_tab. 
  ADD wa_tab-snt TO w_sum. "store it to a variable
  AT END OF  date.
    wa_tab1-snt = w_sum.
    APPEND wa_tab1 TO it_tab1.
    CLEAR w_sum. "clear at end of each date
  ENDAT.
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Manoj Kumar P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 04:56:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096036#M1182754</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T04:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096037#M1182755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Pls try following Code . If any queries please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Declearation of strcture having one date and two currency fields&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF ts_amt,&lt;/P&gt;&lt;P&gt;        sdate TYPE augdt,&lt;/P&gt;&lt;P&gt;        amt1  TYPE dmbtr,&lt;/P&gt;&lt;P&gt;        amt2  TYPE wrbtr,&lt;/P&gt;&lt;P&gt;       END OF ts_amt.&lt;/P&gt;&lt;P&gt;*Delceration of internal tables and work areas.&lt;/P&gt;&lt;P&gt;DATA: it_amt TYPE TABLE OF ts_amt,&lt;/P&gt;&lt;P&gt;      it_sumamt TYPE TABLE OF ts_amt,&lt;/P&gt;&lt;P&gt;      is_sumamt TYPE  ts_amt,&lt;/P&gt;&lt;P&gt;      is_amt TYPE ts_amt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of selection of date&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Selection of data from table..i have taken only 100 u can take as ur required&lt;/P&gt;&lt;P&gt;  SELECT augdt  dmbtr wrbtr&lt;/P&gt;&lt;P&gt;  FROM bseg&lt;/P&gt;&lt;P&gt;  INTO TABLE it_amt&lt;/P&gt;&lt;P&gt;  UP TO 100 ROWS.&lt;/P&gt;&lt;P&gt;  SORT it_amt BY sdate.&lt;/P&gt;&lt;P&gt;*loop with Collect statement&lt;/P&gt;&lt;P&gt;  LOOP AT it_amt INTO is_amt.&lt;/P&gt;&lt;P&gt;    is_sumamt-sdate = is_amt-sdate.&lt;/P&gt;&lt;P&gt;    is_sumamt-amt1  = is_amt-amt1.&lt;/P&gt;&lt;P&gt;    is_sumamt-amt2  = is_amt-amt2.&lt;/P&gt;&lt;P&gt;    COLLECT is_sumamt INTO it_sumamt.&lt;/P&gt;&lt;P&gt;    CLEAR:  is_amt, is_sumamt.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;*End of selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Syed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 05:38:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096037#M1182755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T05:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096038#M1182756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello praveen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it into wa.&lt;/P&gt;&lt;P&gt;at end of date.&lt;/P&gt;&lt;P&gt;SUM.&lt;/P&gt;&lt;P&gt;end at.&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;Have a Nice Day,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujeet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 05:52:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096038#M1182756</guid>
      <dc:creator>SujeetMishra</dc:creator>
      <dc:date>2009-01-28T05:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096039#M1182757</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;check this code. Just execute this code and see huv it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Data declaration&lt;/STRONG&gt;*******&lt;/P&gt;&lt;P&gt;data : begin of it occurs 0,&lt;/P&gt;&lt;P&gt;       dats(10),&lt;/P&gt;&lt;P&gt;       value type i,&lt;/P&gt;&lt;P&gt;       end of it.&lt;/P&gt;&lt;P&gt;data it1 like it occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**&lt;STRONG&gt;Moving the values&lt;/STRONG&gt;***&lt;/P&gt;&lt;P&gt;it-dats  = '01.01.2009'.&lt;/P&gt;&lt;P&gt;it-value =  1000.&lt;/P&gt;&lt;P&gt;append it.&lt;/P&gt;&lt;P&gt;clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it-dats  = '02.01.2009'.&lt;/P&gt;&lt;P&gt;it-value =  2000.&lt;/P&gt;&lt;P&gt;append it.&lt;/P&gt;&lt;P&gt;clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it-dats  = '02.01.2009'.&lt;/P&gt;&lt;P&gt;it-value =  3000.&lt;/P&gt;&lt;P&gt;append it.&lt;/P&gt;&lt;P&gt;clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it-dats  = '01.01.2009'.&lt;/P&gt;&lt;P&gt;it-value =  4000.&lt;/P&gt;&lt;P&gt;append it.&lt;/P&gt;&lt;P&gt;clear it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it by dats.&lt;/P&gt;&lt;P&gt;****&lt;STRONG&gt;Main process&lt;/STRONG&gt;*******&lt;/P&gt;&lt;P&gt;loop at it.&lt;/P&gt;&lt;P&gt;    it1-value = it1-value + it-value.&lt;/P&gt;&lt;P&gt;   At end of dats.&lt;/P&gt;&lt;P&gt;    it1-dats = it-dats.&lt;/P&gt;&lt;P&gt;    append it1.&lt;/P&gt;&lt;P&gt;    clear it1.&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; loop at it1.&lt;/P&gt;&lt;P&gt;   write : it1-dats , it1-value.&lt;/P&gt;&lt;P&gt;   endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it will solve your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds.&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 06:01:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096039#M1182757</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T06:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096040#M1182758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello guru,&lt;/P&gt;&lt;P&gt;method 1.&lt;/P&gt;&lt;P&gt;you can make use of AT statement &lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;method 2.&lt;/P&gt;&lt;P&gt;move the first row of internal table to a local work area. when you are looping check if sy-tabix equals1, then do the processing as required and move the processed data to new work area, but if it is not equal to 1 then check whether current date is equal to the previous date from the local work area, then modify new work area otherwise and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Dheeraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 06:38:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096040#M1182758</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T06:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: looping the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096041#M1182759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sort it_tab by Date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT it_tab. &lt;/P&gt;&lt;P&gt;AT END OF Date. &lt;/P&gt;&lt;P&gt;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;Joan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 09:35:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/looping-the-internal-table/m-p/5096041#M1182759</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T09:35:28Z</dc:date>
    </item>
  </channel>
</rss>

