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 in ALV GRID report

Former Member
0 Kudos

Hi Friends ,

I have a ALV GRID report , and problem is , the filter

is working for certain line items and for other the filter is failing to filter and this has to be solved my me as soon as posible .

Kindly help me solving me this issue.

Regards

Anil

1 ACCEPTED SOLUTION

former_member480923
Active Contributor
0 Kudos

Hi,

If you are using the FM's fill in the I_filter table and pass it onto the FM REUSE_ALV_GRID_DISPLAY for the field and creae your ALV grid.

Hope This Helps

Anirban

5 REPLIES 5

former_member480923
Active Contributor
0 Kudos

Hi,

If you are using the FM's fill in the I_filter table and pass it onto the FM REUSE_ALV_GRID_DISPLAY for the field and creae your ALV grid.

Hope This Helps

Anirban

0 Kudos

Hi ,

Plz look at the code i have done , but still it does not work for certain line items.

DATA :

tt_filter TYPE slis_t_filter_alv,

lt_filter TYPE slis_filter_alv.

lt_filter-fieldname = 'FTEXT'.

lt_filter-tabname = 'F20'.

lt_filter-datatype = 'CHAR'.

APPEND lt_filter TO tt_filter.

CLEAR lt_filter.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = wf_repid

i_background_id = 'TYCOELECTRONICS_BACKGROUND'

i_grid_settings = wa_lvc_s_glay

is_layout = wa_layout

it_fieldcat = i_fieldcat[]

it_filter = tt_filter[]

i_save = wf_save

it_events = i_events

TABLES

t_outtab = icdpos[]

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

IS that right ?

Anil

0 Kudos

Hi,

Populate lt_filter with ref_fieldname i.e lt_filter-ref_fieldname = 'table-reference', then check the output data,

Rgds,

Message was edited by: Sailatha Nagasamudram

0 Kudos

sailatha ,

It did not work , i will try with field cat merge function module and come back.

If you have any other idea just inform me

Former Member
0 Kudos

Hi,

Populate the reference field when you are populating the field catalog, for ex, refer the code below,

GW_FIELDCAT-REF_FIELDNAME = GC_SETNAME.

If this doesnt help, use the function module REUSE_ALV_FIELDCATALOG_MERGE

Rgds,