Application Development and Automation 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: 
Read only

ALV filter

former_member650792
Participant
0 Likes
423

Dear Experts,

May i have information on ALV filter options. Is t possible to filter fields on ALV, i.e. totlal column of fields and remaing fields are display all values.

venkey

1 REPLY 1
Read only

Former Member
0 Likes
384

yes filteration is possible in alv...

please see the post

use like

DATA : IT_SORT TYPE SLIS_T_SORTINFO_ALV,

WA_SORT TYPE SLIS_SORTINFO_ALV,

WA_SORT-TABNAME = 'IT_OUTPUT'. " your internal table name

WA_SORT-FIELDNAME = 'AMOUNT'. " field name for Amount

WA_SORT-UP = 'X'.

WA_SORT-GROUP = 'X'.

WA_SORT-SUBTOT = 'X'.

APPEND WA_SORT TO IT_SORT.

CLEAR WA_SORT.

WA_SORT-TABNAME = 'IT_OUTPUT'.

WA_SORT-FIELDNAME = 'CURRENCY'. " field name for currency

WA_SORT-UP = 'X'.

WA_SORT-GROUP = 'X'.

WA_SORT-SUBTOT = 'X'.

APPEND WA_SORT TO IT_SORT.

CLEAR WA_SORT.

and

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'

I_GRID_TITLE = ''

IS_LAYOUT = GS_LAYOUT

IT_FIELDCAT = IT_FIELDCAT

IT_SORT = IT_SORT

  • IT_FILTER = IT_FILTER

I_DEFAULT = 'X'

I_SAVE = 'A'

TABLES

T_OUTTAB = IT_OUTPUT

EXCEPTIONS

PROGRAM_ERROR = 1

OTHERS = 2.

IF SY-SUBRC 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.