-2

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

SELECTION-SCREEN BEGIN OF BLOCK BLOCK2 WITH FRAME TITLE text-001.
SELECTION-SCREEN COMMENT /1(79) label_4.
PARAMETERS: btn5    RADIOBUTTON GROUP RAD1 USER-COMMAND chk DEFAULT 'X',
            btn4    RADIOBUTTON GROUP RAD1,
            btn2    RADIOBUTTON GROUP RAD1,
            btn1    RADIOBUTTON GROUP RAD1,
            btn3    RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK BLOCK2.
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.
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
dragospirnut
  • 13
  • 1
  • 8
  • 1
    Please add a complete example, not just some arbitrary code snippet. – vwegert Oct 16 '17 at 08:11
  • Hi, i updated with definition of radiobuttons too.Then i call it_filter in reuse_alv : EXPORTING it_sort = it_sort – dragospirnut Oct 16 '17 at 08:15
  • What you did not add is the structure of the output table that you are trying to filter - hence my request for a **complete** example. – vwegert Oct 16 '17 at 11:29

1 Answers1

-2

in the mean time i figured out the answer , please find it below :

IF btn4 = 'X'.
    ls_filter-fieldname = 'MEINH'.  "Comenzi vrac
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'NE'.
    ls_filter-valuf_int = 'BUC'.
    APPEND ls_filter TO It_filter.

  ELSEIF btn5 = 'X'.
    ls_filter-fieldname = 'GMEIN'.  "Comenzi structura
    ls_filter-tabname = 'LT_JOIN'.
    ls_filter-sign0 = 'I'.
    ls_filter-optio = 'NE'.
    ls_filter-valuf_int = 'KG'.
    APPEND ls_filter TO It_filter.
  ELSEIF btn6 = '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.

    ls_filter-fieldname = 'MEINH'.  "Comenzi structura
    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.
dragospirnut
  • 13
  • 1
  • 8