2013 Jan 23 10:40 AM
Hi,
I have created a simple ALV using class CL_GUI_ALV_GRID. I have a requirement that I need to read the displayed ALV in the way it appears.
For example if user has sorted the ALV, then I need the internal table in that sort order only
OR
If user have set a filter on some fields, then I need the rows that are in display only
OR
If user have made some fields hidden than I need the internal table with those fields only ( may be with visible fields in structure or hidden fields as blank in actual internal table structure).
In short, I only need to read the table which is visible in ALV.
Please provide some solution.
Thanks
Manu B
2013 Jan 23 10:54 AM
In reuse alv we can use the function REUSE_ALV_GRID_LAYOUT_INFO_GET and in cl_gui_alv_grid there are methods like get_filtered_entries,get_sort_criteria,get_frontend_layout etc from which you can do a research.
2013 Jan 23 11:19 AM
That means do I need to to first find out in how many ways the ALV grid can be changed/ modified. Then use different methods of class to filter the internal table according to the criteria fetched from these methods ?
Is there any method or ways for which I need not to fetch what exactly user has done with the list and can get the displayed table directly, since there could be numerous ways of changing the ALV grid display.
Thanks
Manu B
2013 Jan 23 6:53 PM
Why are you doing this? I think knowing the purpose will help know what is needed versus what is possible.