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 occurs

Former Member
0 Likes
825

hi

wht is the diff b/w occurs <b>'n'</b> in the declaration of Internal table.....

i know that occurs 0 will give 8kb of size, then wht is occurs 1, 2 .....

is it goes with multiples of 8 i mean 1 implies 16kb or 64 kb

plz clear,

thanks in advance

ganesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
804

HI Ganesh

Welcome to SDN!!!!!

Yes Its multiplies the n with 8.

But, the declaration of internal table with Occurs is going to Obselete.

Use Type and Work Area to work with Internal Table.

Regards

SAB

hi

wht is the diff b/w occurs <b>'n'</b> in the declaration of Internal table.....

i know that occurs 0 will give 8kb of size, then wht is occurs 1, 2 .....

is it goes with multiples of 8 i mean 1 implies 16kb or 64 kb

plz clear,

thanks in advance

ganesh

7 REPLIES 7
Read only

Former Member
0 Likes
805

HI Ganesh

Welcome to SDN!!!!!

Yes Its multiplies the n with 8.

But, the declaration of internal table with Occurs is going to Obselete.

Use Type and Work Area to work with Internal Table.

Regards

SAB

Read only

Former Member
0 Likes
804

it let you know about the records. It does not mean 1 implies 16kb.

so

occurs 0 will create a page of 8kb where as Occurs 100 allows maximum 100 entries..

Regards,

Amey

Message was edited by:

Amey Potale

Read only

0 Likes
804

Hi Amey,

it doesn't mean that 100 means 100 entries, it is purely about the memory allocation to the internal table..

its sure, but I don't know how the memory going to allocate,

if any body knows plz help...

thanks

ganesh

Read only

0 Likes
804

Amey is correct! <b>n</b> does stand for the number of lines in the itab.. when you declare the itab as occurs <b>0</b>, the system allocates memory in multiples of 8kb as and when the the itab needs it ie depending on the number of entries in the itab.

But this method of declaring itab is no longer recommended & also obsolete in ABAP Objects.

~Suresh

Read only

0 Likes
804

the following <a href="http://help.sap.com/saphelp_46c/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/frameset.htm">SAP Help</a> explains in detail about the internla memory allocation for the occurs parameter.

~Suresh

Read only

Former Member
0 Likes
804

hi,

Occurs means it holds the records of the internal table n by default its size is 8kb.if we take it as occurs 1 then it occupies the space required for one record by doubling the size. if field string size is 30 n boby size is 8 kb n if we have given occurs 1 then the body size becomes 30.if we give occurs 2 then it doubles ...then the fieldstring n body size will be 60 kb.......hope u understood this.

if it has solved ur problem then dont forget to reward with points.

with regards,

madhuri.

Read only

Former Member
0 Likes
804

Hi

Occurs clause is going to obsolete so in future you can avoid it.Any way i will explain you the meaning of occurs clause.It is totally wrong that occurs 1 will create 16 KB and occurs 2 will create 24 Kb.The concept is first it will see the row-size of your internal table.Then according to that it will reserve memory according to the number you are giving in occurs clause.For Eg. if you are writing occurs 5 it will allocate memory for upcoming 5 rows.Like that this statement will work.

Reward All the Helpfull answers...