Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Table query

0 Kudos

Hi,

I have a internal table with two columns c1 and c2.

I have three records r1,r2 and r3.These records are ,

A1 B1

A2 B2

A3 B3

Now i can have a record,

A1 B2

but not a record like,

A1 B1

again,so the duplication of the record need to be prevented.I need to know how to check for the duplication of existing records in the internal table with the newly added record.

Thank you.

Regards,

Harish

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi Harish,

what u could do is create a internal table of type sorted and specify the unique firlds as c1 and c2. so automatically, it will not allow to insert duplicate records.

regards,

Navneeth K.

2 REPLIES 2

Former Member
0 Kudos

hi Harish,

what u could do is create a internal table of type sorted and specify the unique firlds as c1 and c2. so automatically, it will not allow to insert duplicate records.

regards,

Navneeth K.

Former Member
0 Kudos

Hi,

Add the record to the internal table, after adding the record then sort the internal table then use <b>Adjacent Duplicates</b> from Internal table

Regards

Sudheer