hi sebin,
Check this code , hope this will help u .
types: begin of ty_tmp,
fld1 type i,
fld2 type c,
end of ty_tmp.
data: it_tmp type standard table of ty_tmp,
wa_tmp1 type ty_tmp,
wa_tmp type ty_tmp.
data:v_idx type sy-tabix.
sort it_tmp by fld1.
loop at it_tmp into wa_tmp.
v_idx = sy-tabix + 1.
read table it_tmp into wa_tmp1 index v_idx.
if sy-subrc is initial and wa_tmp1-fld1 eq wa_tmp-fld1.
message 'Duplicate entry' type 'E'.
endif.
endloop.
thanks
regards
Shravan