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

removing duplicate value in one columns??

former_member770121
Participant
0 Likes
2,683

my requiremwnt is its removing the duplicate value in one cell??

my require output should be material should be display one time in one cell removing duplicate material??

output in both lines should be:::: 7000000677 just one time???

1 ACCEPTED SOLUTION
Read only

pubudug
Explorer
0 Likes
2,421

Solution

Loop the main table --> assign to a field symbol (<fs_mat>)

--> loop the <fs_mat>-material column

--------->collect to temp table

--->end loop

End Main loop

Sort and delete adjacent duplicates

my requiremwnt is its removing the duplicate value in one cell??

my require output should be material should be display one time in one cell removing duplicate material??

output in both lines should be:::: 7000000677 just one time???

4 REPLIES 4
Read only

pubudug
Explorer
2,421

DATA : lv_string TYPE string .
TYPES: BEGIN OF ty_string,
str_mat(40) TYPE c,
END OF ty_string.
DATA it_string TYPE TABLE OF ty_string.
DATA wa_string TYPE ty_string .


lv_string = '7000000677--7000000677--7000000677--7000000677' .
SPLIT lv_string AT '--' INTO TABLE it_string .
LOOP AT it_string INTO wa_string.
WRITE 😕 wa_string-str.
ENDLOOP.



SORT it_string BY str_mat ASCENDING.
DELETE ADJACENT DUPLICATES FROM it_string COMPARING str_mat.

Solution

Loop the main table --> assign to a field symbol (<fs_mat>)

--> loop the <fs_mat>-material colum

--------->collect to temp table

--->end loop

End Main loop

Sort and delete adjucent duplicates

Read only

0 Likes
2,421

thank u my problem is resolved can u tell please how we can removed the starting underscore ?????

it should display like::::: ' 7000000677--7000000677--7000000677--7000000677'

Read only

pubudug
Explorer
0 Likes
2,422

Solution

Loop the main table --> assign to a field symbol (<fs_mat>)

--> loop the <fs_mat>-material column

--------->collect to temp table

--->end loop

End Main loop

Sort and delete adjacent duplicates

Read only

0 Likes
2,421

ITS NOT WORKING??