on 04-03-2008 2:34 AM
Hi guys,
Is it possbile to do the dropdown list of alv filter?
If so , how to do that?
Thanks in advance.
Best regards,
Vincent
Hi Vincent,
Unfortunately, this is not possible. When you click on Filters it only comes up with an input field as the topmost row where we can set the filtering condition. This comes up as standard UI and hence cannot be changed.
Regards,
Sravan Varagani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lakshmi,
I did as follows.
1. Go to WDComponent.
2. Add SALV_WD_TABLE as Component use at Used Components tab.
3. Go to ViewController.
4. Add SALV_WD_TABLE as used Component and used Interface at Properties tab.
5. Map FILTER_VALUES node from used Component of ALV to Context of ViewController at Context tab.
6. Code as follows.
DATA lo_nd_filter_values TYPE REF TO if_wd_context_node.
DATA ls_filter_values TYPE REF TO if_wd_context_element.
DATA l_wdy_key_value_table TYPE TABLE OF wdy_key_value.
DATA l_wdy_key_value TYPE wdy_key_value.
lo_nd_filter_values = wd_context->get_child_node( name = wd_this->wdctx_filter_values ).
ls_filter_values = lo_nd_filter_values->create_element( ).
ls_filter_values->set_attribute(
name = `FIELDNAME`
value = `ATTR1` "Attribute name that you want to set filter.
).
*Followings are filter values.
l_wdy_key_value-key = `0`.
l_wdy_key_value-value = ``.
APPEND l_wdy_key_value TO l_wdy_key_value_table.
l_wdy_key_value-key = `1`.
l_wdy_key_value-value = `AAAA`.
APPEND l_wdy_key_value TO l_wdy_key_value_table.
l_wdy_key_value-key = `2`.
l_wdy_key_value-value = `BBBB`.
APPEND l_wdy_key_value TO l_wdy_key_value_table.
l_wdy_key_value-key = `3`.
l_wdy_key_value-value = `CCCC`.
APPEND l_wdy_key_value TO l_wdy_key_value_table.
ls_filter_values->set_attribute(
name = `T_DROPDOWN_VALUES`
value = l_wdy_key_value_table
).
lo_nd_filter_values->bind_element( new_item = ls_filter_values set_initial_elements = abap_false ).
Regards,
Masaaki YANOKUCHI
Edited by: Masaaki Yanokuchi on Jan 26, 2010 10:35 AM
Hi,
I want to refresh the lo_nd_filter_values node with different values in the ON_STD_FUNCTION_AFTER event of my custom method. I tried invalidate method and binded the node with new value but still this node lo_nd_filter_values not refreshed only holds the old value .
Kindly give me solution to refresh the dropdown values of node filter_values on select of particular value in the filter.
My work-around until I find a more elegant solution:
Method ONACTIONSEARCH:
Code snippet:
DATA l_view_controller_api TYPE REF TO if_wd_view_controller.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_tcc_alv( ).
lo_cmp_usage->delete_component( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
wd_this->alv_init( ).
wd_comp_controller->search( ).
wd_this->add_filter_values( ).
l_view_controller_api = wd_this->wd_get_api( ).
l_view_controller_api->do_dynamic_navigation(
source_window_name = 'W_MAIN' "the NAME OF the WINDOW
source_vusage_name = 'V_MAIN_USAGE_1' "the PARAMETER shown
source_plug_name = 'TO_V1' "define a NEW outbound plug
target_component_name = 'SALV_WD_TABLE' "all STANDARD
target_component_usage = 'ALV' "all STANDARD
target_view_name = 'TABLE' "all STANDARD
target_plug_name = 'DEFAULT' "all STANDARD
target_embedding_position = 'V_MAIN/VC_ALV' "main view NAME / *container NAME
).
wd_this->fire_to_v1_plg( ).
Hi Experts,
Could anyone answer this question?
best regards,
Vincent
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 | |
10 | |
7 | |
6 | |
6 | |
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.