‎2007 Feb 02 9:25 AM
please let me know is it posible to filering in alv report.please respond immediately....
‎2007 Feb 02 9:32 AM
Yes, U hav the Feature called Filtering Option once you call the FM: Reuse_ALV_grid_display. By using this Filter feature user can display the report according the values set in the filter.
By
Sunil
‎2007 Feb 02 9:36 AM
Yes It is possible to apply filters on ALV programatically .
Use the sample code in OOPS
DATA ls_filt TYPE lvc_s_filt .
ls_filt-fieldname = 'FLDATE' .
ls_filt-sign = 'E' .
ls_filt-option = 'BT' .
ls_filt-low = '20030101' .
ls_filt-high = '20031231' .
APPEND ls_filt TO pt_filt .
and pass the table pt_filt to set_table_display
IN alv list or GRID
FILL the structure SLIS_T_FILTER_ALV.
PLease reward if useful.
‎2007 Feb 02 9:37 AM
HI,
Filtering option is there. That icon is white colour icon (set filter ctrl+f5) is there. It is very much useful for the values are coming in the output to be modifyed by the endusers.
Thanks,
Shankar
‎2007 Feb 02 9:38 AM
Hi,
You can filter the ALV output. Click on filter icon and filter the output.
Use structure to initialise the field catalog
othewise the filter wont work perfectly.
regards
Shiva
‎2007 Feb 02 9:38 AM
Hi anil,
here a short extract with 2 Filter-Parameters as i use:
DATA: FILTER_1 TYPE SLIS_T_FILTER_ALV.
DATA: BEGIN OF ITEM_ALL OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
MATKL LIKE MARA-MATKL,
MAKTX LIKE MAKT-MAKTX,
KWMENG LIKE VBAP-KWMENG, "Menge Auftrag
VRKME LIKE VBAP-VRKME,
RFMNGJ LIKE VBFA-RFMNG, "Menge Lieferung
RFMNGR LIKE VBFA-RFMNG, "Menge Warenbewegung
RFMNGM LIKE VBFA-RFMNG, "Menge Faktura
END OF ITEM_ALL.
Filter für detail setzen
WA_FILTER-TABNAME = 'ITEM_ALL'.
WA_FILTER-FIELDNAME = 'KUNNR'.
WA_FILTER-SIGN0 = 'I'.
WA_FILTER-OPTIO = 'BT'.
WA_FILTER-VALUF_INT = KUNNR. "From Kunnr
WA_FILTER-VALUT_INT = KUNNR. "TO Kunnr
APPEND WA_FILTER TO FILTER_1.
*
WA_FILTER-TABNAME = 'ITEM_ALL'.
WA_FILTER-FIELDNAME = 'MATNR'.
WA_FILTER-SIGN0 = 'I'.
WA_FILTER-OPTIO = 'BT'.
WA_FILTER-VALUF_INT = MATNR. "From Matnr
WA_FILTER-VALUT_INT = MATNR. "To Matnr
APPEND WA_FILTER TO FILTER_1.
*
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = PROGNAME
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = FIELDCAT_1
IT_FILTER = FILTER_1
IT_EVENTS = EVENTS
IT_EVENT_EXIT = EVENT_EXIT
I_SCREEN_START_COLUMN = 20
I_SCREEN_START_LINE = 05
I_SCREEN_END_COLUMN = 100
I_SCREEN_END_LINE = 30
TABLES
T_OUTTAB = ITEM_ALL
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
Regards, Dieter
‎2007 Feb 02 1:49 PM