Application Development 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: 

internal table

Former Member
0 Kudos
136

could u plz tell if i write occurs 0 /how much size it wil take?

4 REPLIES 4

Former Member
0 Kudos
117

if u write occurs 0 then it takes 8KB memory...

reward points if useful....

Former Member
0 Kudos
117

Hi Srinath,

It takes 64 bytes.

Plzz Reward if Useful,

Mahi.

Former Member
0 Kudos
117

HI ,

by default occurs 0 means 8 kb will allocate .

if u want more memory means u can give as occurs n,

so here u can increase memory dynamically as per u r requirement .

But among all of them occurs 0 is better as for performance wise

THX

Former Member
0 Kudos
117

Hi,

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>.

This statement declared an internal table <itab> with the line type defined following the OCCURS addition. Furthermore, all internal tables had header lines.

The number <n> in the OCCURS addition had the same meaning as in the INITIAL SIZE addition from Release 4.0. Entering ‘0’ had the same effect as omitting the INITIAL SIZE addition. In this case, the initial size of the table is determined by the system.

The above statement is still possible in Release 4.0, and has roughly the same function as the following statements:

TYPES: BEGIN OF <itab>,

...

<fi> ...,

...

END OF <itab>.

DATA <itab> TYPE STANDARD TABLE OF <itab>

WITH NON-UNIQUE DEFAULT KEY

INITIAL SIZE <n>

WITH HEADER LINE.

In the original statement, no independent data type <itab> is created. Instead, the line type only exists as an attribute of the data object <itab>.

The effect of the OCCURS addition is to construct a standard table with the data type <linetype>. The line type can be any data type. The number <n> in the OCCURS addition has the same meaning as before Release 3.0. Before Release 4.0, the key of an internal table was always the default key, that is, all non-numeric fields that were not themselves internal tables.

Regards,

Bhaskar