Delete Filter in ALV

Hi there,
i am using SALV in my view and i enabled the filterfunction. Question: Does exist a method with which i can delete the filter set by user e.g. on Button-Click?
D. Wallner

Hi,
Just look at the reply given by Prashant in this thread: Re: how to delete filter in alv table. It meight be helpful.
Regards
Arjun

Similar Messages

  • ALV OM - keep filter while deleting lines from ALV

    Dear all,
    I'm using an ALV (cl_salv_table) to get a proposallist of materials and substances to be linked. When a material is linked to a substance, all lines for this material are deleted from the ALV. So far, so good.
    When a user sets a filter on a certain column and links a material, the filter icon on top of the column is shown while the records are not filtered accordingly. When the user selects the column again en pushes the filter button, the value that was set in the first place, is shown.
    edit : I've "solved" this problem myself by getting a list of all filters, clearing lr_filters and filling lr_filters up again from this list.I        don't think this is a very clean sollution to the problem, but it works.
    How can I resolve this problem in a better way? Thanks in advance.
    Cheers.
    Luk
    Edited by: Luk Declerck on Dec 16, 2009 4:28 PM

    U can do all validations in the event data_changed_finished.
    ****----EVENT HANDLING.....*****
    *------Class definition
    CLASS lcl_event_handler DEFINITION .
      PUBLIC SECTION.
       METHODS handle_data_changed_finished FOR EVENT data_changed_finished
      OF cl_gui_alv_grid IMPORTING e_modified ET_GOOD_CELLS.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *-----Class implementation
    CLASS lcl_event_handler IMPLEMENTATION.
                      "handle_usercom
    **----DATA changed
      METHOD handle_data_changed_finished.
        PERFORM handle_data_changed_finished USING e_modified
    et_good_cells
      ENDMETHOD.
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    FORM handle_data_changed_finished using i_modified type char01
                                            i_good_cells type LVC_t_MODI.
    data: wa_good_cells type lvc_s_modi.
    // Perform ur validation here
    endform.

  • How to filter standard ALV report with custom UI element?

    Hello Expert,
    I got a requirement to filter standard ALV report based on the custom UI element (which is created in the screen before displaying the ALV report). Upon entering the values in the Custom field, the ALV report is displayed accordingly.
    Any ideas how to approach it?
    Thanks,
    Mohammed

    Hi,
    Okay, let me explain the steps in detail
    Let us say you have alv table with 10 records and alv table is shown first time with all 10 records
    Create an internal table in component controller's attribute GT_ORIGINAL_DATA and save all 10 records into this table first time
    Now, user enters value in FILTER_MATNR field 123 and press apply_filter button or press enter key
    Read the value of field filter_matnr and get the only matching records from global internal table GT_ORIGINAL_DATA into local internal table as below
              data lv_matnr type matnr.
              data lt_data   like wd_comp_controller->gt_original_data.
                   " read the value from context attribute of filter_matnr
                        lv_matnr = ???
                   " copy all data into local table
                        lt_data[] = wd_comp_controller->gt_original_data.
                   "delete the records which does not match
                     delete lt_data where matnr NP lv_matnr.
    Now, bind the data lt_data to context node of alv table
    Hope this helps you.
    Regards,
    Rama

  • How to get Inserted and Deleted Rows in ALV

    I have looked at the BC_EDIT* examples but I still can't figure out how to determine which rows were Inserted and Deleted from the ALV list.  Can someone please provide me the code to do this?
    Thanks.
    Sandy

    Hi sandy,
    i dont think you will have issue in inserting a row in ALV because whenever the user done some actions say for eg clicking the pushbutton at the toolbar you could insert the a new row into the ALV.for creating pushbutton you need to use the events TOOLBAR,USER_COMMAND.
    deleting a row may also follow the above procedure.
    Have a look at the demo program
    BCALV_GRID_05
    Cheers,
    Abdul Hakim

  • How to capture the values after applying filter in ALV.

    Hi,
    I have an ALV in my application with 10 projects displayed. Out of those 10 projects, 5 projects have banking as industry.
    when you filter the ALV based on industry banking I get 5 projects .In run time  how  can  I capture only these 5 projects. when I debugged and saw the ALV table node is holding 10 prj not 5 prj.
    How can  read only those 5 values. Kindly help me out with sample code.
    Thanks,
    Priya

    Hi,
    The class name is correct - CL_SALV_WD_FIELD. When you refer the model object(CL_SALV_WD_CONFIG_TABLE-IF_SALV_WD_FIELD_SETTINGS) this will return the field for which
    you have applied filter by passing the field name.
    Before you try out this approach, check the ALV event ON_CELL_ACTION fro that column name to capture the filtering value. Based on this loop at the table where field eq <<filerting value>> and get the filtered records.
    As you have get_static_attributes_table it deosnot return the filtered values.
    Regards,
    Lekha.

  • Delete filter

    Hi,
    I used the filter option to filter the values of a table. But when I run the next time the filter is still there. I am unable to delete this filter. So I tried the below code to delete the filter.
    Delete Filters
      data:
      lref_filter type ref to cl_salv_wd_field.
      lref_filter =  lr_config_model->if_salv_wd_field_settings~get_field( 'CUSTOMER' ).
      lref_filter->if_salv_wd_filter~set_filter_allowed( ABAP_TRUE ).
      lref_filter->if_salv_wd_filter~delete_filter_rule( ).
    But this code is also not working. Every time I run the application the filter is automatically applied and I need to manually delete this filter to see the results.  And this is happening only for my user.
    Appreciate your inputs on this.
    Thanks,

    Hi,
    find the below code to delete filter rule.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv_use( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
      lo_interfacecontroller =   wd_this->wd_cpifc_alv_use( ).
      DATA lo_value TYPE REF TO cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model(
      DATA lr_field_settings TYPE REF TO if_salv_wd_field_settings.
      DATA lr_field TYPE REF TO cl_salv_wd_field.
      lr_field_settings ?= lo_value.
    clear lr_field.
      lr_field = lr_field_settings->get_field( 'ZZAGREEMENT_ID' ). " your column name
       lr_field->if_salv_wd_filter~delete_filter_rule( ).
       clear lr_field.
      lr_field = lr_field_settings->get_field( 'ZZ_STATUS' ). " your column name
       lr_field->if_salv_wd_filter~delete_filter_rule( ).
    Like this you can delete filter rules for the table coulmns.
    Regards,
    Lakshmi.

  • Custom buttons in SORT FILTER  at  ALVs

    Hi all ,
    Please let me  know  how to  attach  custom   push buttons to the  Standard one  ( sort  , filter  in alvs  )
    Regards
    Aslam..

    Hi ,
    Please search SDN before posting.
    There are many threads on this topic.
    If you are using 'REUSE_ALV_GRID_DISPLAY'  then pass your PF status with desired functions to parameter i_callback_pf_status_set .
    In factory method
      CALL METHOD go_table->set_screen_status
        EXPORTING
          report        = gv_cprog
          pfstatus      = gc_gui_status
          set_functions = go_table->c_functions_all.
    Hope this helps you.
    Edited by: Harsh Bhalla on Jan 6, 2010 8:48 AM

  • Keyboard delete button and alv response

    Hello friends,
    I have a problem with editable alv.
    In alv grid if i select a line and press the delete button on the keyboard,  then the data is getting deleted.
    i do not want that to happen.
    how can i stop it from happening?
    Note: I am not talking about the delete icon which alv provides. I mean the DELETE BUTTON ON THE KEYBOARD

    I know what you mean, but surely when you are typing it makes sense to have a backspace key and not delete as the cursor is ahead of the error.
    Also, a simple tap on the screen at the place you want to edit also means that you can position the cursor after the error. Then, again, you can use the backspace key.
    Personally, I have never felt the need for a delete key, but you should leave feedback for Apple at http://www.apple.com/feedback/ipad.html
    I presume you are aware that if you hold your finger on the screen that you can move and select text anywhere on the screen.

  • Hide "Delete Filter"/ "Filter" - Link in POWL

    Dear all,
    We are on configuring the POWL of our SRM-Portal.
    We have standard filters in the list, we want to have for all users.
    Could you please tell me how we can hide the "Delete Filter" - Link/Button in the POWL?
    Thank you.
    Best regards,
    Thomas

    We don't need a solution anymore. We will let this button/link visible.

  • Removing filter for ALV grid

    Hi friends
    I am using an ALV grid to display my data. Once i used the filter in grid to filter some datas and go back to selection screen & executed the report again, the filter is still active and not showing all datas. How to avoid this.
    Regards
    Sathar

    Hi Abdul Sathar
    I find the solution if you are using ALV OO.
    For delete the ALV's filter call the method SET_FILTER_CRITERIA and send the parameter IT_FILTER with a itab empty.
    I hope this help you.

  • Set Filter in ALV report, blank screen returned

    I have a standard ALV report (uses REUSE_ALV_GRID_DISPLAY).  The user has to be able to filter the results based on entries from certain columns.
    When I try to filter any columns other than a column with a date a blank screen is returned.
    This filtering problem only exists with the Single value field. I can filter the results in the "select ranges", "exclude values" and "exclude ranges" without any problems.
    Any suggestions?
    Edited by: Damien Crowe on Jul 6, 2009 5:09 PM
    Set the fieldcatalog-edit_maskto "==ALPHA".
    Edited by: Damien Crowe on Jul 14, 2009 5:35 PM

    what was the solution to this problem?
    Thanks

  • Filter in alv report

    hello!
    i have a weird problem in alv report with the filter function.
    for example the field serial like viqmel-serial, if it contains the value for example 1234 the filter want work. if it contains the value N16 the filter will work.
    i cant understand what might be the problem.
    another information that concerns this field is that the ls_fieldcat-inttype is 'C'  and that the intlen eq ' '.
    thanks
    yifat

    I think your problem is with internal/external format.  The reason that N16 works, is because in the database it is  stored as N16.  The reason why 1234 doesn't work, is because it is stored in the database as 000000000000001234.   I suggest that you make sure that you filter includes the internal format.   You could use a function module to convert it.
    <b>
    CONVERSION_EXIT_ALPHA_INPUT
    </b>
    Regards,
    Rich Heilman

  • How to remove the the standard button APPEND/INSERT/DELETE in webdynpro alv

    Hello,
    how to remove the the standard button APPEND/INSERT/DELETE in webdynpro-abap  alv
    Thanks
    Rakshar

    Use  this.
        data lo_cmp_usage type ref to if_wd_component_usage.
        lo_cmp_usage =   wd_this->wd_cpuse_alv1( ).
        if lo_cmp_usage->has_active_component( ) is initial.
          lo_cmp_usage->create_component( ).
        endif.
        data lo_interfacecontroller type ref to iwci_salv_wd_table .
        lo_interfacecontroller =   wd_this->wd_cpifc_alv1( ).
        data lo_value type ref to cl_salv_wd_config_table.
        lo_value = lo_interfacecontroller->get_model(
        data: lr_std type ref to if_salv_wd_std_functions.
        lr_std ?= lo_value.
        lr_std->set_export_allowed( abap_false ).
    NOte: ALV1 is alv component name
    Regards
    Srinivas
    Edited by: sanasrinivas on Dec 1, 2011 6:11 AM

  • Deleting rows in alv report.

    Hi Experts,
                I want to delete a row in alv report output, It is duplicating  records in the report  and 'GRAND TOTAL' also be displayed . In under the report . <<removed_by_moderator>>
    Thanks,
    Dinesh.B
    Edited by: Vijay Babu Dudla on May 11, 2009 9:15 AM

    Hi,
    use the following code for deleting duplicate and adjacent records from itab
    delete ADJACENT DUPLICATES FROM itab.
    or
    sort itab by pernr.
    delete ADJACENT DUPLICATE FROM itab COMPARING pernr.
    Also, for grand total you can use fieldcat-do_sum    =  'X'  with the field catalog. It will give you total for the required column.
    Hope this solves your problem.
    Regards,
    Ibrar Munsif.

  • Lead Selection does not work after setting filter for ALV.

    Hi, Can you please suggest on below scenario :
    I have a Node with a sub node in it .
    I am using the supply function on Sub Node to retrieve the date based on Parent Node.
    There are two ALV's to display parent and item data. The issue is when a filter(user defined filter) is done on Parent table, the supply function does not work. The value is that of the selected row before setting the filter. Even after removing the filter, the item data is stuck and does not change on Lead Selection.
    One thing I noticed is if the child table is a table UI, there is no issue. The only problem is when the second table is ALV
    Thanks In Advance

    Hi Prashanthi,
    Your issue can be resolved as below
    Create an event handler method 'set_alv_data'  for the event 'ON_LEAD_SELECT' of parent alv
    Write the below code inside the event handler method
    METHOD set_alv_data.
      DATA lo_node TYPE REF TO if_wd_context_node.
      DATA lv_path TYPE string.
      DATA lv_index TYPE string.
      lv_index = r_param->index.
      CONDENSE lv_index.
      CONCATENATE wd_this->wdctx_my_parent_node
      lv_index
      wd_this->wdctx_my_child_node
      INTO lv_path SEPARATED BY '.'.
      lo_node = wd_context->path_get_node(
          path                          = lv_path
      DATA lo_interface TYPE REF TO iwci_salv_wd_table.
      lo_interface = wd_this->wd_cpifc_alv_child( ). "get the ref of alv comp of child
      lo_interface->set_data(
        EXPORTING
    *    only_if_new_descr =
          r_node_data       = lo_node
    ENDMETHOD.
    The above code sets the data node of child alv based on lead selection of parent alv data.
    Note: Replace 'parent_node', 'child_node'  with your nodes & 'alv_child' with your alv component name of child alv.
    If you want to control the data of child alv on filter function, you can use the event ON_STD_FUNCTION_AFTE and once you define the filter you get the r_param->id = 'SALV_WD_FILTER_DEFINE'  & now you can clear data of child alv.
    Hope this helps you.
    Regards,
    Rama

Maybe you are looking for

  • Getting multiple XML elements with UCCX 4

    I am trying to pick up multiple elements with identical tags from an XML file. (Example) <NAME1> <PHONE>123-1234-3456</PHONE> <PHONE>506-245-5566</PHONE> </NAME1> I am able to pick up the first PHONE, but when using a second Get XML step I get the sa

  • Problem with doing Cleansw

    I can't find the CTZAPXX.EXE program on my cd. (I have SBLi've! Value) So I looked in my Programs files and found it. But it wouldn't run and clicking it with the mouse restarted my computer. Then I found this CTUninstal. This is what popped up: <IMG

  • Downloading zipped files error?

    This may be a little silly, however, I'm trying to download the suport docs from https://websmp201.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000713358&_SCENARIO=01100035870000000202 - however, whne I try the zipped files, I get the following error.

  • ServletContext-Gentral Exceptrion

    "hai All ,           this exception some time occur and get hungs please help it out,           thanks           Thu Apr 11 14:45:28 CEST 2002:<E> <ServletContext-General> Servlet failed with Exception           java.lang.RuntimeException: IOExceptio

  • Static shopping cart urls

    Hi, I have a fancybox setup so that when a product gets added to the cart, a pop-up appears displaying the cross-selling products for that particualr item. At the top of the pop-up are 2 buttons - continue shopping (simply closes the box), and Contin