08-15-2007 10:13 AM
Hi,
DATA ITAB LIKE LINE OCCURS 10
What does the 'OCCURS 10' means?
Whether it means that this ITAB should only have 10 records inside???
What's the difference between 'OCCUR 0' and 'OCCURS 10'
Thanks.
08-15-2007 10:16 AM
allways use occurs 0, it is for optimizing performance and 10 is the initial memory assignment for the expected number of rows
it is a bit obsolete now for using specific amount with the modern systems
Message was edited by:
A. de Smidt
08-15-2007 10:15 AM
hI
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.
please reward points for helpful ans's
kiran.M
08-15-2007 10:16 AM
allways use occurs 0, it is for optimizing performance and 10 is the initial memory assignment for the expected number of rows
it is a bit obsolete now for using specific amount with the modern systems
Message was edited by:
A. de Smidt
08-15-2007 10:16 AM
hI
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 .
08-15-2007 10:18 AM
Hi Laa,
OCCURS 10 will allocate initial size of internal table as 10 records. If any more records are added then the size of internal table is again increased to another 10 lines to accomdate.
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.
Thanks,
Vinay
08-15-2007 10:20 AM
Hi
occurs 0 means a internal table will be allocated 8kb of
memory initially.if it needs more then again 8 kb of is
allocated to it,
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.
Thanks
Naveen khan
11-30-2011 7:37 AM
08-15-2007 10:24 AM
Hi,
If you are sure that internal table will hold not more than 10 records at any particular point of time, then give it as OCCURS 10...this will increase the performance, but this does not mean that it will hold only 10 records , it can hold any no of records,
OCCURS 0 --- If you are not sure of the no of records , then give it as OCCURS 0 , depending on the no of records internal table size will be increased
08-15-2007 10:59 AM
12-19-2012 9:49 PM
Occur doesn't limit the no of rows added to internal table. Occur clause is just to determine how much memory to allocate.
For Ex:Occur 10 . It doesn't mean like the internal table will hold only 10 records, It can have more the 10 records. The internal table is limited only by amount of memory avaliable in application server.
Don't use occur 0 if you except to store less than 8kb in internal table.
Happy Reading
Moderator Message - Please do not reply to old, dormant threads and push them in the update stream.
Message was edited by: Suhas Saha