cancel
Showing results for 
Search instead for 
Did you mean: 

ALV Question : How to set filter condition which contain dummy character?

0 Kudos

Hi,

I want to set filter condition of ALV dynamicly (In my code),

for example, set 'X' as filter condition in column "Description",

I add the code successfully, but I can't get the correct filtered result, Why?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Please post ur code here.

U have to get a handle to the IF_SALV_WD_FILTER interface

data ref_filter type ref to IF_SALV_WD_FILTER .

ref_filter ?= m_config_model->IF_SALV_WD_FIELD_SETTINGS~GET_FIELD( 'FIELD DESCRIPTION' )

ref_filter->CREATE_FILTER_RULE(

low_val = 'X'

).

Now when u load the ALV tabl;e u should see a X value in the filter row, for the column 'FIELD DESCRIPTION' and the filter should happen.

As I said, pls paste ur code here.

0 Kudos

Thank you,

But it is not right answer, I try many times, and get the solution:

we should change the parameter "OPERATOR" of method CREATE_FILTER_RULE from "EQ" to "CP", then it will work.