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: 

removing duplicate value in one columns??

former_member770121
Participant
0 Kudos

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

pubudug
Explorer
0 Kudos

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

4 REPLIES 4

pubudug
Explorer

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

0 Kudos

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'

pubudug
Explorer
0 Kudos

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

0 Kudos

ITS NOT WORKING??