SAP Tutorials Blog

 

Deleting lines:

DELETE <itab>.

Deletes current line in LOOP - ENDLOOP (that is line which have index SY-TABIX). After the first line has been deleted, the current line and its assignment to the contents of SY-TABIX can be undefined. To process further lines within this loop, use only statements with the INDEX option.

DELETE <itab> INDEX <idx>.

Deletes line with the index <idx>. Return codes: SY-SUBRC = 4 - no line with <idx> exists; SY-SUBRC = 0 - success.

DELETE ADJACENT DUPLICATES FROM <itab> [COMPARING {<f1> ... <f1>|ALL FIELDS}].

Deletes adjacent duplicates entries. Return codes: SY-SUBRC = 0 - at least one entry was deleted; SY-SUBRC = 4 - otherwise. Without the COMPARING option, the contents of the standard key fields must be the same.

DELETE <itab> [FROM <n1>] [TO <n2>] [WHERE <condition>].

Deletes selected entries. At least one of three criteria should be used. First operand in WHERE should be a component of the internal table's line structure. Return codes: SY-SUBRC = 0 - at least one entry was deleted; SY-SUBRC = 4 - otherwise.


Serkan AKKAVAK

Computer Engineer BSc

SAP Department Manager

Contact : serkurumsal@yandex.com