11-19-2007 11:32 AM
hi friends,
can anyone tell me clearly what is the difference between deleting some records from an internal table and refreshing few records in an internal table.what does both the statements do exactly.
11-19-2007 11:35 AM
Hi!
REFRESH is working for deleting complete internal tables. The other ways of this statement is obsolete. While DELETE can delete simple lines, multiple lines, etc...
Some performance tips:
Performance:
The runtime required to delete an internal table depends on theamount of memory previously occupied by that table.
Resetting a small internal table takes around 15msn (standard microseconds). Resetting a200 KB table takes around 400 msn, and a 1 MB table, around 3000 msn.
If the internal table has an index or a hash table (because it wasedited using INSERT, DELETE, SORT or COLLECT), the runtime increases slightly, since the index or hash table hasto be released as well as the table itself.
Regards
Tamá
11-19-2007 11:37 AM
refreshing few records in an internal table clears records from table doesnt free memory cannot give any condition
refresh itab.
deleting some records from an internal table deletes internal table records thru condition
delete itab where ..........
regards
11-19-2007 11:39 AM
Hi,
CLEAR itab. " Deletes itab header
DELETE itab. "Deletes single record when you are in loop.
DELETE itab FROM <index>. "Deletes records from particular index
REFRESH itab. " Deletes contents of itab.
REFRESH itab[]. "Deletes itab contents and header aswell..
Message was edited by:
Perez C
11-19-2007 11:41 AM
Hi,
Using Refresh u can delete all records from internal table but structure of table still alive you can use same internal table further in same program but if u use delete itab statment then records of table as well as existence of that table will be deleted u can not use deleted itab again in same program.
Rewards Point if helpful.
Regards
Gagan
11-19-2007 11:41 AM
hi,
REFRESH <itab>. it empties internal table.
DELETE <itab>. Deletes current line in LOOP - ENDLOOP
DELETE <itab> INDEX <idx>. it deletes line with the index <idx>.
DELETE <itab> [FROM <n1>] [TO <n2>] [WHERE <condition>]. it deletes selected entries.
11-19-2007 11:42 AM
Hi
The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.
This statement sets an internal table itab to its initial value, meaning that it deletes all rows of the internal table. The memory space required for the table is freed up to the initial memory size INITIAL SIZE. For itab, you must specify an internal table.
To delete all rows and free the entire memory space occupied by rows, you can use the statement FREE.
Reward pionts if useful
Regards
Sreenivas
11-19-2007 11:42 AM
HI
REFRESH <itab>.
statement. This always applies to the body of the table. As with the CLEAR statement, the
memory used by the table before you initialized it remains allocated. To release the memory
space, use the statement
DELETE <itab>
THis will delete the values from the internal table based on the WHERE condition
<b>Reward if usefull</b>