‎2006 Dec 19 10:33 AM
hi all,
what is the advantage of using INITIAL SIZE while internal table declaration?
‎2006 Dec 19 10:36 AM
1)It means when the program is loaded in the memory the system initializes the space for the table in according the numbers of records indicated by OCCURS or INITAL SIZE.
2)So it's usually better to indicate 0 if it doesn't know an initial number of records of an internal table, infact the systema'll automatically widen the space if it needs more space than how much considerated initially.
‎2006 Dec 19 10:36 AM
1)It means when the program is loaded in the memory the system initializes the space for the table in according the numbers of records indicated by OCCURS or INITAL SIZE.
2)So it's usually better to indicate 0 if it doesn't know an initial number of records of an internal table, infact the systema'll automatically widen the space if it needs more space than how much considerated initially.
‎2006 Dec 19 10:37 AM
Hi
1. INSERT [wa INTO|INITIAL LINE INTO] itab [INDEX idx].
2. INSERT [wa INTO|INITIAL LINE INTO] TABLE itab.
3. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO itab2 [INDEX idx3].
4. INSERT LINES OF itab1 [FROM idx1] [TO idx2]
INTO TABLE itab2.
We can increase the performance of internal table.
Thanks,
Star shankar
‎2006 Dec 19 10:37 AM
it means howmuch space is reserved for the internal table in the memory..
u shud always use occurs 0 clause as it is more efficient and program keeps on increasing memory until the records to be fetched are finished..
so it is good practice to use occurs 0 always.
‎2006 Dec 19 10:38 AM
Hi,
When you user INITIAL SIZE <n>,you can specify the initial amount of main memory assigned to an internal table object when you define the data type using the INITIAL SIZE
This size does not belong to the data type of the internal table, and does not affect the type check. You can use the above addition to reserve memory space for <n> table lines when you declare the table object.
When this initial area is full, the system makes twice as much extra space available up to a limit of 8KB. Further memory areas of 12KB each are then allocated.
Before Release 3.0, internal tables all had header lines and a flat-structured line type. There were no independent table types. You could only create a table object using the OCCURS addition in the DATA statement, followed by a declaration of a flat structure:
DATA: BEGIN OF <itab> OCCURS <n>,
...
<fi> ...,
...
END OF <itab>.
The effect of the OCCURS addition is to construct a standard table with the data type <linetype>.
Rgds,
Prakash
‎2006 Dec 19 10:59 AM