on 02-05-2014 6:48 AM
Hi Gurus,
I am just wondering is there a way to sort the drop down list by text or description instead of key.
Sorting the internal table would not help as it will return a short dump for sorting a sorted table.
So, any help in this?
I am using the following view element and coding to populate the drop down values.
The view element:-
The codes:-
before binding the valueset to the attribute, just write the following code..
SORT lt_value_set ASCENDING BY text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the following things..
DATA: lt_valueset TYPE wdr_context_attr_value_list,
ls_valueset TYPE wdr_context_attr_value.
<<>>
SORT lt_valueset ASCENDING BY text.
lo_node = wd_context->get_child_node( name = '<Node_name>' ).
lo_node_info = lo_node->get_node_info( ).
lo_node_info->set_attribute_value_set( EXPORTING name = '<Attribute_name>' value_set = lt_valueset ).
REFRESH lt_valueset[].
Hi Girish,
As you said SORTing the SORTED TABLE would give you an error,
BUT to make it simple why not declare the table to be STANDARD table and then use SORT BY v_value
Hope this helps!
Happy Coding,
Santhosh Yadav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.