Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Dynamic DropDownByKey

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

Former Member
Former Member replied

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

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question