Skip to Content
author's profile photo Former Member
Former Member

ALV filter

hi experts,

I wanna use the filter of ALV.. why doesn't it work. what should i set when i output the alv.

i use the CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

i_bypassing_buffer = 'X'

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • i_structure_name = <DYN_WA>

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

is_layout = gds_layout

it_fieldcat = gdt_field_cata

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • it_sort = gdt_sortinfo

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'X'

is_variant = gt_var

it_events = gdt_eventcat

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = <dyn_table>

EXCEPTIONS

program_error = 1

OTHERS = 2 .

who met this issue, please give me the solution

thanks and best regards,

Kevin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 31, 2007 at 09:54 AM

    Hi Kelvin,

    You have to define Field Symbols, Before using RESUSE_ALV_GRID_DISPLAY.

    Steps for ALV

    Step 1 : Data Declaration.

    Step 2 : Selecting the Variant for initial list display (Default Variant).

    Optional : Used only if report layout is maintained through variant management.

    Step 3 : Defining output characteristics: preparing display Field-catalog.

    Step 4 : Build a table for Events, which are used for firing both user commands and the system dependent events i.e. top of page, end of page etc.

    Optional : Required if the report has custom buttons, interactive properties etc or you need to display something at the top of page or end of page sections.

    Step 5 : Build the Layout for report display.

    Step 6 : Get the Selection Screen information in the report output.

    Optional : Required only if you need to display selection screen values in the report output.

    Step 7 : Specify the Sorting and/or Subtotaling of the basic list.

    Optional : Required when sorting and/or subtotaling is required for some columns in the report output.

    Step 8 : Finally display report output, using the following ALV functions modules:

    1. REUSE_ALV_FIELDCATALOG_MERGE

    2. REUSE_ALV_LIST_DISPLAY

    Or

    REUSE_ALV_GRID_DISPLAY

    Here is a Sample code.

    DATA: i_fcat TYPE slis_t_fieldcat_alv,

    wa_fcat TYPE slis_fieldcat_alv.

    wa_fcat-tabname = 'I_SFLIGHT'.

    wa_fcat-col_pos = '1'.

    wa_fcat-fieldname = 'CARRID'.

    append wa_fcat to i_fcat.

    wa_fcat-col_pos = '2'.

    wa_fcat-fieldname = 'FLDATE'.

    append wa_fcat to i_fcat.

    wa_fcat-col_pos = '3'.

    wa_fcat-fieldname = 'CONNID'.

    append wa_fcat to i_fcat.

    wa_fcat-col_pos = '4'.

    wa_fcat-fieldname = 'PRICE'.

    APPEND wa_fcat TO i_fcat.

    wa_fcat-fieldname = 'CURRENCY'.

    wa_fcat-no_out = 'X'.

    APPEND wa_fcat TO i_fcat.

    wa_fcat-fieldname = 'PLANETYPE'.

    wa_fcat-no_out = 'X'.

    APPEND wa_fcat TO i_fcat.

    In the function module pass :

    IT_FIELDCAT = i_fcat

    Hope this will help you.

    Darshan Patel

    <i><b>Please reward points to helpful answer. It Motivates us to Help Others.</b></i>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2007 at 07:01 AM

    Hi,

    If I understood your question correctly, you want to add filter functionality to your ALV Report, right?

    For adding filter option, just add button to your GUI Status with function code "&FLT". The standard functionality of filter will be added to your ALV report. No need to write any explicit code for it.

    Reward if answer is useful...

    Regards,

    Hema

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.