Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8594

Re: duplicate entries in internal table

$
0
0

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


Viewing all articles
Browse latest Browse all 8594

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>