on 05-08-2007 10:31 AM
Hi all..
I want to display a dropdown list in the ALV toolbar..
How can i do it using user defined functions...
I also tried using the class cl_salv_wd_fe_dropdown_by_key
Creating a DropDown List in ALV Toolbar.
DATA lr_drdwnui TYPE REF TO cl_salv_wd_fe_dropdown_by_key.
CREATE OBJECT lr_drdwnui EXPORTING selected_key_elementname =
lr_drdwnui->set_label_text( 'Colors' ).
But not getting what value should i give to selected_key_elementname?????
A small piece of code is appreciated..\
jagruti
Hi Jagruti,
I am providing the some peice of code which will be helpful to you.
<b>Adding the DropDown list to the ALV toolbar:</b>
lr_functions ?= wd_this->r_table.
lr_function = lr_functions->create_function( 'MYDROPDOWNBYINDEX' ).
create object lr_dropdown_by_idx
exporting
texts_elementname = 'DROPDOWNBYINDEX.VALUE'.
lr_dropdown_by_idx->set_label_text( 'MYDROPDOWNBYINDEX' ).
lr_function->set_editor( lr_dropdown_by_idx ).
<b>Providing the values to that DropDown:</b>
Here in my example DROPDOWNBYINDEX.VALUE is the context attrubute. And i write the Supply function for that node as follows:
data:
lt_dropdownbyindex type if_componentcontroller=>elements_dropdownbyindex,
ls_dropdownbyindex type if_componentcontroller=>element_dropdownbyindex.
ls_dropdownbyindex-value = 'Nothing'. "#EC NOTEXT
append ls_dropdownbyindex to lt_dropdownbyindex.
ls_dropdownbyindex-value = 'ActionDropdownByIndex'. "#EC NOTEXT
append ls_dropdownbyindex to lt_dropdownbyindex.
node->bind_table( lt_dropdownbyindex ).
For reference you can refer the WD component SALV_WD_TEST_TABLE_TOOLBR which holds the same code
Warm Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.