on 06-14-2011 4:01 PM
Hi,
I'm creating a DropDownByKey:
select * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
l_palias-value = ls_cenas-palias.
l_palias-text = ls_cenas-palias.
insert l_palias into table lt_palias.
endloop.
attribute_cenas->set_attribute_value_set(
name = 'PALIAS'
value_set = lt_palias ).
This inserts all values from ls_profile-palias in the DropDownByKey by I don't want to display duplicate values, how can I do that?
Regards
hi,
select * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
l_palias-value = ls_cenas-palias.
l_palias-text = ls_cenas-palias.
insert l_palias into table lt_palias.
endloop.
DELETE ADJACENT DUPLICATES FROM lt_palias COMPARING value.
attribute_cenas->set_attribute_value_set(
name = 'PALIAS'
value_set = lt_palias ).
Regards,
akshay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
select * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
l_palias-value = ls_cenas-palias.
l_palias-text = ls_cenas-palias.
insert l_palias into table lt_palias.
endloop.
DELETE ADJACENT DUPLICATES FROM lt_palias COMPARING value.
attribute_cenas->set_attribute_value_set(
name = 'PALIAS'
value_set = lt_palias ).
Regards,
akshay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Also, after the select, you can sort the internal table (SORT ABAP sentence) and then delete duplicates (DELETE ADJACENT DUPLICATES ABAP sentence).
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably the following sql statement with distinct key word do the trick
select distinct * from ycenas into corresponding fields of table lt_cenas.
loop at lt_cenas into ls_cenas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.