10-11-2007 5:47 AM
10-11-2007 5:49 AM
Hi sagar,
Delete adjacent duplicates from itab comparing primarykey.
<b>
Regards,
Azhar</b>
10-11-2007 5:48 AM
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.
10-11-2007 5:49 AM
Hi sagar,
Delete adjacent duplicates from itab comparing primarykey.
<b>
Regards,
Azhar</b>
10-11-2007 5:50 AM
hi use key word
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING <FIELD1>
regards
Nagesh.Paruchuri
10-11-2007 5:50 AM
Hi
from Internal Table?
SORT the Internal table by Key fields
the use
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING <FIELD1> <FIELD2>
DELETE
DELETE { {FROM target [WHERE sql_cond]}
| {target FROM source} }.
The statement DELETE deletes one or more rows from the database table specified in target. The rows that are to be deleted are specified either in a WHERE condition sql_cond or with data objects in source.
Regards
Anji
10-11-2007 5:50 AM
sort the itab...
thene write foll. code...
DELETE ADJACENT DUPLICATES FROM ITAB.
10-11-2007 5:51 AM
hi,
first sort your itab whith the unique key that you have in itab or all those fields according to which you want to delete records,
i.e sort itab by fld1 fld2.
delete adjacent duplicates comparing fld1 fld2.
10-11-2007 5:51 AM
First most important is to SORT the table by the key which u dont want as duplicate and then use DELETE ADJACENT DUPLICATES
Regards,
Reward if helpful