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 Manipulation:: Urgent

Former Member
0 Likes
839

Hi all,

I have an internal table having 150 fields.Now there are duplicate records in my internal table having the same values for all the 150 fields ( Exactly the same value in the entire row ) ..My requirement is to delete all those duplicate records and my internal table must have only one unique row of record..

Suppose i have four rows having the same value for all the fields.I want to have only one row after my manipulation of the internal table..

Please suggest how i can achieve the same..

Itz urgent and all uselful answers will be rewarded..

Thanks & Regards,

Arun Chaudhary

Hi all,

I have an internal table having 150 fields.Now there are duplicate records in my internal table having the same values for all the 150 fields ( Exactly the same value in the entire row ) ..My requirement is to delete all those duplicate records and my internal table must have only one unique row of record..

Suppose i have four rows having the same value for all the fields.I want to have only one row after my manipulation of the internal table..

Please suggest how i can achieve the same..

Itz urgent and all uselful answers will be rewarded..

Thanks & Regards,

Arun Chaudhary

6 REPLIES 6
Read only

JozsefSzikszai
Active Contributor
0 Likes
807

hi Arun,

use: DELETE ADJACENT DUPLICATES ...

ec

Read only

Former Member
0 Likes
807

Hi,

Do like this

DELETE ADJUCENT DUPLICATES FROM ITAB COMPARING <KEY FIEDLS>.

Regards,

Satish

Read only

Former Member
0 Likes
807

Hi Arun,

1. Simple

2. Sort the inernal table.

3. then write code

DELETE ADJACENT DUPLICATES FROM ITAB.

(since you want all fields to be compred for duplicate checking,

the above statment is enough)

(The system will compare all fields for duplicate checking)

4. If u want only some fields for duplicate checking, then u can

add the suffix

..... COMPARING FIELD1 FIELD2 FIELD5.

Regards,

Amit Mittal.

Read only

Former Member
0 Likes
807

Just to delete adjacent duplicates from itab.

Albert

Read only

Former Member
0 Likes
807

Hi,

Check the following code:

Sort itab.
delete adjacent duplicates from itab

.

Hope this helps,

Erwan

Read only

Former Member
0 Likes
807

Use the code:

Delete adjacent duplicates from itab comparing all fields.