‎2008 Aug 26 1:03 PM
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
‎2008 Aug 26 1:06 PM
Are you setting any Filter, I mean passing Filter information to the ALV function.
If possible post the code here..
‎2008 Aug 26 1:14 PM
Hi Vijay
I am not setting any filter in my coding. In the display if we filter using the std tool available in grid and we go back to sel screen & execute again the filter which i put previously it is still active.
Regards
Sathar
‎2008 Aug 26 1:20 PM
I am not facing any issue like that. and also when you set the filter and see the filter results
Then you can see a button Delter filter next to Filter button, Shortcut: CtrlShftF2 , Delete the filter and try.
Ideally it should refresh the data. are you using Normal ALV Grid or OO ALV Grid.
‎2008 Aug 26 1:38 PM
Hi Vijay
I'm using OO ALV grid.
The user dont want to delete the filter. If he press back button & execute again he should be able to see the entire data.
I have seen one method named 'INIT_TOOLBAR' in class cl_gui_alv_grid . will it help?? It is a protected method and how can i use than in my program.
Also, seen one attribute 'MC_FC_DELETE_FILTER' in this class. I tried to use that like g_grid=>MC_FC_DELETE_FILTER but it is showing syntax erroe.
Regards
Sathar
‎2008 Aug 26 1:54 PM
I am sure Problem is with your code , even i tested OO ALV it is working fine for me.
You post the code if possible , or simulate the same on some test program and post it here..
‎2008 Aug 26 2:20 PM
MODULE display_alv_9001 OUTPUT.
CLEAR gt_fcat.
IF g_ref_control IS INITIAL.
CREATE OBJECT g_ref_control
EXPORTING
container_name = 'CONTROL'.
CREATE OBJECT g_ref_alv
EXPORTING
i_parent = g_ref_control.
PERFORM fieldcat.
PERFORM layout.
CALL METHOD g_ref_alv->set_table_for_first_display
EXPORTING
is_layout = gs_layo
CHANGING
it_outtab = gt_bsid
it_fieldcatalog = gt_fcat.
ELSE.
CALL METHOD g_ref_alv->refresh_table_display.
ENDIF.
ENDMODULE. " display_alv_9001 OUTPUT
MODULE back_command_9001 INPUT.
g_save_code = sy-ucomm.
CASE g_save_code.
WHEN 'BACK'.
LEAVE TO SCREEN 9000.
ENDCASE.
ENDMODULE. " back_command_9001 INPUT
‎2008 Aug 26 1:09 PM
Hello Sathar
You could define a layout for your ALV list showing all entries (i.e. no filtering) and define this one as default layout. For the filtered list you define another layout but do not set it as "default layout".
Regards
Uwe
‎2013 Jun 27 10:39 PM
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.