Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Filters not defined? Yes they are, I just defined them!

matt
Active Contributor
0 Kudos

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?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

matt
Active Contributor
0 Kudos

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

matt
Active Contributor
0 Kudos

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!