SAP DELETE LINE IDX ABEXA

Get Example source ABAP code based on a different SAP table
  


ARTIClE

Internal Tables - Deleting Rows Using the Index
This example demonstrates how rows can be deleted from internal tables using the index.

ABAP_SOURCE_CODE
ABAP_EXEC

ABAP_DESCRIPTION
A sorted table itab is filled with five rows. Then an attempt is made to delete the rows with the indices 2, 3, and 4 using a chained statement. However, after the deletion of each individual row, the index of each subsequent row is lowered by 1.This means, the second delete operation actually deletes the row which originally had the index 4. The third delete operation fails because the table is now made up of only 3 rows.
To actually delete the rows 2 to 4, the FROM TO addition of the DELETE statement is used.