Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

internal table

Former Member
0 Likes
472

hi all,

what is the advantage of using INITIAL SIZE while internal table declaration?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
448

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.

5 REPLIES 5
Read only

Former Member
0 Likes
449

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.

Read only

p291102
Active Contributor
0 Likes
448

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

Read only

Former Member
0 Likes
448

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.

Read only

Former Member
0 Likes
448

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

Read only

Former Member
0 Likes
448

thanks for ur answers. i have awarded all ur efforts