Archived discussions are read-only. Learn more about SAP Q&A

DELETE ADJACENT DUPLICATES FROM itab comparing f1 f2 f3

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.

Tags:
Not what you were looking for? View more on this topic or Ask a question