2023 Oct 19 5:23 PM
Hi all,
I´m trying to define a filter in a report program using REUSE_ALV_GRID_DISPLAY_LVC. The filter is defined as:
gt_filter TYPE lvc_t_filt.
The ALV call is really simple:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = gv_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
is_layout_lvc = w_layout
it_fieldcat_lvc = i_fieldcat
it_filter_lvc = gt_filter
TABLES
t_outtab = gt_alv
The problem is that, when I call the 'REUSE_ALV_GRID_DISPLAY_LVC' function, the program displays the filtered info correctly but every time the function is called the ALV grid “stack” grows, so I need to press F3 (Back) several times in order to return to the main Selection-screen screen.
How can I avoid this?
Any ideas?
TIA,
Luis
2023 Oct 19 5:52 PM
Hi,
Why not just fill gt_filter if it's empty?
Regards, Eduardo.
2023 Oct 19 6:43 PM
Eduardo:
My apologies. When I wrote "defined" I meant the type of variable. GT_FILTER has values. After all, the data gets filtered properly. It´s something like this:
gt_filter = VALUE #(
( fieldname = 'MTART'
tabname = 'MARA'
sign = 'I'
option = 'CP'
low = wa_ifields-value )
).
My problem is the "stacking" of the ALV.
2023 Oct 19 9:36 PM
Hi Luis,
Could it be that you are constantly calling REUSE_ALV_GRID_DISPLAY_LVC?
Also, why not use ALV OO or CL_SALV_TABLE?