cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down by Key - Sorted

Former Member
0 Kudos

Hi,

Is it necessary for the key of the elements to be in sorted order before binding it to the Drop-down by Key?????

Regards,

Kanakaraj V A

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

not really, it will appear the way it is in the value set table

Abhi

Former Member
0 Kudos

Hi,

Are you sure with that... ? because we r getting a dump telling saying that cant insert value in a sorted table when i am trying to append a new entry in the internal table.

Thanks

Kanakaraj V A

arjun_thakur
Active Contributor
0 Kudos

Kanakaraj,

Are you trying to insert any value in value-set table? Are you using Insert operation? If so, try using append operation as value set is a sorted table and the new record will come in sorted order automatically.

Regards

Arjun

abhimanyu_lagishetti7
Active Contributor
0 Kudos

you might have declared the internal table with the actual table type.

Use

data: lt_valueset type standard table of wdr_context_attr_value.

and try to append now , it works

Abhi

Former Member
0 Kudos

Hi Kanakaraj,

Looks like you have declared a SORTED table, that binded to the DropDown by key,

use following

data:
   lt_valueset type table of wdr_context_attr_value,
   ls_valueset type wdr_context_attr_value,

///

//

ls_valueset-value = 
ls_valueset-key =

append ls_valueset to lt_valueset.

you can later update the SORTED internal table from the NEW values that get added in the Lt_ValueSet at runtime.

Greetings

Prashant