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

Delete the Adjacent duplicate values

Former Member
0 Likes
778

Hi all,

I want to Delete the Adjacent duplicate values. For this iam using

Delete Adjacent duplicates from table itab.

My question is Where i have to use this? i mean outside the loop or

within the Loop and Endloop.

Performance wise which one is suggested ?

Thanks in advance

Sri...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
746

It is not to be used within a loop.

It should be out of the loop.

Leave performance, if you use it in a loop, you will get erroneous results.

Regards,

ravi

It is not to be used within a loop.

It should be out of the loop.

Leave performance, if you use it in a loop, you will get erroneous results.

Regards,

ravi

6 REPLIES 6
Read only

Former Member
0 Likes
747

It is not to be used within a loop.

It should be out of the loop.

Leave performance, if you use it in a loop, you will get erroneous results.

Regards,

ravi

Read only

Former Member
0 Likes
746

You cannot use that in loop

use that befor loop .... endloop

Read only

0 Likes
746

outside the loop.

<i>sort itab.

delete adjacent duplicates from itab.</i>

You can also use the addition

delete adjacent duplicates from itab comparing fields <f1> <f2> etc.

~Suresh

Read only

Former Member
0 Likes
746

HI,

U cant Use in a Loop.

Ex:

<b>SORT ITAB ASCENDING BY MATNR WERKS.

DELETE ADJACENT DUPLICATES FROM ITAB COMPARING MATNR.</b>

Regards

SAB

Read only

Former Member
0 Likes
746

You need to sort the internal with or without a field before using delete adjacent duplicates on itab.

use

delete adjacent duplicates from itab

Read only

Former Member
0 Likes
746

Hi,

it must not be between loop and end loop.

write outside the loop.

before using Delete Adjacent duplicates from table itab.

sort the table itab.

i.e

sort itab.

Delete Adjacent duplicates from table itab.

Regards,

Sruthi