<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Set Filter in an existing ALV- Layout in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419251#M1549082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after determining the layout in question, you can use method CL_SALV_LAYOUT-&amp;gt;SET_INITIAL_LAYOUT to apply this layout. Then you can check the respective columns, sort and aggregation objects for the contents, add something, change something, remove something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the layouts in table LTDX,  RELID = 'LT' and the reports name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Nov 2010 10:07:08 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2010-11-11T10:07:08Z</dc:date>
    <item>
      <title>Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419248#M1549079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P&gt;I need to change an existing, stored ALV- Layout of an ABAP- Report. So the Problem is not to select the regarding ALV- Grid Layout at selection Screen with "cl_salv_layout_service=&amp;gt;f4_layouts" but to get the settings of the selected Layout in the Sourcecode and to change some Filtersettings with Methods like "lo_filters-&amp;gt;add_filter" bevore it will be shown with "gr_alv-&amp;gt;display( )".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;maybe someone knows some code examples... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 10:50:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419248#M1549079</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-10T10:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419249#M1549080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to only apply the filters in your code. If user selects the layout on the selection screen or it has any default layout, ALV framework will apply that layout on the ALV once your filters are applied.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To apply the filters, try like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*
    DATA: lo_filters TYPE REF TO cl_salv_filters.
*
    lo_filters = co_alv-&amp;gt;get_filters( ).
*
*   Set the filter for the column ERDAT
*     the filter criteria works exactly same as any
*     RANGE or SELECT-OPTIONS works.
    TRY.
        CALL METHOD lo_filters-&amp;gt;add_filter
          EXPORTING
            columnname = 'ERDAT'
            sign       = 'I'
            option     = 'EQ'
            low        = '20091214'
*           high       =
            .
      CATCH cx_salv_not_found .                         "#EC NO_HANDLER
      CATCH cx_salv_data_error .                        "#EC NO_HANDLER
      CATCH cx_salv_existing .                          "#EC NO_HANDLER
    ENDTRY.
*
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also check the filters example in this post - &lt;A href="http://help-abap.blogspot.com/2009/12/salv-table-12-apply-filters.html" target="test_blank"&gt;http://help-abap.blogspot.com/2009/12/salv-table-12-apply-filters.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Nov 2010 14:31:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419249#M1549080</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2010-11-10T14:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419250#M1549081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your Help, but its not the problem to set filters in the standard ALV- Layout of Table- object co_alv. I need to choose a still defined Layout and in this Layout i have to set in addition to the existing settings (like filters, aggregations and so on... ) a "codet filter like you show it in the code- example below... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem isn't to set the Filter, but i need to know the steps to choose an existing Layout and in the next step i want to add some filter- criterias to it... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best ragards, &lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 08:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419250#M1549081</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-11T08:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419251#M1549082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after determining the layout in question, you can use method CL_SALV_LAYOUT-&amp;gt;SET_INITIAL_LAYOUT to apply this layout. Then you can check the respective columns, sort and aggregation objects for the contents, add something, change something, remove something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find the layouts in table LTDX,  RELID = 'LT' and the reports name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 10:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419251#M1549082</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-11-11T10:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419252#M1549083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: gr_alv       TYPE REF TO cl_salv_table.             &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Instanz für ALV-Objekt holen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  TRY.                                                     &lt;/P&gt;&lt;P&gt;    cl_salv_table=&amp;gt;factory(                                &lt;/P&gt;&lt;P&gt;    EXPORTING                                              &lt;/P&gt;&lt;P&gt;      list_display = list_display                          &lt;/P&gt;&lt;P&gt;    IMPORTING                                              &lt;/P&gt;&lt;P&gt;      r_salv_table   = gr_alv                             &lt;/P&gt;&lt;P&gt;    CHANGING                                                &lt;/P&gt;&lt;P&gt;      t_table        = alv_table                           &lt;/P&gt;&lt;P&gt;      ).                                                   &lt;/P&gt;&lt;P&gt;  ENDTRY.                                                &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Layout Objekt erstellen&lt;/P&gt;&lt;P&gt;  DATA: lr_layout TYPE REF TO cl_salv_layout,              &lt;/P&gt;&lt;P&gt;        ls_key TYPE salv_s_layout_key.                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lr_layout = gr_alv-&amp;gt;get_layout( ).                        &lt;/P&gt;&lt;P&gt;  ls_key-report = sy-cprog.                                &lt;/P&gt;&lt;P&gt;*Layoutschlüssel setzen&lt;/P&gt;&lt;P&gt;  lr_layout-&amp;gt;set_key( value = ls_key ).                    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Einschränkung zum Sichern des Layouts setzen&lt;/P&gt;&lt;P&gt;  lr_layout-&amp;gt;set_save_restriction(                          &lt;/P&gt;&lt;P&gt;  value  = if_salv_c_layout=&amp;gt;restrict_none).                                                      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Layout Voreinstellung erlauben&lt;/P&gt;&lt;P&gt;  lr_layout-&amp;gt;set_default( value = 'X' ).                   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Initiales Layout setzen&lt;/P&gt;&lt;P&gt;  lr_layout-&amp;gt;set_initial_layout( value = p_layout  ).      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After choosing the Layout, there is my Problem to add the filter- settings below... So the correct Layout is getting displayed but the additional filter criteria is missing... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Filter im ALV Setzen                                        &lt;/P&gt;&lt;P&gt;  DATA: lo_filters TYPE REF TO cl_salv_filters.            &lt;/P&gt;&lt;P&gt;  DATA: lo_filter TYPE REF TO cl_salv_filter.               &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_filters = gr_alv-&amp;gt;get_filters( ).                     &lt;/P&gt;&lt;P&gt;  lo_filter = lo_filters-&amp;gt;add_filter(                      &lt;/P&gt;&lt;P&gt;        columnname = 'ARBPL'                               &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       sign       =                                      &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       option     =                                       &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       low        =                                      &lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       high       =                                     &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        ).                                                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT it_arbpl INTO wa_arbpl.                          &lt;/P&gt;&lt;P&gt;      lo_filter-&amp;gt;add_selopt(                                &lt;/P&gt;&lt;P&gt;        sign   = 'E'                                       &lt;/P&gt;&lt;P&gt;        option = wa_arbpl-option                           &lt;/P&gt;&lt;P&gt;        low    = wa_arbpl-low                              &lt;/P&gt;&lt;P&gt;        high   = wa_arbpl-high                             &lt;/P&gt;&lt;P&gt;        ).                                                 &lt;/P&gt;&lt;P&gt;  ENDLOOP.                                                  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lo_filter = lo_filters-&amp;gt;add_filter(                       &lt;/P&gt;&lt;P&gt;        columnname = 'VVSTAT'                               &lt;/P&gt;&lt;P&gt;        sign       = 'I'                                   &lt;/P&gt;&lt;P&gt;        option     = 'EQ'                                  &lt;/P&gt;&lt;P&gt;        low        = ' '                                    &lt;/P&gt;&lt;P&gt;        high       = ' '                                   &lt;/P&gt;&lt;P&gt;        ).                                                 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  gr_alv-&amp;gt;display( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 10:37:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419252#M1549083</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-11T10:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419253#M1549084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roland,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because your code is not formatted as code it is hard to read. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try a (CL_SALV_TABLE) REFRESH after setting the layout?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 12:11:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419253#M1549084</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-11-11T12:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419254#M1549085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the format of the last posting...  &lt;/P&gt;&lt;P&gt;to your Question: "Did you try a (CL_SALV_TABLE) REFRESH after setting the layout?" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No i don't... should I?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 12:15:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419254#M1549085</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-11T12:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419255#M1549086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the format of the last posting...  &lt;/P&gt;&lt;P&gt;to your Question: "Did you try a (CL_SALV_TABLE) REFRESH after setting the layout?" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No i don't... should I?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 12:15:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419255#M1549086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-11T12:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419256#M1549087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the suggestive character of my question. Yes, at least you should try. It is my assumption that &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lr_layout-&amp;gt;set_initial_layout( value = p_layout ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;will apply the layouts settings with filters and the like and further changes to the layout may need a refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never applied filters before display, only at runtime triggered by some toolbar buttons and then always followed by refresh. Excerpt  from that code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;              &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;WHEN mc_colname_ap_date.
                &amp;lt;column_ref&amp;gt;-r_column-&amp;gt;set_visible( abap_false ).
                lo_sorts-&amp;gt;remove_sort( &amp;lt;column_ref&amp;gt;-columnname ).
              WHEN mc_colname_prof_date.
                &amp;lt;column_ref&amp;gt;-r_column-&amp;gt;set_visible( abap_false ).
                lo_sorts-&amp;gt;remove_sort( &amp;lt;column_ref&amp;gt;-columnname ).
              WHEN mc_colname_prof_time.
                &amp;lt;column_ref&amp;gt;-r_column-&amp;gt;set_visible( abap_false ).
            ENDCASE.
        ENDCASE.
      ENDLOOP.
    CATCH cx_salv_data_error cx_salv_not_found cx_salv_existing
      INTO mo_exception.
      ASSERT 1 = 2.
  ENDTRY.

  enforce_column_sequence( ).
  mo_salv-&amp;gt;refresh( refresh_mode  = if_salv_c_refresh=&amp;gt;full ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 15:49:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419256#M1549087</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-11-11T15:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419257#M1549088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like, Initial Layout settings have the higher preference than the explicit supplied Filters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what's going on inside - In the method SET_TABLE_FOR_FIRST_DISPLAY, Filters are being set from the attribute IT_FILTERS in the attribute MT_FILTERS of Variant object M_CL_VARIANT. Later it loads the settings like Sort, filters from the initial Layout in the object M_CL_VARIANT using the method LOAD_VARIANT and in this step, it looses the content of the MT_FIILTERS. It gives the Filters of the Layout a higher preference than the additional supplied filters...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
...
    m_cl_variant-&amp;gt;mt_sort               = it_sort.
    m_cl_variant-&amp;gt;mt_filter             = it_filter.
    m_cl_variant-&amp;gt;m_variant_save        = i_save.
...
...
    call method m_cl_variant-&amp;gt;load_variant
      exporting
        i_tabname          = ls_fieldcatalog-tabname
        i_bypassing_buffer = m_bypassing_buffer
        i_buffer_active    = m_buffer_active
        i_dialog           = space
        i_no_frontend      = abap_true
      importing
        e_exit             = l_no_variant_loaded.
...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 20:39:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419257#M1549088</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2010-11-11T20:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419258#M1549089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, Thank you for your answers! &lt;/P&gt;&lt;P&gt;So if the Layout settings have the higher preference than the explicit supplied Filters, maybe changing the Layout itself is the only way to solve the problem?!? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone an idea to change an existing Layout with Coding, because i was allways trying to change the Table Settings in the past... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the Methods of the class CL_SALV_LAYOUT did not seem promising enough...&lt;/P&gt;&lt;P&gt;F4_LAYOUTS&lt;/P&gt;&lt;P&gt;GET_CURRENT_LAYOUT&lt;/P&gt;&lt;P&gt;GET_DEFAULT_LAYOUT&lt;/P&gt;&lt;P&gt;GET_INITIAL_LAYOUT&lt;/P&gt;&lt;P&gt;GET_KEY&lt;/P&gt;&lt;P&gt;GET_LAYOUTS&lt;/P&gt;&lt;P&gt;GET_SAVE_RESTRICTION&lt;/P&gt;&lt;P&gt;HAS_DEFAULT&lt;/P&gt;&lt;P&gt;SET_DEFAULT&lt;/P&gt;&lt;P&gt;SET_INITIAL_LAYOUT&lt;/P&gt;&lt;P&gt;SET_KEY&lt;/P&gt;&lt;P&gt;SET_SAVE_RESTRICTION&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 07:09:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419258#M1549089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-12T07:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419259#M1549090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this mean you did not and will not try to use the &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;refresh( refresh_mode  = if_salv_c_refresh=&amp;gt;full )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after setting the filters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 13:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419259#M1549090</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-11-12T13:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419260#M1549091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try to save the Variant using the FM LVC_VARIANT_SAVE_LOAD. I haven't tried it but it is being called when we manually try to save the Layout. You can get the Filters and change them and than save them using this FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 14:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419260#M1549091</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2010-11-12T14:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419261#M1549092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if I try it with your solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
gr_alv-&amp;gt;refresh( refresh_mode = if_salv_c_refresh=&amp;gt;full ).
  gr_alv-&amp;gt;display( ).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...i get the following error... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
     "OBJECTS_OBJREF_NOT_ASSIGNED_NO" "CX_SY_REF_IS_INITIAL"
     "CL_SALV_TABLE=================CP" bzw.
  "CL_SALV_TABLE=================CM014"
     "REFRESH"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; 
    1 method refresh.
    2
    3   check me-&amp;gt;r_controller is bound.
    4
    5   me-&amp;gt;r_controller-&amp;gt;set_changed(
    6     name         = 'CL_SALV_TABLE'
    7     method       = 'REFRESH'
    8     refresh_mode = refresh_mode
    9     flavour      = if_salv_c_changelist_flavour=&amp;gt;refresh ).
   10
   11   if refresh_mode = if_salv_c_refresh=&amp;gt;full.
   12     data: ir_adapter type ref to if_salv_adapter.
   13     ir_adapter = me-&amp;gt;r_controller-&amp;gt;IF_SALV_CONTROLLER_MODEL~R_ADAPTER.
&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;     IR_ADAPTER-&amp;gt;APPLY_SERVICES( me-&amp;gt;r_table ).
   15   endif.
   16
   17   me-&amp;gt;r_controller-&amp;gt;refresh( s_stable ).
   18
   19 endmethod.                    "refresh
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 11:03:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419261#M1549092</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-15T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Filter in an existing ALV- Layout</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419262#M1549093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is really a shame. Shame on me! Shame on SAlv!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could you possibly do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the SALV instance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load layout variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get filters, aggregations, sorts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ceate a new instance of SALV&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;merge new filters into existing filters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;apply filters, aggregations, sorts to new salv instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;display the new instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just an idea, but i think it could work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Nov 2010 17:10:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/set-filter-in-an-existing-alv-layout/m-p/7419262#M1549093</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-11-15T17:10:13Z</dc:date>
    </item>
  </channel>
</rss>

