Skip to Content
0
Former Member
Jul 23, 2010 at 01:37 PM

delete adjecant duplicates/sort on dynamic internal table

418 Views

Hi,

I've a dynamic internal table which I need to delete the adjecant duplicates of certain fields (thus not all fields!)

Specifying:

delete adjacent duplicates from <ftab> comparing fielda fieldb.

doesn't activate since the fields aren't known yet

Doing things like:

data: dajdupl type string.
  dajdupl = 'fielda fieldb'. 
  delete adjacent duplicates from <ftab> comparing (dajdupl).

gives a dump with ITAB_ILLEGAL_COMPONENT

The same occurs btw if I do a sort on these fields. I could bypass this by sorting within my select statement, but I would like to know how to do this with a sort.

Eddy