SAP ABAP SYNTAX FOR DELETE FROM INTERNAL TABLE

Variants

1. DELETE itab.
2. DELETE itab INDEX idx.
3. DELETE itab FROM idx1 TO idx2.
4. DELETE itab WHERE condition.
5. DELETE ADJACENT DUPLICATES FROM itab.

Effect

Deletes one or more lines from an internal table.

Note

The deletion of lines within a LOOP ... ENDLOOP loop is performed in a sequence of loop passes.

Variant 1

DELETE itab.

Effect

The current entry of the internal table itab is
deleted in a loop.
Return code value
The is set to 0.

Note

After deleting the current entry in an internal table in a LOOP loop, the effect of further update operations on the current entry without an INDEX specification is not guaranteed and may changed in later Releases.

Variant 2

DELETE itab INDEX idx.

Effect

Deletes the idx entry from the internal table itab .

The return code value is set as follows:


SY-SUBRC = 0 The entry was deleted.
SY_SUBRC = 4 The entry does not exist.

Variant 3

DELETE itab FROM idx1 TO idx2.

Effect

Deletes the line area from index idx1 to idx2 from internal table itab . At least one of the two parameters FROM idx1 or TO idx2 should be specified. If parameter FROM is missing, the area from the start of the table to line idx2 is deleted. If parameter TO is missing, the area from line idx1 to the end of the table is deleted. Start index idx1 must be greater than 0.

The return code value is set as follows:


SY-SUBRC = 0 At least one entry was deleted.
SY_SUBRC = 4 None of the entries were deleted.

RELATED POST

SAP ABAP SYNTAX FOR DELETE PART THREE

MySAP technology RFC,BAPI,ALE and IDOC overview
MySAP new generation technologies overview
SAP cost,definition,authorization and architecture

No comments :

Post a Comment