‎2007 Aug 22 11:04 AM
Hi folks,
How to find out the initial amount of memory allocated to the internal table?
Thanks in advance,
Cheers,
Sriram.
‎2007 Aug 22 11:06 AM
hi
while declaring the internal table the number u specify in occurs stmt gives the memory allocation
begin of itab occurs 1,
end of itab.
in this case memory for one record is stored and can b increased dynamically with population of records.
if its 0 then a default of 8kb memory is allocated initially..and can b further increased...
‎2007 Aug 22 11:07 AM
Hi,
in debugging, select in menu:
Goto - status display - memory use.
There you can see current memory consumption.
reward if it helps..
Regards,
Omkar.
‎2007 Aug 22 11:07 AM
Hi,
chk this <<http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm>>
it says 8kb.
Thanks..
Preetham S
‎2007 Aug 22 11:07 AM
Hi,
Use
DATA: memory type i.
DESCRIBE TABLE itab OCCURS memory.
write: memory.
Here "memory" will have the initial size of the internal table.
Regards,
Sesh
‎2007 Aug 22 11:08 AM
Hi Sriram
check the occurs parameter for internal table 0 or 10.
reward points to all helpful answers
kiran.M
‎2007 Aug 22 11:16 AM
hi sriram
Actually internal table by default occupies 8kb of memory...if u give occurs 1 then it occupies 8+1kb and so on...
for eg...
data : begin of itab occurs 0,//takes 8kb of mem
matnr like mara-matnr,
end of itab.
you cant see the memory allocation since it is allocated dynamically duraing runtime....
REWARD IF USEFUL....
‎2007 Aug 22 11:19 AM
At the time of declaring the internal table, you say either occurs 0 or number like that. ...occurs 10 or occurs 100.....
The number here is the lenght of the internal table at the time beginning or first memory allocation time. However specifying long numbers unless required is not advisable, because this consumes memory in vain in most cases.
Reward if helpful.
Thanks.
‎2007 Aug 22 1:43 PM
hi sriram,
1.just put a break point on your AT SELECTION SCREEN "select" querry and go to debugging mode...
2.in that SETTINGS----> MEMORY DISPLAY ON/OFF(there tick MEMORY MONITORING and press SAVE)...
3.click TABLE in the debugging mode...type your internal table name and start normal debugging...
you can literally view the memory occupied by your internal table....
‎2007 Aug 22 1:46 PM
here the memory allocation status for any internal table is shown only when the debugger debugs atleast a select querry.
‎2007 Aug 22 1:50 PM
there is an easy formula for calculating memory
occurs * size of the line of the internal tale
this value is in bytes
u can get the size of the internal table by describe statement in sy-tfill.
if ur occurs is 0 then the size is 8kb
reward points to all useful ans