2007 Apr 26 7:02 PM
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
2007 Apr 26 7:04 PM
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
2007 Apr 26 7:04 PM
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
2007 Apr 26 7:04 PM
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
2007 Apr 26 7:37 PM
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
2007 Apr 26 7:54 PM
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
2007 Apr 26 8:05 PM
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
2007 Apr 27 4:16 AM
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.
2007 Apr 27 4:29 AM
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...
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |