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: 

Filter

SG141
Active Participant
0 Kudos

I want to have a Filter option in my module pool program screen.......

is there any sample code/ program to obtain this functionality....

Message was edited by:

Karthik

8 REPLIES 8

Former Member
0 Kudos

When the user presses the filter button, you call a popup that has the field that you want to filter. Then you take the value entered and loop at the main internal table and pass only those values that make it through the filter back to the table control.

Rob

SG141
Active Participant
0 Kudos

is there a function module available or do i need to code the logic......

SG141
Active Participant
0 Kudos

this is a specific function module which displays popup's ......for this functionality....

former_member194669
Active Contributor
0 Kudos

Hi,

I don't have sample code, but here is the steps

1. create button in the toolbar as 'Filter"

2. Once user click on this , then call following function modules and get the filter values


* Init free selection dialog
      call function 'FREE_SELECTIONS_INIT'
        exporting
          expressions  = i_expr
        importing
          selection_id = v_selid
          expressions  = i_expr
        tables
          tables_tab   = i_tables
        exceptions
          others       = 1.
    endif.

* Display free selection dialog
    call function 'FREE_SELECTIONS_DIALOG'
      exporting
        selection_id            = v_selid
        title                   = 'Selection'
        status                  = 1
        as_window               = 'X'
      importing
        expressions             = i_expr
        field_ranges            = i_ranges
        number_of_active_fields = v_active
      tables
        fields_tab              = i_fields
      exceptions
        others                  = 1.

3. In PBO filter the output table values according to values you are getting out of these above said function module

May this will help you

0 Kudos

what does the two function module do........

0 Kudos

Hi,

Dynamic selection of field values for filtering

0 Kudos

This filter should exactly as in the alv grid.............

When iam using this fm...getting dump...since no values are passed in the expression,

selection id , ranges etc....

0 Kudos

I think i did'nt quite communicate the my question...........I have a table control on the screen.....this filter behaves in the same like in ALV grid.........