on 10-31-2013 2:51 PM
I have added a button in ALV toolbar, similarly i have to add drop down in the toolbar. please provide a solution.
Hi Satya,
try below code.
Adding the DropDown list to the ALV toolbar:
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 ).
Providing the values to that DropDown:
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'.
append ls_dropdownbyindex to lt_dropdownbyindex.
ls_dropdownbyindex-value = 'ActionDropdownByIndex'.
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
Regards,
venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since, you have added Button to tool bar, you have used Class cl_salv_wd_fe_button. Please use CL_SALV_WD_FE_A_DROPDOWN for dropdown.For more attirbutes, search CL_SALV_WD_FE*
Thanks
Mohinder
Th
T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.