... ADJACENT DUPLICATES FROM itab
[COMPARING {comp1 comp2 ...}|{ALL FIELDS}]... .
... COMPARING {comp1 comp2 ...}|{ALL FIELDS}
With these additions, the statement DELETE deletes all lines in certain groups of lines, except for the first line of the group. These are groups of lines that follow one another and have the same content in certain components. If the addition COMPARING is not specified, the groups are determined by the content of the key fields.
Lines are considered to be doubled if the content of neighboring lines is the same in the components
examined. In the case of several double lines following one another, all the lines - except for the first - are deleted.
... COMPARING {comp1 comp2 ...}|{ALL FIELDS}
If the addition COMPARING is specified, the groups are
determined either by the content of the specified components comp1
comp2 ... or the content of all components ALL FIELDS.
The specification of individual components comp is made as described in the section
Specification of Components. Access to class attributes is possible through the object component selector only as of Release 6.10.
Deleting all multiple-occurring lines in the internal table connection_tab. The result of this exanple corresponds to the one in the example for the position specification for INSERT.
DATA: BEGIN OF connection,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
distid TYPE spfli-distid,
distance TYPE spfli-distance,
END OF connection.
DATA connection_tab LIKE SORTED TABLE OF connection
WITH NON-UNIQUE KEY cityfrom cityto
distid distance.
SELECT cityfrom cityto distid distance
FROM spfli
INTO TABLE connection_tab.
DELETE ADJACENT DUPLICATES FROM connection_tab.