<?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: reg: package size in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399361#M816179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juan José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Mar 2008 19:33:38 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-07T19:33:38Z</dc:date>
    <item>
      <title>reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399350#M816168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  I have seen "package size"  which used by some people to increase performance.  Can anybody explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 15:12:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399350#M816168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T15:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399351#M816169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't say that it increases performance. It's a way to read and process a large amount of data so that it avoids memory problems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 15:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399351#M816169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T15:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399352#M816170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bob,&lt;/P&gt;&lt;P&gt;  Thanks for ur quick response.&lt;/P&gt;&lt;P&gt;  But I could not understand i.e what is the way etc.,&lt;/P&gt;&lt;P&gt; Could  u plz give more explnation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 15:36:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399352#M816170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399353#M816171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use search, it was discussed recently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is used together with open cursor if youz want to very large amount of data, then you should use package size of about 10.000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise there is no general recipe to improve performance, always analyse your actual problems!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Siegfried&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 16:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399353#M816171</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399354#M816172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; This should answer ur question&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/package-size.htm" target="test_blank"&gt;http://www.sap-img.com/abap/package-size.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you cannot open link , chk this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*What's the purpose of using PACKAGE SIZE in select statement?*  
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. 

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.  

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;P&gt;Edited by: Chandrasekhar Jagarlamudi on Feb 25, 2008 9:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 16:21:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399354#M816172</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T16:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399355#M816173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paluri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea behind the addition PACKAGE SIZE is to split a large amount of records into smaller lots and processing those lots individually. Usually, it results in a better memory and time compsumption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be able to do this, you have to use the addition PACKAGE SIZE together with a cursor. I'll introduce a small modification to the code already provided by Chandrasekhar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT  z_test.
...
DATA:
  l_cursor  TYPE cursor.

START-OF-SELECTION.
  OPEN CURSOR l_cursor FOR
    SELECT vbeln erdat
    FROM vbak.

  DO.
    FETCH NEXT CURSOR l_cursor
          INTO TABLE li_vbak
          PACKAGE SIZE 50.

    IF sy-subrc &amp;lt;&amp;gt; 0.
      CLOSE CURSOR l_cursor. "There're no more records to be processed
      EXIT.
    ENDIF.

    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.
  ENDDO.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juan José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 21:19:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399355#M816173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T21:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399356#M816174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan - why do you use the cursor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2008 22:01:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399356#M816174</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-25T22:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399357#M816175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose your database is having 100000.&lt;/P&gt;&lt;P&gt;While you are extracting the data from table after some time it will go for dump , because session time exceeded.In this situation&lt;/P&gt;&lt;P&gt;Go for PACKAZE SIZE.&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&lt;/P&gt;&lt;P&gt;&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 10000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;     Your functionality&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;Each time it will take 10000 records and perform your functionality and go for next 10000 records.Here internal table will over write every time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2008 07:06:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399357#M816175</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-26T07:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399358#M816176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai ,&lt;/P&gt;&lt;P&gt;Go Through The Following Code For 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;The output is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example reads packets of three lines each into the sorted table ITAB. In each pass of the SELECT loop, the internal table has a different sorted content. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were to use APPENDING instead of INTO, the list would look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In each loop pass, a new packet is sorted into the internal table&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2008 12:28:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399358#M816176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-03T12:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399359#M816177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob, I gave the cursor example because it was mentioned before. Just to give a code example of how to use PACKAGE SIZE + CURSOR, but it's not mandatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Juan José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 20:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399359#M816177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T20:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399360#M816178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - but you don't have to use the cursor when using package size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Mar 2008 20:46:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399360#M816178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-06T20:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399361#M816179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Juan José&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2008 19:33:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399361#M816179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-07T19:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: reg: package size</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399362#M816180</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;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;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Mar 2008 19:10:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-package-size/m-p/3399362#M816180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-09T19:10:15Z</dc:date>
    </item>
  </channel>
</rss>

