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

About OCCURS clause

Former Member
0 Likes
1,430

what happens if i use OCCURS 0 and OCCURS100.

Please help in this.

With regards,

satya

1 ACCEPTED SOLUTION
Read only

former_member196299
Active Contributor
0 Likes
1,322

hi Narayan ,

There is not much difference between occurs 0 and occurs 100 except the performance and unnecessary memory storage .

occurs 0 : the system will allocate memory according to the exact needed memory for the itab .memory increases according to the need .

occurs 100 : equivalent to 100 rows of memory will be allocated for the itab at the begining , which is nothing but blocking the memory area unnecessarily during runtime , which leads to performance issues in a way .

Hope this makes you understand .

Regards,

Ranjita

6 REPLIES 6
Read only

Former Member
0 Likes
1,322

Hi Narayana,

If we use occurs 0 means how much space is required that is alloted.

suppose if we use occurs 100 means though that table has no records it will allot

100*minimum space. It will waste the memory if no records are found.

example min = 10 bytes.

occurs 1 = 10 bytes.

occurs 2 = 20 bytes.

Regards,

Younus

Reward Helpful Answers!!!!

Read only

Former Member
0 Likes
1,322

occurs 0 : this means internal table is created with out any reservation of memory to the internal table , after you entered some data to the internal table then it increases .

occurs 100 : this means at the time of vitalization of the internal table it reserves space for the 100 lines .

Read only

Former Member
0 Likes
1,322

Internal table has two memory

one roll area and page area

Roll area nothing but occurs 100

page area nothing but occurs 0

occurs 100 means it will get 100 records from data base to application server and from there it will come Presentation server.

occurs 0 means it will get all records from data base to application server and from there it will come Presentation server.

Reward points if it is useful

Thanks

Seshu

Read only

former_member196299
Active Contributor
0 Likes
1,323

hi Narayan ,

There is not much difference between occurs 0 and occurs 100 except the performance and unnecessary memory storage .

occurs 0 : the system will allocate memory according to the exact needed memory for the itab .memory increases according to the need .

occurs 100 : equivalent to 100 rows of memory will be allocated for the itab at the begining , which is nothing but blocking the memory area unnecessarily during runtime , which leads to performance issues in a way .

Hope this makes you understand .

Regards,

Ranjita

Read only

Former Member
0 Likes
1,322

hi,

by using this, you can store the records in the Internal table,

If you give Occues 0 then we are giving ful space(8kb) to Internal table,

if you give occurs 5, then you are assiging less space,

this is very usefull for large amount of data,

if the total no of records in the internal table execced the 8kb,

then the system automatically assign 8kb space again,

so if you are dealing with small amount of data in the internal table,

then make use of this occurs N, so you won't get any memero related problems

Regards

Reshma

Read only

0 Likes
1,322

Hi Resmha,

u mean if data in internal table exceed then again it allocates 8kb of memory at time

regards,

satya