Skip to Content
avatar image
Former Member

ALV Grid Filter

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[]
.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 15, 2008 at 01: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[]

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 24, 2008 at 11:45 AM

    solved

    Add comment
    10|10000 characters needed characters exceeded