10-15-2008 2:14 PM
Hi,
i tried to send a filter options to alv grid with 'it_filter' but it didn't work.
can somebody help me pls?
Thanks,
my code is
data:
gt_filter TYPE LVC_T_FILT ,
gs_filter TYPE LVC_s_FILT .
.....
gs_filter-fieldname = 'VBELN' .
gs_filter-sign = 'E' .
gs_filter-option = 'BT' .
gs_filter-low = '0000000001' .
gs_filter-high = '0000000003' .
APPEND gs_filter TO gt_filter .
..........
call method gr_alvgrid->set_table_for_first_display
exporting
is_variant = variante
i_save = 'X'
i_default = 'X'
is_layout = gs_layout
* it_toolbar_excluding = lt_excl_func
changing
it_outtab = table
it_fieldcatalog = fcat
IT_FILTER = gt_filter[]
.
10-15-2008 2:19 PM
from your code i can see one thing the layout variant(default one) may be overriding the filter settings. do you have any Default variant ..? try to comment that i_default = 'X'
call method gr_alvgrid->set_table_for_first_display
exporting
" is_variant = variante "remove these three
" i_save = 'X'
" i_default = 'X'
is_layout = gs_layout
* it_toolbar_excluding = lt_excl_func
changing
it_outtab = table
it_fieldcatalog = fcat
IT_FILTER = gt_filter[]
10-15-2008 2:34 PM
Thank you Vijay,
it worked now. i must send a variant to alv grid, what can i do ?
thanks again.
10-15-2008 2:45 PM
Variant is especially for displaying the columns the way we want. if you want both then you have to create a variant considering the Filter also. so try create a variant which holds the filter data also. then see.
i tested from my end. it is working fine.
10-15-2008 3:57 PM
10-15-2008 4:04 PM
I don't think you can do it other than including the Filter , and creating the variant. Since you need both at a time.
10-15-2008 4:09 PM
11-24-2008 11:45 AM