Skip to Content
0
Former Member
Apr 17, 2008 at 04:11 PM

DELETE ADJACENT DUPLICATES FROM itab comparing f1 f2 f3

5004 Views

Hi,

I have an ABAP internal table with four fields f1 f2 f3 f4 that i am deleting adjacent duplicates from. However for each line that i delete i wish to know how many lines were deleted (i.e. how many f4's there were). Anyone know how i could code this?

for example i initially have :

f1 f2 f3 f4

data gad fsd vsds

data gad fsd gdfgf

faff gfg gdg fsgs

after that i have

f1 f2 f3 f4 count

data gad fsd vsds 2

faff gfg gdg fsgs 1

Basically i want to delete the extra rows but know how many were deleted via some sort of count applied to the itab before the DELETE ADJACENT DUPLICATES FROM itab comparing f1 f2 f3 statement. Any help would be much appreciacted.