Skip to Content
avatar image
Former Member

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


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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 19, 2007 at 02:18 PM

    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' )


    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.