08-27-2011 7:41 AM
In my CL_SALV_TABLE application, I set a filter in the screen. I then run this code:
lr_filters = ir_salv_table->get_filters( ).
IF lr_filters->is_filter_defined( ) = abap_false.
EXIT.
ENDIF.
It always tells me there are no filters defined. But there are. I just defined them and can see them on the screen!
I've used cl_gui_cfw=>flush( ). I'm currently on 7.01 SP 7, and can't find a note for this. Any ideas?
08-27-2011 8:22 AM
Hi
I've never used CL_SALV_TABLE, anyway I've tried to create a report and get the filter in the a event (for double click, but I suppose it's the same for all event) and I can get the filters
Where are you placed your code?
Max
08-27-2011 8:22 AM
Hi
I've never used CL_SALV_TABLE, anyway I've tried to create a report and get the filter in the a event (for double click, but I suppose it's the same for all event) and I can get the filters
Where are you placed your code?
Max
08-27-2011 10:16 AM
I wish I hadn't used it! But I can't change it until next release of the software.
The CL_SALV_TABLE object is an instance in the same class as the method in which I'm getting the filters. Hmm. Interesting. When I debug an event triggered on the ALV - I can see the filter. The lack of filter is when I'm processing the PAI... Maybe there's more than one instance hanging around...
Edited by: Matt on Aug 27, 2011 11:19 AM
08-27-2011 10:27 AM
OK, debugging both calls, I noticed that the filters (in the cl_salv_table) object got updated automatically when processing the event, but not on the PAI.
So the solution was me->r_alv->get_metadata( ).
Which I should have known as I use it elsewhere in the application!