<?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: splitting the internal table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305092#M1391715</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 to use....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*get 490 materials from the itab&lt;/P&gt;&lt;P&gt;    LOOP AT itab.&lt;/P&gt;&lt;P&gt;      APPEND itab TO gt_itab.&lt;/P&gt;&lt;P&gt;      DELETE itab.&lt;/P&gt;&lt;P&gt;      count = count + 1.&lt;/P&gt;&lt;P&gt;      IF count = 490.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;thnx&lt;/P&gt;&lt;P&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Nov 2009 06:37:14 GMT</pubDate>
    <dc:creator>RahulKeshav</dc:creator>
    <dc:date>2009-11-04T06:37:14Z</dc:date>
    <item>
      <title>splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305089#M1391712</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;can anybody tell the how to implement the logic to split the data from internal table based on number of records into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is done because the first internal table containing huge amount of data and i don't want to loop into that internal table. so split the records into small amount of records into another table and use that small internal table for loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for ex:  i have selected all the records from mast table into internal table i_mast. it has around 2 lakh records. the volume of data can increase in quality system. so i have to write a code in such a way that it will split the total records by 20,000 into one more internal table i_tab and process all the logic for first 20,000 record from itab. then again take 20, 000 record from i_mast into itab and process again for 20,000 records like that..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code should not be restricted for volume of data in i_mast. it can be any number of records in qulaity/production system. so i can not put the logic for specific number of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide the logic to implement it.&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>Wed, 04 Nov 2009 06:21:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305089#M1391712</guid>
      <dc:creator>former_member779991</dc:creator>
      <dc:date>2009-11-04T06:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305090#M1391713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use package size in you select query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer:&lt;/P&gt;&lt;P&gt;link:[http://help.sap.com/abapdocu_70/en/ABAPINTO_CLAUSE.htm]&lt;/P&gt;&lt;P&gt;link:[http://www.sap-img.com/abap/package-size.htm]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 06:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305090#M1391713</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-04T06:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305091#M1391714</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;Get the number of records in internal table by using DESCRIBE TABLE...LINES lin statement and divide the number of lines lin by a conatant like 100 or 1000 depending on expected volume of data. Calculate the index everytime by adding the value got from above division and Fill the internal tables from the main internal tables using index.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Srilatha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 06:34:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305091#M1391714</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T06:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305092#M1391715</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 to use....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*get 490 materials from the itab&lt;/P&gt;&lt;P&gt;    LOOP AT itab.&lt;/P&gt;&lt;P&gt;      APPEND itab TO gt_itab.&lt;/P&gt;&lt;P&gt;      DELETE itab.&lt;/P&gt;&lt;P&gt;      count = count + 1.&lt;/P&gt;&lt;P&gt;      IF count = 490.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;thnx&lt;/P&gt;&lt;P&gt;RK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 06:37:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305092#M1391715</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-04T06:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305093#M1391716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you code with description how to use splitting logic??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u have written the code, which have total records in first internal table is 490 and its putting the whole records from first internal table into second internal table. i don't see any splitting concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please elaborate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305093#M1391716</guid>
      <dc:creator>former_member779991</dc:creator>
      <dc:date>2009-11-04T07:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305094#M1391717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Srilatha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please elaborate with code so that it will be easy to understand, what u mean to say.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:22:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305094#M1391717</guid>
      <dc:creator>former_member779991</dc:creator>
      <dc:date>2009-11-04T07:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305095#M1391718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of fetching  2 lakh records into internal table and then manipulating the records.&lt;/P&gt;&lt;P&gt;You can fetch using package size from table itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305095#M1391718</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-04T07:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305096#M1391719</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;can you provide me the code how it will go again and again to fectch pack size and put it into another internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its getting tough for me to understand fully without code. It would be really helpful if you could have provided the code logic entirely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:39:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305096#M1391719</guid>
      <dc:creator>former_member779991</dc:creator>
      <dc:date>2009-11-04T07:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305097#M1391720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you refer the link i provided ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below code fetches 1000 records from mara in each hit.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data:it_mara type table of mara.
data:it_marc type table of marc.

select * from mara into table it_mara package size 1000.

if it_mara[] is not initial.

select * from marc into table it_marc for all entries in it_mara
where matnr = it_mara-matnr.
if it_marc[] is not initial.
"Here do the required manipulation.
endif.
endif.

clear it_mara[].

endselect.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:41:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305097#M1391720</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-11-04T07:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305098#M1391721</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;sorry Reena B  i forgot the DO.....ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*get 490 materials from the itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;    LOOP AT itab.&lt;/P&gt;&lt;P&gt;      APPEND itab TO gt_itab.&lt;/P&gt;&lt;P&gt;      DELETE itab.&lt;/P&gt;&lt;P&gt;      count = count + 1.&lt;/P&gt;&lt;P&gt;      IF count = 490.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;      ENDIF.&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;do what ever you want to do with the gt_itab.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;e.g. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if itab has 1000 records, it will get first 490 records from itab into gt_itab and delete the records from itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then process the gt_itab(which will containg only 490 records)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after you have to return to this block again and that time it itab will be having only 1000-490 = 510 records only..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will get next 490 records into gt_iteb again and process it as per your requirement..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rahul Keshav on Nov 4, 2009 1:14 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 07:43:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305098#M1391721</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2009-11-04T07:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305099#M1391722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no point in splitting the data into another internal table then processing the data. This will give no gain performance wise, infact it will further reduce the performance of the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you should do is use PACKAGE SIZE addition of the select query and then process the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at demo program: demo_select_into_package in your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 08:02:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305099#M1391722</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T08:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305100#M1391723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recommend this in the other posting, and I thought it is obvious, it is for testing!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT itab INTO wa.
  count = count + 1.
  if ( count &amp;gt; limit ).
    exit.
  endif.
  APPEND wa TO gt_itab.
ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please use workarea and no implicit header lines which are outdated, because they are confusing!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 09:00:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305100#M1391723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T09:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305101#M1391724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello  Everybody,&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;  this is done because the first internal table containing huge amount of data and i don't want to loop into that internal table. so split the records into small amount of records into another table and use that small internal table for loop.&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The poster has clearly stated she doesn't want to loop at the huge internal table. However, everyone seems to be giving a solution to loop at the bigger table and split it into small table until a certain records are reached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 11:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305101#M1391724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T11:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305102#M1391725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are right and with an EXIT condition it is also no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, there is even an ABAP command which can do it directly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND LINES OF itab1 FROM 1 TO 1001 TO itab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 12:41:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305102#M1391725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T12:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305103#M1391726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Reena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of selecting all the data into an internal table and then processing it use the clause PACKAGE SIZE. The following example processes data from table MAST, 20,000 records per iteration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT &amp;lt;field 1&amp;gt;
       &amp;lt;field 2&amp;gt;
       .
       .
       .
       &amp;lt;field n&amp;gt;
  FROM mast
  INTO TABLE t_mast
  PACKAGE SIZE 20000
  WHERE &amp;lt;selection criteria&amp;gt;.
  
* the internal table i_mast will always have &amp;lt;= 20,000 records
  LOOP AT i_mast INTO w_mast.
  
*   process the data in the internal table 
  
  ENDLOOP.
  
ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2009 16:01:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305103#M1391726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-11-04T16:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305104#M1391727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you already have records in your internal table what is the harm in looping at the internal table even if it contains large amount of data. It just that you are playing with the internal table and not with the database table.&lt;/P&gt;&lt;P&gt;Please let me know the exact requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Mohan Gupta.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Dec 2009 10:07:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305104#M1391727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-30T10:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305105#M1391728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two ways you can handle this scenario.&lt;/P&gt;&lt;P&gt;1. First one as mentioned by others use package size in your select query and do all the processing on fetched records within select and endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Other way is to fetch all the records into one internal table and process the records in batches by inserting them into another &lt;/P&gt;&lt;P&gt;internal table itab_temp.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;index2 = 1
do.
index1 = index2.
index2 = index1 + 20000.
APPEND LINES OF ITAB FROM index1 TO index2 TO itab_temp.
IF itab_temp[] is initail.
exit.
endif.
* Process all the records of itab_temp.
refresh itab_temp.
enddo.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope above helps. From the performance perspective second method wd be little faster unless untill you have too many columns in ITAB which may consume ABAP memory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jan 2010 08:16:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305105#M1391728</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-01-01T08:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305106#M1391729</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Also, you forgot to check gt_itab if it has a value after the endloop.&lt;/P&gt;&lt;P&gt;And clear counter after DO.&lt;/P&gt;&lt;P&gt;The last version should be:&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;CLEAR: count.&lt;/P&gt;&lt;P&gt;LOOP AT itab.&lt;/P&gt;&lt;P&gt;APPEND itab TO gt_itab.&lt;/P&gt;&lt;P&gt;DELETE itab.&lt;/P&gt;&lt;P&gt;count = count + 1.&lt;/P&gt;&lt;P&gt;IF count = 490.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;IF gt_itab is initial.&lt;/P&gt;&lt;P&gt;exit. " exit from the DO..ENDDO loop.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;do what ever you want to do with the gt_itab.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2023 12:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305106#M1391729</guid>
      <dc:creator>fanian</dc:creator>
      <dc:date>2023-06-29T12:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: splitting the internal table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305107#M1391730</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;CONSTANTS lc_packagesize TYPE i VALUE 499.&amp;lt;br&amp;gt;
DATA: ls_matnr TYPE mara-matnr,&amp;lt;br&amp;gt;
      lt_matnr           LIKE TABLE OF ls_matnr,&amp;lt;br&amp;gt;
      lt_matnr_package   LIKE TABLE OF ls_matnr,&amp;lt;br&amp;gt;
      lt_matnr_final     LIKE TABLE OF ls_matnr,&amp;lt;br&amp;gt;
      lv_no_lines        TYPE i,&amp;lt;br&amp;gt;
      index1             TYPE i VALUE 1,&amp;lt;br&amp;gt;
      index2             TYPE i VALUE 0.&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
SELECT matnr&amp;lt;br&amp;gt;
       FROM mara&amp;lt;br&amp;gt;
       INTO TABLE lt_matnr&amp;lt;br&amp;gt;
       WHERE mtart = 'ROH'.&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
lv_no_lines = lines( lt_matnr ).&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
WRITE / lv_no_lines.&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
DO.&amp;lt;br&amp;gt;
  index2 = index1 + lc_packagesize.&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
  APPEND LINES OF lt_matnr FROM index1 TO index2 TO lt_matnr_package.&amp;lt;br&amp;gt;
  IF lt_matnr_package[] IS INITIAL.&amp;lt;br&amp;gt;
    EXIT.&amp;lt;br&amp;gt;
  ENDIF.&amp;lt;br&amp;gt;
  lv_no_lines = lines( lt_matnr_package ).&amp;lt;br&amp;gt;
write: / ' index 1= ',index1,' index 2= ',index2.&amp;lt;br&amp;gt;
*  WRITE / lv_no_lines.&amp;lt;br&amp;gt;
  APPEND LINES OF lt_matnr_package TO lt_matnr_final.&amp;lt;br&amp;gt;
  index1 = index2 + 1.&amp;lt;br&amp;gt;
  REFRESH lt_matnr_package.&amp;lt;br&amp;gt;
&amp;lt;br&amp;gt;
ENDDO.&amp;lt;br&amp;gt;
lv_no_lines = lines( lt_matnr_final ).&amp;lt;br&amp;gt;
WRITE / lv_no_lines.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Dec 2023 11:34:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/splitting-the-internal-table/m-p/6305107#M1391730</guid>
      <dc:creator>AmitUpadhye</dc:creator>
      <dc:date>2023-12-22T11:34:12Z</dc:date>
    </item>
  </channel>
</rss>

