<?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: Package size in select stat.. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358646#M521477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; if you know that you want to selec 500 records then its easy if you use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPTO 500 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jun 2007 05:24:48 GMT</pubDate>
    <dc:creator>seshatalpasai_madala</dc:creator>
    <dc:date>2007-06-13T05:24:48Z</dc:date>
    <item>
      <title>Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358645#M521476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I am selecting data from MARA . &lt;/P&gt;&lt;P&gt;Here iam using select package size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to select 500 records at a time .&lt;/P&gt;&lt;P&gt;say MARA is having 2000 records for my condtion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;logicaly i want to understand how it works .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any any explain it will truely help me ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tnks guys with expecting,&lt;/P&gt;&lt;P&gt;Ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:22:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358645#M521476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358646#M521477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; if you know that you want to selec 500 records then its easy if you use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPTO 500 ROWS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:24:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358646#M521477</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-13T05:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358647#M521478</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;No ..In blck of  500.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358647#M521478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358648#M521479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Package size can be used if you for example only want to finish processing a limited amount of data at a time due to lack of memory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example below  read 50 records at a time from VBAK into an internal table, and selects the corresponding entries from vbap into an internal table. Then the two internal tables can be processed, and the next 50 records from VBAk can be read. Remember to reinitialize tha tables before the next read.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  z_test. 

TYPES: 
  BEGIN OF t_vbak, 
    vbeln LIKE vbak-vbeln, 
    erdat LIKE vbak-erdat, 
  END OF t_vbak, 

  BEGIN OF t_vbap, 
    posnr  LIKE vbap-posnr, 
    matnr  LIKE vbap-matnr, 
    meins  LIKE vbap-meins, 
  END OF t_vbap, 

  BEGIN OF t_report, 
    vbeln LIKE vbak-vbeln, 
    erdat LIKE vbak-erdat, 
    posnr  LIKE vbap-posnr, 
    matnr  LIKE vbap-matnr, 
    meins  LIKE vbap-meins, 
  END OF t_report. 

DATA: 
  li_vbak   TYPE t_vbak OCCURS 0, 
  l_vbak    TYPE  t_vbak, 
  li_vbap   TYPE t_vbap OCCURS 0, 
  l_vbap    TYPE t_vbap, 
  li_report TYPE t_report OCCURS 0, 
  l_report  TYPE t_report. 

START-OF-SELECTION. 
  SELECT vbeln erdat 
    FROM vbak 
    INTO TABLE li_vbak PACKAGE SIZE 50. 
    SELECT posnr matnr meins 
      FROM vbap 
      INTO TABLE li_vbap 
      FOR ALL ENTRIES IN li_vbak 
      WHERE vbeln = li_vbak-vbeln. 
    IF sy-subrc = 0. 
*   Now you have the two internal tables li_vbak and li_vbap filled 
*   with data. 
*   Do something with the data - remember to reinitialize internal 
*   tables 
    ENDIF. 
  ENDSELECT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:28:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358648#M521479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358649#M521480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sample code &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT MATNR
.INCLUDE
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
LVORM
MTART
MBRSH
MATKL
BISMT
MEINS
BSTME
  UP TO 500 ROWS
  FROM mara
  INTO TABLE it_mara
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:29:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358649#M521480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358650#M521481</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you read several lines of a database table, you can place them in an internal table. To do this, use the following in the INTO clause:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ... INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE &amp;lt;itab&amp;gt;&lt;/P&gt;&lt;P&gt;                          [PACKAGE SIZE &amp;lt;n&amp;gt;] ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same applies to the line type of &amp;lt;itab&amp;gt;, the way in which the data for a line of the database table are assigned to a table line, and the CORRESPONDING FIELDS addition as for flat work areas (see above).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The internal table is filled with all of the lines of the selection. When you use INTO, all existing lines in the table are deleted. When you use APPENDING; the new lines are added to the existing internal table &amp;lt;itab&amp;gt;. With APPENDING, the system adds the lines to the internal table appropriately for the table type. Fields in the internal table not affected by the selection are filled with initial values. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use the PACKAGE SIZE addition, the lines of the selection are not written into the internal table at once, but in packets. You can define packets of &amp;lt;n&amp;gt; lines that are written one after the other into the internal table. If you use INTO, each packet replaces the preceding one. If you use APPENDING, the packets are inserted one after the other. This is only possible in a loop that ends with ENDSELECT. Outside the SELECT loop, the contents of the internal table are undetermined. You must process the selected lines within the loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading packets into an internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: WA   TYPE SPFLI,&lt;/P&gt;&lt;P&gt;      ITAB TYPE SORTED TABLE OF SPFLI&lt;/P&gt;&lt;P&gt;                WITH UNIQUE KEY CARRID CONNID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT CARRID CONNID&lt;/P&gt;&lt;P&gt;FROM   SPFLI&lt;/P&gt;&lt;P&gt;INTO   CORRESPONDING FIELDS OF TABLE ITAB&lt;/P&gt;&lt;P&gt;       PACKAGE SIZE 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT ITAB INTO WA.&lt;/P&gt;&lt;P&gt;    WRITE: / WA-CARRID, WA-CONNID.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SKIP 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;veeresh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358650#M521481</guid>
      <dc:creator>former_member673464</dc:creator>
      <dc:date>2007-06-13T05:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358651#M521482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this for package size&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT vbeln erdat 
    FROM vbak 
    INTO TABLE li_vbak PACKAGE SIZE 500. 
 
    SELECT posnr matnr meins 
      FROM vbap 
      INTO TABLE li_vbap 
      FOR ALL ENTRIES IN li_vbak 
      WHERE vbeln = li_vbak-vbeln.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:32:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358651#M521482</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-13T05:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358652#M521483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; In this case if you use package size, the insertion in to your target INTERNAL TABLE will happen when you read 500 lines. So at a time 500 lines will be iserted into your target internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO when you say&lt;/P&gt;&lt;P&gt;SELECT * FROM &amp;lt;TABLE&amp;gt; INTO TABLE ITAB PACKAGE SIZE 500.&lt;/P&gt;&lt;P&gt;once the query fetched 500 rows it will insert it into the ITAB so in package of 500 it will insert into ITAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:33:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358652#M521483</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-06-13T05:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Package size in select stat..</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358653#M521484</link>
      <description>&lt;P&gt;have a look at the wiki under ABAP general....it describes it quite well:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/abap&lt;/A&gt;&lt;EM&gt;Development&lt;/EM&gt;and+Programming&amp;amp;&lt;/P&gt;&lt;P&gt;or this one:&lt;/P&gt;&lt;P&gt;[Removed by the moderator.]&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2007 05:36:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size-in-select-stat/m-p/2358653#M521484</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2007-06-13T05:36:49Z</dc:date>
    </item>
  </channel>
</rss>

