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 logic

Former Member
0 Kudos

Dear experts,

I have an internal table like below

table A

field 1 field 2

100----


s

100----


r

100----


y

200----


w

200----


z

300----


d

300----


k

300----


u

I need to pick up the single data in field1 like below

internal table b

field1

100

200

300

Can any one give the logic for this

Thanks in advance

karthik

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

loop at itab.

at new field1.

move itab-field1 to itab2-field1.

append itab2.

clear itab2.

endloop.

endloop.

Regards,

Ravi

Former Member
0 Kudos

sort <table name> by field1

delete adjacent duplicates from <table name> comparing <fileld name1>

before this make a copy of the table into another table

table1[] = table2[].

Former Member
0 Kudos

sort A by field1.

loop at A.

at new field1.

move A-field1 to B-field1.

append B.

endat.

clear: A, B.

endloop.