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

itab

Former Member
0 Likes
825

hi,

i have an itab of stucture

1 pqrs pqrs1 0010

1 pqrsx pqrs1 0010

1 pqrsx pqrs1 0020

i want my it1 of structure

1 pqrs pqrs1 0010

1 pqrsx pqrs1 0020

any pointer

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
794

hi,

it1[] = itab[].

sort it1.

delete adjacent duplicates from it1 comparing all fields.

Regards

MD

7 REPLIES 7
Read only

Former Member
0 Likes
794

loop at itab into wa.

delete itab from wa comparing col1 = 1

col2 = pqrsx

col3 =pqrs1

col4 =0010

endloop.

Read only

0 Likes
794

>

> loop at itab into wa.

> delete itab from wa comparing col1 = 1

> col2 = pqrsx

> col3 =pqrs1

> col4 =0010

>

> endloop.

What is this brother?

Read only

Former Member
0 Likes
794
1 pqrs pqrs1 0010"<<<<---first sort than Delete adjcent duplicate on this field(0010) 
1 pqrsx pqrs1 0010
1 pqrsx pqrs1 0020
Read only

Former Member
0 Likes
795

hi,

it1[] = itab[].

sort it1.

delete adjacent duplicates from it1 comparing all fields.

Regards

MD

Read only

GauthamV
Active Contributor
0 Likes
794

hi,

first sort ur internal table based on ur fields descending.

then use delete adjacent duplicates comparing ur fields.

Read only

Former Member
0 Likes
794

Hi Priya,

Your question is not very clear.

Do you want out of following two records, only the last one to be moced to to IT1 ?

1 pqrsx pqrs1 0010

1 pqrsx pqrs1 0020


LOOP AT itab.
AT END OF second_field.
APPEND itab TO it1.
ENDLOOP.

Read only

Former Member
0 Likes
794

Hi Priya,

Use AT NEW statement .

Regards,

Sravanthi