2006 Dec 04 10:03 AM
what is the diffrence between occurs 0 and occurs 100.
What we can use in real time. Heard that we should always use occurs 0. Is that right-if yes than why...............
Confused.......
need solution....
thanks & regards....
2006 Dec 04 10:05 AM
Occurs 0 / 100 / 5000
This mean that you reserve the corresponding allocated memory for your internal table.
But in fact, if you choose '0', the memory is allocated dynamically, so put 0 !
Hope this helps,
Erwan
2006 Dec 04 10:10 AM
Hi Abhay,
occurs specifies the memory..and memories are specified in blocks
if you specify occurs 0 a memory block of 100 records is created and then if you enter the 101st record another block of double the memory of previous one is created.. this is useful when you know how many record you are going to append to the internal table.
and if you dont know the number of records you specify it as occurs 0.... that means internal table automatically gets adjusted to the number of records you are appending ..
please reward if helpful
Regards,
_pankaj singh
2006 Dec 04 10:10 AM
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 <b>occurs N</b>, so you won't get any memero related problems
Regards
Sudheer
2006 Dec 04 10:10 AM
hi,
if you are not sure on the no of internal table entries, better use occurs 0.
2006 Dec 04 10:11 AM
Occurs 100 means ur internal table gets reserved to store 100 records whereas Occurs 0 doesnot imply this way...It automaticaaly allocates record no. and it can store as many as possible and dynamically the record store no. is generated when used with Occurs 0.
2006 Dec 04 10:13 AM
2006 Dec 04 10:20 AM
Hi
The space to store an internal table in the memory is calculate automatically at runtime, when a new record is appended the system expands the memory to be used.
If it indicates how many records a table could have,when the program is uploaded in the memory, the system reserves the space necesserary to allocate 100 records.
So in this way it can improve the performance because the system doesn't allocate the memory automatically.
But if it make sure the table'll have 100 records, otherwise it'll be used memory for nothing. So if it can't know how many records can be uploaded in an internal table, it's better not to indicate it in the declaration.
Max
2006 Dec 06 2:09 PM
'0' assigns 8kb of memory eack time.
where as 'occurs 100' allocates the memory for 100 records each time.
This is not a fixed memory. It increases dynamicallu. But every time it assigns the same memory.
Thanx.
2006 Dec 06 2:14 PM