There are many ways for deleting lines from an internal table.
1.Deleting lines in a loop.
This is the simplest way for deleting lines.
Sytax
1
|
DELETE <ITABLE>. |
This statement works only within a loop. It deletes the current line. You can delete the lines in a loop conditionally by adding the WHERE clause.
2.Deleting lines using the index.
This is used to delete a line from internal table at any know index.
Syntax
1
|
DELETE <ITABLE> INDEX <IDX>. |
The line with the index <IDX> is deleted. The index of the following line is decremented by 1.