Filter is not working in ALV GRID output using FM 'REUSE_ALV_GRID_DISPLAY'

Hello Experts,
I have searched SCN before posting this thread.
In my report output (by using 'REUSE_ALV_GRID_DISPLAY'), i am trying to filter values which is of type CHAR.
Unable to filter by char30 field in the report output.
Tried to filter using the following steps:
Selected the column which i want to filter-> then selected filter symbol of ALV toolbar.
Selection screen appeared where select-option of that field displayed.
Selection screen only allows user to enter 1 character.
Even though the field contains 30 characters the filed in selection screen appeared with 1char length.
This is the same for all the fields in that ALV. Please suggest how can i change the field length to original field length.

In field catalog pass:
wa_alv_fieldcat-outputlen   = p_len
Set p_len as 30.
'FIELD'            text-001   '01' 'X'  '30'  'L'

Similar Messages

  • Action for ENTER KEY is not working in alv grid output (Classical)

    Hi Experts,
      I have searched SDN around 8 hours and could not get any help on my below issue.
      I am developing ALV report using function module (Classical ALV). ALV output has 4 input enable fields, if user enters data in any of those fields and clicks on enter button from key pad..the remaining fields needs to be filled automatically.
      I am facing the issue with enter key, even if i press enter key in the output there is no action and hence no user command triggered. May be i am using wrong funcion code in wrong way.
      Could any one tell me what function code can we assign for ENTER action in PF-STATUS?
    Regards,
    Murali Mohan

    Hi
    Try this simple code, it works fine:
    TYPE-POOLS: SLIS.
    DATA: BEGIN OF ITAB1 OCCURS 0,
           BUKRS LIKE T001-BUKRS,
           BUTXT LIKE T001-BUTXT,
          END OF ITAB1.
    DATA: GT_FIELDCAT   TYPE SLIS_T_FIELDCAT_ALV,
          GT_REPID    LIKE SY-REPID.
    START-OF-SELECTION.
      SELECT BUKRS BUTXT INTO TABLE ITAB1
         FROM T001.
    END-OF-SELECTION.
      GT_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = GT_REPID
          I_INTERNAL_TABNAME = 'ITAB1'
          I_INCLNAME         = GT_REPID
        CHANGING
          CT_FIELDCAT        = GT_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = GT_REPID
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          IT_FIELDCAT              = GT_FIELDCAT
        TABLES
          T_OUTTAB                 = ITAB1.
    FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                          RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'ENTER'. MESSAGE I208(00) WITH 'Pressed ENTER key'.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    FORM SET_PF_STATUS  USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'LIST_ALV' EXCLUDING RT_EXTAB.
    ENDFORM.                    "SET_PF_STATUS
    Max

  • Problem in displaying Alv grid output  using oops........

    hi,
    i have two problems in displaying ALV grid output Using Oops.
    1) How to modify the fieldcatalog after we getting a field catalog using general FM.
    2) initialy it is displaying 13 fields but there are 63 fields .
       eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count  of displayed fileds are same . how can display 63 fields at a time .

    Hi,
    You can chnage using below code:
    loop at gt_fieldcat.
    if <gt_fieldcat-field_name> = 'FIELDNAME'.
    endif.
    modify gt_fieldcat.
    clear gt_fieldcat.
    endloop.
    Make sure that all the field should not have no_out = 'X' and tech = 'X'.
    Thanks,
    Sriram Ponna.

  • Sub:Filtering is not working in ALV Grid

    Hi All,
    I developed a new ALV report,where in the out put i can set filtering for other columns(ex:Date,Number),but i can'nt able to set Filtering for one of the column which is CHAR type.
    But when we went to table for this field filtering is working,but not in the ALV Grid  of our report.
    Regards,
    Seshadri G

    hi,
    1) for filtering, we create an internak table of type <b>LVC_T_FILT</b>,
    U can assign fields to the above created internal as per u requirements.
    2) passing the above internal table to CHANGING parameter of method SET_TABLE FORFIRST_DISPLAY in ALV GRID.
    <b>IT_FILTER = < internal table TYPE LVC_T_FLIT>.</b>
    <u><b>OR call this method for setting filter criteria as per u r requirement.</b></u>
    Set current filter settings. A row of the table describes the selection conditions for column entries that are not to be displayed.
    You should never manually set up the internal table with the filter settings. Use this method only to set filter criteria that you got using get_filter_criteria or a layout.
    Features
    CALL METHOD <ref. var. to CL_GUI_ALV_GRID > ->set_filter_criteria
       EXPORTING
          IT_FILTER  =   <internal table of type LVC_T_FILT > .
    Parameter
    Meaning
    IT_FILTER
    Table with filter settings
    regards,
    AshokReddy.
    Message was edited by:
            Ashok Reddy
    Message was edited by:
            Ashok Reddy

  • Colwidth_optimize not working for alv grid report

    Hi friends,
             I have developed an ALV grid report using 'REUSE_ALV_GRID_DISPLAY'.  The field catalog field columns are having the heading size more than 30 characters. So, to optimize the size of the headings, I am using SLIS_LAYOUT_ALV  and passing the value 'X' to colwidth_optimize.
    but still the column heading is not getting fully display. Rather it is display first 20 characters only.
    For your reference please find the code snippet
    *bold* **************** declarations ************************ *bold*
    DATA : fieldcat       TYPE slis_fieldcat_alv,
                 t_fieldcat     TYPE slis_t_fieldcat_alv,
                ws_layout      TYPE slis_layout_alv.
    *bold* **************** field catalogue ********************** *bold*
      CLEAR fieldcat.
      fieldcat-fieldname     = 'RFWRT_PD_MTRL'.
      fieldcat-seltext_m = 'Pending Quotation Spares Value'.   {quote} this heading not getting fully displayed {quote}
      fieldcat-tabname       = 'IT_FNL'.
    ***    FIELDCAT-REF_TABNAME   = 'VBFA'.
      fieldcat-col_pos       = col_pos.
      APPEND fieldcat TO t_fieldcat.
      ADD 1 TO col_pos.
      CLEAR fieldcat.
      fieldcat-fieldname     = 'RFWRT_PD_SERV'.
      fieldcat-seltext_m = 'Pend Quot-JobWorkVal'.
      fieldcat-tabname       = 'IT_FNL'.
      fieldcat-col_pos       = col_pos.
      APPEND fieldcat TO t_fieldcat.
      ADD 1 TO col_pos.
      ws_layout-colwidth_optimize = 'X'.
    *bold* ****************************** alv grid function call ******************** *bold*
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *    i_buffer_active                         = space
          i_callback_program                  = sy-repid
         i_callback_user_command        = 'USER_COMMAND'
    ***   i_callback_pf_status_set           = 'PF_STATUS'
    *   I_STRUCTURE_NAME                  =
         it_fieldcat                        = t_fieldcat[]
         is_layout                          =  ws_layout
        TABLES
          t_outtab                          = it_fnl
       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.
      CLEAR wa_fnl.
    Please look into it.
    Searched the forum for the similar issue. but didnt got any solution.
    Thanks and regards,
    Murali Krishna

    Hi DaveL,
    Thanks alot for your help. My problem solved.
    Can you please suggest me how we can optimize the column based on the total amount which is summed up (fieldcat-do_sum)
    Regards,
    Murali.

  • Filter Not working in ALV grid

    Hi All,
    The filter button in ALV Grid is not working for some fields. if the filter button is selected for a particular field in the ALV grid then no entries are getting displayed in the ALV. For few fields it is working. for few fields is it not displaying any entries after selecting filter.
    Please let me know what may be the possible causes for this issue.
    Thanks in Advance!
    Thanks & Regards,
    Preethi G

    Hi,
      Ex: your output is something like this
      A                     B                         C
      1                    2                             3
      4                    2                              5
      5                    3                              6
    When you filter B for value 2, then internally it creates one more internal table like this
    A                    B                         C
    1                002                         3
    4                002                         5
    5                003                         6
    it tries to matches value 2 to 002 and it fails to retrive the record.
    The solution is try to do the conversion exit on the column/field you are trying to filter it. It will work.
    Regards,
    Ramesh.

  • Tab not working on ALV report output in Persona

    In normal SAP GUI we can move the cursor position on ALV report output between different column by pressing TAB on keyboard. But in case of persona 2.00, TAB doesn't work and we have to click on each cell of the report output whatever we want to highlight. Is there any settings or SAP note we can implement to so TAB will work on persona.
    Thanks,
    harkamal

    Hi Devendra Singh,
    I think it's not possible to show all field values in another Language (Eg Thai) But it's possible if it's short Text, Long Text etc
    SE63 and follow menu
    Translation
    ABAP Objects
    Short Text / Long Text Etc..
    AND
    Translation
    NON ABAP Objects
    For that also you have to maintain it first in SE63..
    [SAP Help1|http://help.sap.com/erp2005_ehp_04/helpdata/EN/77/5719d2492011d1894a0000e829fbbd/frameset.htm]
    [SAP Help2|http://help.sap.com/erp2005_ehp_04/helpdata/EN/b4/54601d77f38e429ffad9e3e11c1b25/frameset.htm]
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya

  • Change order of key figure is not working in Web report output (using WAD)

    Hi,
    We are using BI 7.0, release 701 and level 008. We are facing problem in WAD (web report output). When ever we do 'Select filter' for key figures and 'change the order' of key figures, it does not get reflected in new order. Though drag and drop of key figures is working.
    Though same change order is working fine in Bex Analyser.
    Kindly suggest some inputs.
    Thanks.

    Hi,
    On Which Service Pack are you on?WAD has this feature of re arranging the keyfigures in BI 7.0 for SPS 14...
    Regards,
    Bhagyarekha.

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • Date format under filter criteria is not right in ALV Grid

    When a date is chosen from the available dropdown values, the value transferred gets extraneous characters and filter does not work.
    I've Provided the Screenshots Below:
    WHAT TO DO ? PLEASE SUGGEST.

    Hi
    ls_fieldcat-col_pos = l_pos.
      ls_fieldcat-fieldname = 'DATAB'.
      ls_fieldcat-reptext_ddic = 'From Date'.
      ls_fieldcat-ref_tabname = 'IT_FINAL'.
    *   ls_fieldcat-DATATYPE = 'erdat'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO l_fieldcat.
    Your definition is wrong because you don't indicate the TYPE of your field, so if you want to do by yourself:
    ls_fieldcat-col_pos = l_pos.
      ls_fieldcat-fieldname = 'DATAB'.
      ls_fieldcat-reptext_ddic = 'From Date'.
    ls_fieldcat-ref_tabname = 'IT_FINAL'.
      ls_fieldcat-DATATYPE = 'erdat'.
      ls_fieldcat-DATATYPE = 'DATS'.
    ls_fieldcat-INTTYPE = 'D'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO l_fieldcat.
    If you want to use a dictionary reference:
    ls_fieldcat-col_pos = l_pos.
      ls_fieldcat-fieldname = 'DATAB'.
      ls_fieldcat-reptext_ddic = 'From Date'.
    ls_fieldcat-ref_tabname = 'IT_FINAL'.
    *   ls_fieldcat-DATATYPE = 'erdat'.
      ls_fieldcat-ref_tabname = 'BKPF'.
    ls_fieldcat-ref_fieldname = 'BUDAT'.
      ls_fieldcat-no_zero = 'X'.
      APPEND ls_fieldcat TO l_fieldcat.
    But you can use dictionary reference you want it's important the field is a date
    Max

  • Search help (PREM) for personal no. is not coming in ALV grid table control

    hi experts,
    Search help (PREM) for personal no. is not coming in ALV grid table control.
    i have assigned the srch help (prem) to my 'ZFIEXP_PROJALLOC' table for the emp_id.
    but in output it is now showing the help.
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'ZFIEXP_PROJALLOC'.
      ls_fcat-ref_field = 'EMP_ID'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    Then i tried to solve it using the PA0002 . ie.,
    ls_fcat-fieldname = 'EMPLOYEE CODE'.
      ls_fcat-ref_table = 'PA0002'.
      ls_fcat-ref_field = 'PERNR'.
      ls_fcat-outputlen = '10'.
      ls_fcat-key = 'X'.
      ls_fcat-edit = 'X'.
      ls_fcat-coltext = 'EMPLOYEE CODE'.
      ls_fcat-seltext = 'EMPLOYEE CODE'.
      append ls_fcat to pt_fieldcat.
      clear ls_fcat.
    with this it is showing the help in employee code, but, when i click on an empl number, it is not added to my table control and allowing me to add the number by typing them.
    plz help me.
    thanks.

    Hi 
    In the layout give layout-sel_mode  = 'A'.  and
    pass  'A'    to  i_save  exporting parameter to method  set_table_for_first_display.
    The same thing if you are working with function module
    reuse_alv_grid_display.
    Reward points for useful answer.
    Venkat

  • Need to choose fields from alv grid output and send mail

    Hi,
    I need to choose few orders from alv grid output and send mail as PDF for chosen orders.
    Suggest if possible and how.

    Moderator message - Please do not post your requirements and ask the forum to do your work for you - post locked
    Rob

  • Displaying the selected rows in ALV Grid output

    Hi Experts,
    I am developing one interactive ALV Grid report where user can process the selected records/rows from the ALV Grid output.
    for displaying the ALV Grid, I have used the class CL_GUI_ALV_GRID class. I am working on ECC 6.0 system.
    when I select any records/rows from output and then press any Application Toolbar button, PAI and then PBO modules of the screen gets executed as per the normal flow.
    however After PBO, when same ALV output comes, all the selected/highlighted rows appear as unselected, that means I want to retain the ALV
    rows selection during the round trip.
    please advise.
    Regards,
    Jagesh

    Hi,
    Feiyun Wu is correct.
    Get_selected_rows and set_selected_rows are the methods to be used .
    Some code:
    Note the sequence of code:
    FORM set_gui_alv_grid_1 .
      DATA: wa_layout TYPE lvc_s_layo ,
            wa_print TYPE lvc_s_prnt .
      DATA: it_sort TYPE lvc_t_sort ,
            wa_sort TYPE LINE OF lvc_t_sort .
      DATA: it_fieldcatalog TYPE lvc_t_fcat.
      IF gui_custom_container_1 IS INITIAL .
        CREATE OBJECT gui_custom_container_1
          EXPORTING
            container_name = 'GUI_CUSTOM_CONTAINER_1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6 .
        IF sy-subrc <> 0.
        ENDIF.
        PERFORM get_field_catalog
          USING gc_log_group_1
          CHANGING it_fieldcatalog  .
        CREATE OBJECT gui_alv_grid_1
          EXPORTING i_parent = gui_custom_container_1.
        CREATE OBJECT ob_event_receiver_1
          EXPORTING log_group = gc_log_group_1 .
    * registers the event handlers
        SET HANDLER ob_event_receiver_1->handle_toolbar      FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->handle_user_command FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->print_top_of_page   FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->hotspot_click       FOR gui_alv_grid_1 .
        wa_layout-cwidth_opt = abap_true .
    *   wa_layout-excp_fname = gc_excp_fname .
    *   wa_layout-ctab_fname = gc_ctab_fname.
    *   wa_layout-excp_led   = abap_true .
        CALL METHOD gui_alv_grid_1->set_table_for_first_display
          EXPORTING
            is_layout       = wa_layout
            is_print        = wa_print
            i_save          = 'A'
            is_variant      = gs_disvariant_1
          CHANGING
            it_sort         = it_sort
            it_fieldcatalog = it_fieldcatalog
            it_outtab       = it_alv_grid_1.
      ELSE .
        CALL METHOD gui_alv_grid_1->refresh_table_display.
    * Restore selections
        CALL METHOD gui_alv_grid_1->set_selected_rows
          EXPORTING
            it_index_rows = ob_event_receiver_1->it_rows.
    * Restore position
        CALL METHOD gui_alv_grid_1->set_scroll_info_via_id
          EXPORTING
            is_col_info = ob_event_receiver_1->wa_col
            is_row_no   = ob_event_receiver_1->wa_roid.
      ENDIF.
    ENDFORM .                    "set_gui_alv_grid_1
    Regards.

  • Hide a Column in ALV Grid Output

    Hi,
    I want to hide a column in ALV Grid Output through program.
    I am using   lwa_fieldcat-NO_OUT = 'X'. to hide the column in output but it is not working, column in not hided in the output.
    Kindly suggest.

    It should work..
    see the code :
    d_fieldcat_wa-fieldname = 'MATNR'.
    d_fieldcat_wa-seltext_l = 'material number'.
    d_fieldcat_wa-no_out = 'X'. * hide particular field
    append d_fieldcat_wa to d_fieldcat.
    clear d_fieldcat_wa.
    if not please paste your code here.
    Thanks
    Seshu

  • Facing problem while downloading ALV grid Output into Excel

    Hi Guys,
    I am facing problem while downloading ALV grid Output into Excel.
    It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
    If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
    Can someone help me regarding this
    thanks for your help

    Hi,
    Open up Excel on your desktop. Goto Tools > Macro > Security.
    Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
    Was this your problem? Don't forget those points, either.
    check with this wetther it is solved or not.
    Regards,
    sana.

Maybe you are looking for

  • HH3 Issues and BT's lack of help

    Hi all, I have had Infinity 2 installed since May and so had no issues to begin with as my house was recently Cat5E wired up in all the rooms so have had no reason to use the wireless aspect aside from mobile phones etc. However, I recently installed

  • While creating the purchasing order in 3rd party

    sd guru's, while creating the p.o.in 3rd party sales 'company code not assigned to country or country to calculation procedure' i have this error. i assigned country to company code. then i was trying to assign calculation procedure to country 'in' i

  • How to check the DPI for images on pages

    hi,         I want to check the DPI for images programatically, is there any function available in acrobat SDK,         If not what other option we have to check the DPI for images programatically. Thank you,

  • Add credit note to open Dispute

    I am trying to add an open credit note to a dispute. I do not want to offset the credit against the original disputed invoice but add the credit note to the dispute. I can add invoices to a dispute, by using the add open items icon. However when I tr

  • Multiple sources with single downstream capture

    Is it possible to have multiple source machines all send their redo logs to a single downstream capture DB that will collect LCRs and queue the LCRs for all the source machines?