on 12-02-2009 11:58 AM
Hi Colleagues,
I need your help in knowing how to get the "Filter_values" node for a dynamic ALV.
I need it to define the filtering for a column .
I can set the data directly by using set_data( ) method but don't know how to bind table to node Filter values.
Kindly help.
Best Regards,
Arti.
Hi,
I can set the data directly by using set_data( ) method but don't know how to bind table to node Filter values.
Can you please elaborate where are facing the issue and what exactly is you requirement.
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In case of dynamic ALV we can bind the data to the "DATA" node by set_data( ) method of SALV_WD_TABLE componnet which we accessed outside this component also. Now I want to set the filter values to one of the columns which i know can be done through binding the data to the "FILTER_VALUES" node .
My questionis how to get the regerence of "Filter_values" Node. If I get this ref. my issue is solved.
Best Regards,
Arti.
Hi,
to set the filter value for a column you can proceed as follows:
Data: lr_filter_rule TYPE REF TO cl_salv_wd_filter_rule,
lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lt_columns TYPE salv_wd_t_column_ref,
ls_columns TYPE salv_wd_s_column_ref,
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
lo_value = lo_interfacecontroller->get_model( ).
lr_column_settings ?= wd_this->lr_config_table.
lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns INTO ls_columns.
l_col_index = sy-tabix.
lr_column = ls_columns-r_column.
*get the field name by passing the column id.
l_fieldname = cl_salv_wd_model_table_util=>if_salv_wd_table_util_column~get_field(
r_model = lo_value
column = ls_columns-id ).
*get field object reference
lr_field = lo_value->if_salv_wd_field_settings~get_field(
fieldname = l_fieldname ).
CALL METHOD lr_field->if_salv_wd_filter~CREATE_FILTER_RULE
EXPORTING
* INCLUDED = 'X'
* OPERATOR = 'EQ'
LOW_VALUE = 'aaa' "enter value which you want to set.
* HIGH_VALUE =
RECEIVING
VALUE = lr_filter_rule
.
You can refer the link
[http://help.sap.com/search/highlightContent.jsp]
Priya
.
After appyling the filter to alv for a field, do you want to retrive them...
Can you elaborate ..
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.