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: 

After display Filter criteria not working with variant in ALV grid

Former Member
0 Kudos
587

Hi Expert ,

My requirement is after display the record if we filter any thing and save the layout and go back to selection-screen and select the same layout/variant ,it should display the output with filtering criteria.Suppose i have 10 records in display. I exclude 5 records in filter criteria & save the layout CUST_LAY.Now giving CUST_LAY in SELECTION SCREEN & it should display only 5 records not 10 records.my code is .....

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = lk_layout

it_fieldcat = i_tab_fieldcat[]

  • i_default = 'X'

i_bypassing_buffer = 'X'

i_save = 'A'

is_variant = k_variant

it_events = i_events[]

TABLES

t_outtab = i_get_final[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

Can any one please help me to get solve it.If we hide any column & save the layout,for that my program is working fine. Only filtering part is not working.

Thanks,

Manasi

4 REPLIES 4

Former Member
0 Kudos
102

Manasi,

Please comment i_save = 'A' "Comment

is_variant = k_variant "comment

i_default = 'X' "I think this is already commented(if not comment this too). and give a try.

Thanks,

Anitha A

0 Kudos
102

We can't comment i_save = 'A' "Comment

is_variant = k_variant "comment.

We need user specific layout and option to download .

0 Kudos
102

Hi

Do you mean sometimes the filter criteria are not stored in ALV layout?

Max

0 Kudos
102

Yes.

Let me give one example. Suppose i have 5 fields ( A ,B, C ,D, USERID ) & 10 records in ALV.Now i have 4 diff user within 10 records ( US1 2 records, US23 records, US31 record & US4-4 records ).Now i filter the record for US2 & save the layout

with name CUST_LAY. Now i come back to selection screen & give CUST_LAY & execute.Now in ALV display we should get only 3 records not 10 records.Kindly help me to solve it.Here we should not use any pre define filter criteria in program .My code is ...........

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = lk_layout

it_fieldcat = i_tab_fieldcat[]

i_bypassing_buffer = c_flag

  • i_default = c_flag

i_save = 'A'

is_variant = k_variant

it_events = i_events[]

TABLES

t_outtab = i_tab_cdreddisp[]

EXCEPTIONS

program_error = 1

OTHERS = 2.