06-25-2008 12:03 PM
hi Expert,
Why we use package size.
how it improves the performance.
Amit
06-25-2008 12:09 PM
06-25-2008 12:09 PM
06-25-2008 12:15 PM
Package size is an addition in the select statement..
Syntax:-
SELECT ... INTO|APPENDING [CORRESPONDING FIELDS OF] TABLE <itab> [PACKAGE SIZE <n>] ...
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 <n> lines that are written one after the other into the internal table. If you use INTO, each packet replaces the preceding one.
Note:- n <= 0 causes a runtime error.
Example:
DATA: itab TYPE STANDARD TABLE OF SCARR WITH NON-UNIQUE
DEFAULT KEY INITIAL SIZE 10.
FIELD-SYMBOLS: <FS> TYPE scarr.
SELECT * INTO TABLE itab PACKAGE SIZE 20 FROM scarr.
LOOP AT itab ASSIGNING <FS>.
WRITE: / <FS>-carrid, <FS>-carrname.
ENDLOOP.
ENDSELECT.
*Hope it clarifies your doubt
Regards,
Bhumika
Edited by: Bhumika Mahawar on Jun 25, 2008 1:15 PM
06-25-2008 12:19 PM
Hi,
Packet Size is used to fetch the large quantity of data from the database table.
Here we specify some size(number), so that at one retrieve it will such number of records and puts in the internal table, like that i will fetch the large data with out going for dump.