Application Development and Automation 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: 
Read only

Internal Table query

harish_padikkadmohananara
Product and Topic Expert
Product and Topic Expert
0 Likes
420

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
Read only

Former Member
0 Likes
383

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
Read only

Former Member
0 Likes
384

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.

Read only

Former Member
0 Likes
383

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