Filter in ALV

Hi,
I have a ALV list displayed in the output. The Field 'MATNR' appears as 10 digit in the output.
When I set the filter for MATNR, the filter pop-up screen appears to enter the value for MATNR.
The pop-up screen allows me to enter only upto 9 digit for matnr field. It does not allow me to enter 10digit material nimber.But when I choose a diffrent layout for ALV, it allows me to enter 10digit material number.
Can you please help me?
Regards
Saroj

hii
Try this
it_fieldcat-inttype = 'NUM'.
it_fieldcat-lzero = ''.
though the field is character , i guess it works
your problem is with internal/external format.  The reason why some value 1234 with out zeros  doesn't work, is because it is stored in the database as 000000000000001234. I suggest that you make sure that you filter includes the internal format.
you should make sure that the value you pass should be in the database format
You could use a function module to convert it.
<b>CONVERSION_EXIT_ALPHA_INPUT</b>
also check this link..same problem is being discussed
<b>Re: ALV problem (with filter use)
Regards
Naresh

Similar Messages

  • How to capture the values after applying filter in ALV.

    Hi,
    I have an ALV in my application with 10 projects displayed. Out of those 10 projects, 5 projects have banking as industry.
    when you filter the ALV based on industry banking I get 5 projects .In run time  how  can  I capture only these 5 projects. when I debugged and saw the ALV table node is holding 10 prj not 5 prj.
    How can  read only those 5 values. Kindly help me out with sample code.
    Thanks,
    Priya

    Hi,
    The class name is correct - CL_SALV_WD_FIELD. When you refer the model object(CL_SALV_WD_CONFIG_TABLE-IF_SALV_WD_FIELD_SETTINGS) this will return the field for which
    you have applied filter by passing the field name.
    Before you try out this approach, check the ALV event ON_CELL_ACTION fro that column name to capture the filtering value. Based on this loop at the table where field eq <<filerting value>> and get the filtered records.
    As you have get_static_attributes_table it deosnot return the filtered values.
    Regards,
    Lekha.

  • How to filter standard ALV report with custom UI element?

    Hello Expert,
    I got a requirement to filter standard ALV report based on the custom UI element (which is created in the screen before displaying the ALV report). Upon entering the values in the Custom field, the ALV report is displayed accordingly.
    Any ideas how to approach it?
    Thanks,
    Mohammed

    Hi,
    Okay, let me explain the steps in detail
    Let us say you have alv table with 10 records and alv table is shown first time with all 10 records
    Create an internal table in component controller's attribute GT_ORIGINAL_DATA and save all 10 records into this table first time
    Now, user enters value in FILTER_MATNR field 123 and press apply_filter button or press enter key
    Read the value of field filter_matnr and get the only matching records from global internal table GT_ORIGINAL_DATA into local internal table as below
              data lv_matnr type matnr.
              data lt_data   like wd_comp_controller->gt_original_data.
                   " read the value from context attribute of filter_matnr
                        lv_matnr = ???
                   " copy all data into local table
                        lt_data[] = wd_comp_controller->gt_original_data.
                   "delete the records which does not match
                     delete lt_data where matnr NP lv_matnr.
    Now, bind the data lt_data to context node of alv table
    Hope this helps you.
    Regards,
    Rama

  • Delete Filter in ALV

    Hi there,
    i am using SALV in my view and i enabled the filterfunction. Question: Does exist a method with which i can delete the filter set by user e.g. on Button-Click?
    D. Wallner

    Hi,
    Just look at the reply given by Prashant in this thread: Re: how to delete filter in alv table. It meight be helpful.
    Regards
    Arjun

  • Custom buttons in SORT FILTER  at  ALVs

    Hi all ,
    Please let me  know  how to  attach  custom   push buttons to the  Standard one  ( sort  , filter  in alvs  )
    Regards
    Aslam..

    Hi ,
    Please search SDN before posting.
    There are many threads on this topic.
    If you are using 'REUSE_ALV_GRID_DISPLAY'  then pass your PF status with desired functions to parameter i_callback_pf_status_set .
    In factory method
      CALL METHOD go_table->set_screen_status
        EXPORTING
          report        = gv_cprog
          pfstatus      = gc_gui_status
          set_functions = go_table->c_functions_all.
    Hope this helps you.
    Edited by: Harsh Bhalla on Jan 6, 2010 8:48 AM

  • Set Filter in ALV report, blank screen returned

    I have a standard ALV report (uses REUSE_ALV_GRID_DISPLAY).  The user has to be able to filter the results based on entries from certain columns.
    When I try to filter any columns other than a column with a date a blank screen is returned.
    This filtering problem only exists with the Single value field. I can filter the results in the "select ranges", "exclude values" and "exclude ranges" without any problems.
    Any suggestions?
    Edited by: Damien Crowe on Jul 6, 2009 5:09 PM
    Set the fieldcatalog-edit_maskto "==ALPHA".
    Edited by: Damien Crowe on Jul 14, 2009 5:35 PM

    what was the solution to this problem?
    Thanks

  • Filter in alv report

    hello!
    i have a weird problem in alv report with the filter function.
    for example the field serial like viqmel-serial, if it contains the value for example 1234 the filter want work. if it contains the value N16 the filter will work.
    i cant understand what might be the problem.
    another information that concerns this field is that the ls_fieldcat-inttype is 'C'  and that the intlen eq ' '.
    thanks
    yifat

    I think your problem is with internal/external format.  The reason that N16 works, is because in the database it is  stored as N16.  The reason why 1234 doesn't work, is because it is stored in the database as 000000000000001234.   I suggest that you make sure that you filter includes the internal format.   You could use a function module to convert it.
    <b>
    CONVERSION_EXIT_ALPHA_INPUT
    </b>
    Regards,
    Rich Heilman

  • Lead Selection does not work after setting filter for ALV.

    Hi, Can you please suggest on below scenario :
    I have a Node with a sub node in it .
    I am using the supply function on Sub Node to retrieve the date based on Parent Node.
    There are two ALV's to display parent and item data. The issue is when a filter(user defined filter) is done on Parent table, the supply function does not work. The value is that of the selected row before setting the filter. Even after removing the filter, the item data is stuck and does not change on Lead Selection.
    One thing I noticed is if the child table is a table UI, there is no issue. The only problem is when the second table is ALV
    Thanks In Advance

    Hi Prashanthi,
    Your issue can be resolved as below
    Create an event handler method 'set_alv_data'  for the event 'ON_LEAD_SELECT' of parent alv
    Write the below code inside the event handler method
    METHOD set_alv_data.
      DATA lo_node TYPE REF TO if_wd_context_node.
      DATA lv_path TYPE string.
      DATA lv_index TYPE string.
      lv_index = r_param->index.
      CONDENSE lv_index.
      CONCATENATE wd_this->wdctx_my_parent_node
      lv_index
      wd_this->wdctx_my_child_node
      INTO lv_path SEPARATED BY '.'.
      lo_node = wd_context->path_get_node(
          path                          = lv_path
      DATA lo_interface TYPE REF TO iwci_salv_wd_table.
      lo_interface = wd_this->wd_cpifc_alv_child( ). "get the ref of alv comp of child
      lo_interface->set_data(
        EXPORTING
    *    only_if_new_descr =
          r_node_data       = lo_node
    ENDMETHOD.
    The above code sets the data node of child alv based on lead selection of parent alv data.
    Note: Replace 'parent_node', 'child_node'  with your nodes & 'alv_child' with your alv component name of child alv.
    If you want to control the data of child alv on filter function, you can use the event ON_STD_FUNCTION_AFTE and once you define the filter you get the r_param->id = 'SALV_WD_FILTER_DEFINE'  & now you can clear data of child alv.
    Hope this helps you.
    Regards,
    Rama

  • Regarding Filter in ALV display

    Hi Experts,
    I have a problem wih the filter option of the ALV. if choose the date field for filtering it shows the message "Correct the distance (2) between "." and "." or "." and ","" when given for docu number it shows as "Entry is too long: Only 8 digits are allowed in the whole number part" can you help me????
    please provide any solution for this issue

    Hi,
       Declare the date field as sy-datum in the internal table.
    In field catalog give it is DATS.
    This will solve your problem.
    Reward if helpful.

  • How to disable 'set filter' in alv list display

    Hi Friends,
    I am working on alv report and I came across a requirement that I need to disable the 'set filter' to restrict the user from filtering records in output.
    please help on this.
    thanks in advance.

    HI
    check these sample codes
    Here are some code snippets:
    FORM output_report.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZRRRMPROJSTAT'
    is_layout = gs_layout
    it_fieldcat = gt_fieldcat
    it_sort = gt_sort
    i_save = 'A'
    it_events = gt_events
    TABLES
    t_outtab = i_project
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDFORM. " output_report
    FORM build_fieldcat.
    DATA: s_fieldcat TYPE slis_fieldcat_alv.
    DATA: l_col_count like s_fieldcat-col_pos.
    l_col_count = 1.
    CLEAR s_fieldcat.
    s_fieldcat-col_pos = l_col_count.
    l_col_count = l_col_count + 1.
    s_fieldcat-tabname = i_project.
    s_fieldcat-fieldname = 'PSPID'.
    s_fieldcat-datatype = 'CHAR'.
    s_fieldcat-outputlen = '10'.
    s_fieldcat-seltext_l = 'Project Number'.
    s_fieldcat-seltext_m = 'Project Number'.
    s_fieldcat-seltext_s = 'Project Number'.
    s_fieldcat-key = 'X'.
    s_fieldcat-fix_column = 'X'.
    s_fieldcat-just = 'C'.
    s_fieldcat-no_zero = 'X'.
    APPEND s_fieldcat TO gt_fieldcat.
    * and so on....
    ENDFORM
    FORM sort_layout.
    DATA: ls_sort TYPE slis_sortinfo_alv.
    REFRESH gt_sort.
    CLEAR ls_sort.
    ls_sort-spos = '1'.
    ls_sort-tabname = 'i_project'.
    ls_sort-fieldname = 'PSPID'.
    APPEND ls_sort TO gt_sort.
    CLEAR ls_sort.
    ls_sort-spos = '2'.
    ls_sort-tabname = 'i_project'.
    ls_sort-fieldname = 'POSID'.
    APPEND ls_sort TO gt_sort.
    ENDFORM. " sort_layout
    FORM build_layout.
    CLEAR gs_layout.
    * gs_layout-totals_before_items = 'X'.
    gs_layout-zebra = 'X'.
    gs_layout-numc_sum = 'X'.
    gs_layout-get_selinfos = 'X'.
    gs_layout-box_tabname = 'X'.
    gs_layout-info_fieldname = 'COLOR'.
    ENDFORM. "
    Reward alll helpfull answers
    Regards
    Pavan

  • Filter in alv grid

    Hi All,
       I developed alv report.I took one filed status(8) type c. And put
    wa_final-status ='normal' or 'abnormal'  depend on conditon. it is hardcode. In my grid it is comming.
    but when I filter and select either 'normal' or 'abnormal' then it is not comming. Any body help me?
    Thanks,
    Rakesh

    Hi,
    FORM
    Data Is_filt type lvc_s_filt.
    Is_filt-fieldname = 'FLDATE'.
    Is_filt-sign = 'E'.
    Is_filt-option = 'BT'.
    Is_filt-low = '20030101'.
    Is_filt-high = '20031231'.
    APPEND Is_filt to pt_filt.
    ENDFORM.
    Do like this.
    Thanks,
    Neelima.

  • Removing filter for ALV grid

    Hi friends
    I am using an ALV grid to display my data. Once i used the filter in grid to filter some datas and go back to selection screen & executed the report again, the filter is still active and not showing all datas. How to avoid this.
    Regards
    Sathar

    Hi Abdul Sathar
    I find the solution if you are using ALV OO.
    For delete the ALV's filter call the method SET_FILTER_CRITERIA and send the parameter IT_FILTER with a itab empty.
    I hope this help you.

  • Filter in ALV grid report

    Hi SDN,
    I have a ALV grid with columns U1 and U2. I want to filter the records only when U1 = X <b>AND</b> U2 = X . But I need all other combinations of U1 and U2.
    Is it possible to make  <b>AND</b> operator work in ALV grid filter? If so please let me know. If this functionality is not available directly how to achieve it.
    Points will be asigned
    thanks

    Hi,
            ls_filter-fieldname = 'U1'.
            ls_filter-low    = 'X'.
            ls_filter-high   = space.
            ls_filter-option = 'EQ'.
            ls_filter-sign   = 'I'.
            append ls_filter to lt_filter.
            ls_filter-fieldname = 'U2'.
            ls_filter-low    = 'X'.
            ls_filter-high   = space.
            ls_filter-option = 'EQ'.
            ls_filter-sign   = 'I'.
            append ls_filter to lt_filter.
        call method grid2->set_table_for_first_display
          exporting
            i_default            = gc_enable_set_default       
            i_save               = gc_var_maint_user_specific
            is_variant           = gs_variant_item
            is_print             = gs_print
            is_layout            = gs_layout_item
            it_toolbar_excluding = gt_toolbar_excluding
          changing
            it_fieldcatalog      = gt_fieldcat_lvc_item[]
            it_outtab            = gt_outtab_item[]
            it_filter            = lt_filter[].

  • How to use filter for alv display in webdynpro

    hi,
         i have use select-options and what ever data is coming from the data base i display it using alv.
    i also want to include functionality like filter and all that , that comes in normal alv.please guide me how can i do it.
    thanks

    hi please remind  that this is not the proper forum for this ...go to this
    Expert Forums » ABAP Development » UI Programming

  • Default Filter for ALV dashboard

    Hi All,
    I am working on Webdynpro ABAP and have created an ALV table using the standard component SALV_WD_TABLE.
    In the ALV table output, we have settings and filter on the top right hand side of the table. On clicking the filter, a filter appears on the top of the table.
    On clicking settings i can have customizations done to the table for my user. I can also describe filters in the settings.
    I am wondering if we can have the filter displayed by default without clicking on the filter link.
    Please let me know in case anyone has done this before or have any suggestions.
    Thanks in advance,
    Best Regards,
    Mz

    Hi,
    Please check the my reply in the below link  -
    Display Filter Line Default in ALV Table
    Regards,
    Lekha.

Maybe you are looking for

  • Can't create folder on external hard drive from LR. or open images from LR in PS.

    I just restored my mac back to factory settings and reinstalled LR 5.  When I try to create a folder on the external hard drive it gives me this message "The folder /Volumes/Leigh's/Picutures/2014 could not be created on disk." Also, when I go to "ED

  • HELP how do I compress my DV Video into DVD Studio Pro??

    Thank you in advance for taking your time out to even read this! I have a 40 minute 4:3 DV format video in final cut pro and I need to fit it on a DVD (4.7 gig) using DVD studio Pro. I have the whole FInal Cut Pro package (compressor, live type, etc.

  • Problem with 8.8 Upgrade

    I'm having a problem with upgrading version 8.8 PL10 to PL12.  I installed SAP B1 8.8 using the latest installer which gets you to PL10.  Then I ran the upgrade to PL12.   The upgrade performed successfully.  However, when I try to log on, I get the

  • More Major Issues with ZFS + Dedup

    I'm having more problems - this time, very, very serious ones, with ZFS and deduplication. Deduplication is basically making my iSCSI targets completely inaccessible to the clients trying to access them over COMSTAR. I have two commands right now tha

  • Doubts on level based aggregation  and on creation of measures

    Hi I want a clarification on Level Based Aggregation_ I have a Fact Table_ Transaction_Amount Product_ID Dimension Table_ Product_ID Sub_Category_ID Category_ID Parent_ID I created a product dimension with levels as Parent_ID,Category_ID,Sub_Category