on 07-17-2008 2:29 PM
Hi,
I am trying to implement Table level filtering in Webdynpro ALV.
I created a dropdown in the Toolbar in ALV. I am not able to retrieve the values in the dropdown.
I have written the following code.
method WDDOINIT .
data: lr_ref_cmp_usage type ref to if_wd_component_usage.
lr_ref_cmp_usage = wd_this->wd_cpuse_alv_test( ).
IF lr_ref_cmp_usage->has_active_component( ) IS INITIAL.
lr_ref_cmp_usage->create_component( ).
ENDIF.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table,
l_value type ref to cl_salv_wd_config_table.
l_ref_interfacecontroller = wd_this->wd_cpifc_alv_test( ).
l_value = l_ref_interfacecontroller->get_model( ).
data: lr_table_settings type ref to if_salv_wd_table_settings.
lr_table_settings ?= l_value.
lr_table_settings->set_read_only( abap_false ).
data: lr_functions type ref to if_salv_wd_function_settings,
lr_function type ref to cl_salv_wd_function,
lr_dropdown_by_idx type ref to CL_SALV_WD_FE_DROPDOWN_BY_IDX.
Add self-defined functions in toolbar
lr_functions ?= l_value.
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( 'CURRENCY' ).
lr_function->set_editor( lr_dropdown_by_idx ).
data:
lt_dropdownbyindex type ig_componentcontroller=>elements_dropdownbyindex,
ls_dropdownbyindex type ig_componentcontroller=>element_dropdownbyindex,
node TYPE REF TO if_wd_context_node.
ls_dropdownbyindex-value = 'ACTIVE'.
append ls_dropdownbyindex to lt_dropdownbyindex.
ls_dropdownbyindex-value = 'QUALIFIED'.
append ls_dropdownbyindex to lt_dropdownbyindex.
node->bind_table( lt_dropdownbyindex ).
endmethod.
I have seen in some threads that i need to write the following statement to bind the values.
node->bind_table( lt_dropdownbyindex ).
Could someone help me out to which node I need to bind to. I am now geting the dropdown in menubar but not geting the values in it. Also I need to do filtering depending on the value selected in the dropdown list.
Kindly send some useful links which helps in creating dropdowns in ALV toolbar.
Thanks,
Suvarna.
Hi
i think you need to use method SET_TEXTS_ELEMENTNAME of CL_SALV_WD_FE_DROPDOWN_BY_IDX to set the value of dropdown
see the documenation for this method.
Regards
Naresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Problem Solved.
Thanks,
Suvarna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.