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: 

filtering ALV not working abap

manole_apetroaie
Participant
0 Kudos

Hi!,

I have the following code which is not filtering columsn for radio button : btn4 and btn5.For radio buttons btn1 and btn3 is working fineDo you have any ideea why? Cheers

  
Refresh it_filter.
if btn1 = 'X'.
    ls_filter-fieldname = 'COMDEP'.  "Filtru data comanda intre doua date calendaristice pentru Depasit radiobuton "
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'EQ'.
    ls_filter-valuf_int = 'Depasit'.
    APPEND ls_filter TO It_filter.  ELSEIF btn3 = 'X'.
    ls_filter-fieldname = 'COMDEP'.  "Filtru data comanda intre doua date calendaristice pentru Nedepasit radiobuton "
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'EQ'.
    ls_filter-valuf_int = 'Nedepasit'.
    APPEND ls_filter TO It_filter.
  ELSEIF btn4 = 'X'.
    ls_filter-fieldname = 'GMEIN'.  "Comenzi vrac
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'EQ'.
    ls_filter-valuf_int = 'KG'.
    APPEND ls_filter TO It_filter.
  ELSEIF btn5 = 'X'.
    ls_filter-fieldname = 'MEINH'.  "Comenzi bucati
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'EQ'.
    ls_filter-valuf_int = 'BUC'.
    APPEND ls_filter TO It_filter.
  EndIf.
1 REPLY 1

pokrakam
Active Contributor

Swap the button conditions around just as a test - i.e. btn5 at the top with btn1 filter. Then you’ll see if it’s the filtering or the buttons.

Else just debug...