<?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 package size in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671035#M616671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i want to use package size for select query to extract 3 crore records from a table,&lt;/P&gt;&lt;P&gt;wat package i should give, how many records we can fetch by package size1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is taking too much time for processing and finall roll backing wat can i do to avoid this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Aug 2007 04:51:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-11T04:51:23Z</dc:date>
    <item>
      <title>package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671035#M616671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i want to use package size for select query to extract 3 crore records from a table,&lt;/P&gt;&lt;P&gt;wat package i should give, how many records we can fetch by package size1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is taking too much time for processing and finall roll backing wat can i do to avoid this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2007 04:51:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671035#M616671</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-11T04:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671036#M616672</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 the PACKAGE SIZE addition is not used, all lines of the result set are inserted in the internal table itab and the ENDSELECT statement must not be specified after SELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you specify the PACKAGE SIZE addition, all lines of the result set for SELECT are processed in a loop, which must be closed with ENDSELECT. The lines are inserted in the internal table itab in packages of n lines. n must be a type i data object that contains the number of lines. If the value of n is smaller than 0, an exception that cannot be handled occurs. If n is equal to 0, all lines of the result set are inserted in the internal table itab. If used in the FETCH statement, n lines are extracted from the current cursor position. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rewards point if it useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2007 05:14:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671036#M616672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-11T05:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671037#M616673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PACKAGE SIZE on SELECT statements is most useful when considering large data volumes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Memory size example&lt;/P&gt;&lt;P&gt;PACKAGE SIZE is useful when you want to limit the size of internal tables returned from a SELECT statement. SAP will return the number of records specified in PACKAGE SIZE. Consider the following example which with PACKAGE SIZE uses less memory on the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Straightforward Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT psphi .......
  INTO TABLE it_prps
  FROM prps
  WHERE psphi IN s_psphi.

IF sy-subrc EQ 0.
  LOOP AT it_prps.
     ....
  ENDLOOP.
ELSE.
  .... no records found ....
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Select with PACKAGE SIZE&lt;/P&gt;	&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT psphi .....
  INTO TABLE it_prps PACKAGE SIZE 1000
  FROM prps
  WHERE psphi IN s_psphi.

  LOOP AT it_prps.
    .&amp;#133;
  ENDLOOP.

ENDSELECT.

IF sy-subrc NE 0.
  .&amp;#133; no records found &amp;#133;.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first example, all records are moved to table it_prps that adhere to the selection criteria. This is a good method if all the records are required, say, for sorting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the second example, only up to 1000 records are moved into it_prps at a time. Note the ENDSELECT is now required for the SELECT. The internal table which contains up to 1000 records must be processed within the SELECT/ENDSELECT loop, before the next 1000 is presented into it_prps. This method saves memory on the application server, but because not all the records are presented to it_prps at one time, is not useful for a full sort &amp;#150; you can use the APPENDING TABLE option in these instances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2007 05:41:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/package-size/m-p/2671037#M616673</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-11T05:41:04Z</dc:date>
    </item>
  </channel>
</rss>

