2020 May 28 9:37 AM
I have a cl_gui_alv_grid table on the main screen. I need to open another screen at the touch of a button. There is a container on this screen. Inside this container, I want to display a filter window with all the fields from the table. The filter window looks like when we select the columns and click filter. And there we filter each field from and to. Tell me how it can be done. What is the name of the filter class object? How do I create it? What table of fields should I give it?
2020 May 28 10:22 AM
What's wrong with using the standard filter function, if you use it without selecting a specific column you get a pop-up to select the fields you want to filter on. If you select all fields from there you should get your wanted result.
2020 May 28 10:30 AM
Hello pavel.akulin
Why not use the standard filter functionality?
Anyways, have a look at the FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG functions. The first one initializes the data for the second one. The second one shows the filtering window and has an option to show it as a subscreen (AS_SUBSCREEN) parameter.
Here is an example on how to use them, although not as a subscreen: https://answers.sap.com/answers/2637672/view.html
Here is SAP Help on the topic: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenfree_selections.htm?file=abenfree_sel...
Hope this helps.
Kind regards,2020 May 28 1:21 PM
I've got the same reaction as Arthur when I read your question, I don't understand why you need to do that. Can you explain why you want to do the same thing as the standard filter, just to open it inside a custom container?
If your question is just about how to debug the standard filter function, just start the debugger when the standard filter dialog is displayed.