on 06-12-2007 12:28 PM
Hi All,
Can someone tell me as to how i can set the filter condition from my code for an ALV grid. My requirement is that i have to default the dislay to a filter condition. The user may then override it by specifying his/her own filter criteria later on.
Any help would be appreciated. Thanks.!
Regards,
Ram
Hi Ram,
Please check this link.
http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm
Regards,
Siva.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The following snippet of code will filter the column values which equals to the value 'BA'.
data: lr_field_settings type ref to if_salv_wd_field_settings,
lr_field_hdr type ref to CL_SALV_WD_FIELD,
lr_field type ref to CL_SALV_WD_FILTER_RULE.
lr_field_settings ?= wd_this->MAIN_ALV_CONFIG_TABLE. // ALV table name.
lr_field_hdr = lr_field_settings->get_field( '//column name' ).
lr_field = lr_field_hdr->if_salv_wd_filter~create_filter_rule( operator = 'EQ' low_value = 'BA' ).
So, now the column will be filtered by the value equal to 'BA'.
Regards,
Siva.
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.