I need to flag the duplicate fields in a table but sy-tabix
is always increasing. I expect for every knum
group, a 1 in sy-tabix
. Here is the code.
sort result_package stable by knumh zzklfn1.
loop at result_package assigning <result_fields>
group by ( knum = <result_fields>-knum ).
if sy-tabix > 1.
data(lv_duplicate) = 'x'.
endif.
lv_duplicate = ''.
endloop.
How to flag the duplicate record?
Tried to code but sy-tabix
is increasing.