Application Development and Automation 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: 
Read only

Filter

SG141
Active Participant
0 Likes
1,188

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
Read only

Former Member
0 Likes
1,069

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

Read only

SG141
Active Participant
0 Likes
1,069

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

Read only

SG141
Active Participant
0 Likes
1,069

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

Read only

former_member194669
Active Contributor
0 Likes
1,069

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

a®

Read only

0 Likes
1,069

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

Read only

0 Likes
1,069

Hi,

Dynamic selection of field values for filtering

a®

Read only

0 Likes
1,069

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....

Read only

0 Likes
1,069

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.........