Search Help in Classical ALV

Hi All,
I have a small problem. Can anybody tell me how can i add a search help to a specific column in my classical ALV?
Regards,
Prakash Pandey

Hi Prakash,
In the Field Catalog there are two fields which are used to get the Search Help of any of the Column in ALV. Those are : REF_FIELDNAME and REF_TABNAME.
For example,
  ls_fieldcat-fieldname  = 'VBELN'.
  ls_fieldcat-fix_column = 'X'.
  ls_fieldcat-key        = 'X'.
  ls_fieldcat-outputlen  = '10'.
  ls_fieldcat-seltext_m  = 'Sales Document'.
  ls_fieldcat-edit       = 'X'.
  ls_fieldcat-ref_fieldname = 'VBELN'.
  ls_fieldcat-ref_tabname = 'VBAP'.
  append ls_fieldcat to p_fieldcat.
  clear ls_fieldcat.
The above code will show the F4 for the column VBELN in the ALV.

Similar Messages

  • How Can I hide search help button in alv ?

    Hi Sdn .
    I want to hide search help button in my alv ..
    My  gs_fcat-f4availabl  = 'X'. is not active ..  but  there is search help button  .
    How Can I hide button .
    Regards  .
    Serkann

    donnot pass any values in field catalog for reference field and reference table.
    or dont use any standard data element

  • Search help problem in ALV output for field TD24A-DISMM

    Hi Abap-Experts,
          I have one issue regarding simple ALV report.
          I need to display search-help for field DISMM.  I have used below code in ALV fieldcatalog.
          ts_fieldcat - tabname = 'TD24A'.
          ts_fieldcat - tabname = 'DISMM'.
          I have attached search-help for fields such as MATNR and WERKS too.
          The search-helps are getting displayed for MATNR as well as WERKS.
          But, the search-help is not gettting displayed for field DISMM(RP-TYPE) .
             The output displayed is done using Simple ALV.     
            Could anyone please help me and correct my code or logic i have used.

    Hi,
      I have changed code a bit...and used T438A table.
      CLEAR ts_fieldcat.
      ts_fieldcat-col_pos = '5'.
      ts_fieldcat-fieldname = 'DISMM'.
      ts_fieldcat-seltext_l = text-014.
      ts_fieldcat-outputlen =  2.
      ts_fieldcat-reptext_ddic  = ''.
      ts_fieldcat-ref_tabname   = 'T438A'.
      ts_fieldcat-ref_fieldname = 'DISMM'.
    ts_fieldcat-ddic_outputlen = '2'.
      ts_fieldcat-input         = 'X'.
      APPEND ts_fieldcat TO gt_fieldcat.
    still it is not showing me the F4 help in simplae ALV output..
    kindly help me

  • F4 Help for Classical ALV Grid ( REUSE_ALV_GRID_DISPLAY_LVC)

    Hi All,
    We have an ABAP program that displays data using REUSE_ALV_GRID_DISPLAY_LVC. There is an editable column in the report for which we need to display F4 help. The functionality of the F4 help will completely user-defined.
    Please let me know how to provide custom F4 help for editable column in ALV.
    Thanks,
    sathish.

    Hi satish,
    Use ' F4IF_INT_TABLE_VALUE_REQUEST' function module after PROCESS ON VALUE-REQUEST event.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
              retfield         = 'LAND1'
    *       PVALKEY          = ' '
             dynpprog         = sy-repid
             dynpnr           = sy-dynnr
             dynprofield      = 'T_LCDETAILS-DEST_COUNTRY'
             callback_program = sy-repid
             value_org        = 'S'
           TABLES
             value_tab        = t_country
           EXCEPTIONS
             parameter_error  = 1
             no_values_found  = 2
             OTHERS           = 3.
         IF sy-subrc <> 0.
    * Implement suitable error handling here
         ENDIF.
    Regards,
    Venkat.

  • Search Help in an ALV OO

    Hi
    Please:
    1) I have a transparent table with the field MATNR and others fields;
    2) There is an ALV OO where the user  input data at this transparent table;
    3) Now the user is requesting to create a new field at this ALV to show the description of the MATNR. I will have to obtain the field MAKTX from MAKT. Note that MAKTX is not at the transparent table.
    4) I've created a match code (MATNR SPRAS MAKTX), but I am not able to show MAKTX in the ALV field;
    5) I also tried to use the method set handler o_event_receiver->handle_on_f4 for g_grid without success.
    Could you please explain me how display MAKTX at the new field ? And also, the new field should be not editable .
    Thanks in advance!
    Joao Gaia

    Hello,
    I think you have used the function LVC_FIELDCATALOG_MERGE to build the catalog for ALV Grid and passed the transparent table. If that is right, then once you get the field catalog in the internal table, you can always manually add the field for MAKTX in the table like follows:
    data : wlt_fcat type lvc_s_fcat.
    wlt_fcat-fieldname = 'MAKTX'.
    wlt_fcat-tabname = 'MAKT'.
    wlt_fcat-ref_field = 'MAKTX'.
    wlt_fcat-ref_table = 'MAKT'.
    wlt_fcat-edit = space.
    append wlt_fcat to lt_fcat.
    Once the field is available, then you can place F4 on the field.
    Hope this helps.
    Regards,
    Himanshu
    Edited by: Himanshu Aggarwal on Sep 30, 2010 9:35 AM

  • Web dynpro for abap how to create a customize search help in alv column

       hi:
          Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
          Are there specific examples ?
          thanks!!

    HI:
       I want to created a freely programed help which include date&time,and put help value to alv column.
      I have created a freely programed help in web dynpro for abpa application,I refer:
      **************** - WebDynpro for ABAP
      but have a problem!
       If you focus on the the input field in the first row, you get the value help
    However if  I go to the second row and focus on the same input field in this column, I don't get the value help:
    What is a good way to solve similar problems?
    thanks

  • Search Helps in ALV grids.

    Hi,
    I am working on ALV grids in custom control.
    My requirement is to provide search helps in the ALV grid for few fields out of which the search help for one field should be populated dynamically.
    Please help me.

    hi
    good
    You can have almost everything you like in a search help. Nice search help examples are:
    MPLAL (exit = F4_MATCHCODE_USER_EXIT) -> calls a selection report (transaction IP03)
    HRBAS00OBJID (exit = RHF4_EXIT_OBJID) and include search helps
    thanks
    mrutyun^

  • How to set column names in OVS search help of ALV EDIT

    Hi All,
    I have a OVS search help for my ALV EDIT column.This OVS will have two columns,I need to give the names(name1 , name2)  to the columns.
    I am writing the below codo in phase 0.
          ls_text-name = 'Column1'.
          ls_text-value = 'name1'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ls_text-name = 'Column2'.
          ls_text-value = 'name2'.
          INSERT ls_text INTO TABLE lt_column_texts.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title =  lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
    Below code in Phase 3.
          Assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
            name = `ATR1`
            value = <ls_selection>-Column1 ).
          endif.
    But,the column names are not getting set.Please provide your inputs.
    Regards,
    Salma

    hi,
    About your requirement, i don't know why you need to code in "Phase 3" of OVS.
    "Phase 3" is used for transporting your selected value to Your ALV.
    I think, the reason why you loose the result table including your customized column title, is that you loose the "Phase 2".
    Generally, in the past i used OVS as the following code simply.Just one example:
    * declare data structures for the fields to be displayed and
    * for the table columns of the selection list, if necessary
      types:
        begin of lty_stru_input,
    *   add fields for the display of your search input here
          carrid type string,
          connid type string,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
    *   add fields for the selection list here
          carrid type string,
          connid type string,
          text   type string,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
    *   in this phase you have the possibility to define the texts,
    *   if you do not want to use the defaults (DDIC-texts)
          ls_text-name = 'CARRID'.  "must match a field name of search
          ls_text-value = 'Search Field-Carrid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CONNID'.  "must match a field name of search
          ls_text-value = 'Search Field-Connid'.
          insert ls_text into table lt_label_texts.
          ls_text-name = 'CARRID'.  "must match a field in list structure
          ls_text-value = 'Result-Carrid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'CONNID'.  "must match a field in list structure
          ls_text-value = 'Result-Connid'.
          insert ls_text into table lt_column_texts.
          ls_text-name = 'TEXT'.  "must match a field in list structure
          ls_text-value = 'Result-Text'.
          insert ls_text into table lt_column_texts.
          lv_group_header = 'Group Header'.
          lv_window_title = 'Window Title'.
          lv_table_header = 'Table Header'.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 3
                    row_count    = 8 ).
    when if_wd_ovs=>co_phase_2.
    *   If phase 1 is implemented, use the field input for the
    *   selection of the table.
    *   If phase 1 is omitted, use values from your own context.
          if ovs_callback_object->query_parameters is not bound.
    ******** TODO exception handling
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_select_list FROM ZTABLE_FLIGHT
                           WHERE CARRID LIKE lw_carrid
                                 AND CONNID LIKE lw_connid
    *ovs_callback_object->set_output_table( output = lt_select_list ).*
    Hope it can help.
    Best wishes.

  • Problem with ALV search help Dictionary Search Help

    Hello experts
    I have a problem with ALV search help.
    I use DDIC table ZXXX with text table ZXXX_T. I created DDIC search help form table ZXXX. In my WD application, in context on COMPONENTCONTROLLER i set on attribute: 'Input help mode' as 'Dictionary Search Help' and in 'Dictionary Search Help' I pass name of new created DDIC search help.
    I create a input field from that atrribute and search help works fine (there was a value and description for value from text table). So I created ALV witch contains that attribute too.
    Next I set column for this attribute in ALV as editable but on Serch help for this collumn I have only value. I DON'T HAVE TEXT DESCRIPTION FOR VALUE.
    Please help me and tell me what I do wrong?
    Miko

    Hello,
    Thank's for your help. I create DDic Search help for all fields from my ALV. Next I changed 'TYPE' for all ALV fields in COMPONENTCONTROLLER from ZXXX-Zfield to Zfield, and I changed 'Input help mode' from 'Automatic' to 'Dictionary Search Help'. Now I see Value and Description for value in Search Help in my ALV.
    Regards
    Miko

  • SAP GUI for JAVA - Search Help ALV display

    I need to be able to display search helps in the ALV grid format or the ' Dialog Modal ' option as seen on the <b>Settings for all F4 helps</b> tab under the personalize option for search helps.
    Currently when I am using a Macintosh machine the system ignores the system setting and my personal settings and displays all search results in an ABAP List format. Unfortunately the ABAP list format does not work correctly when used to input a field on another ABAP list report.
    This behaviour can be found on the Mozilla Firefox browser when SAP GUI for HTML and the SAP GUI for JAVA.
    Your help will be greatly appreciated.

    Hi Rolf-Martin,
    Thank you for your detailed explanation on how the ALV grid control is implemented for the SAP GUI for Java.  This has been pretty insightful.  The good news is that I finally figured out a solution to my problem.  You see I inherited an old custom program where an ABAP list is used as an interactive data capture screen with input fields.  Well a couple of fields had search helps. The program has worked fine with the regular SAP GUI until a MAC OS user tried to use it with the SAP GUI for Java.  Whenever they selected a line from the search help it would bring back the entire onto their input screen.
    A sample of the code:
    form search_help.
        CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                TABNAME     = 'EKPO'
                FIELDNAME   = 'MATNR'
                SEARCHHELP                = 'ZMAT1_A'
                SHLPPARAM                 = 'MATNR'
           TABLES
                RETURN_TAB       = RET_TABLE.
    IF NOT RET_TABLE-FIELDVAL IS INITIAL.
       LINXX-XMATNR = RET_TABLE-FIELDVAL.
       MODIFY CURRENT LINE FIELD VALUE XMATNR FROM LINXX-XMATNR. " ****
    ENDIF.
    SET CURSOR 9 SY-CUROW.   " ********
    endform.
    The problem was being caused by the fact that the search help ABAP list was overriding the sy-XXXX values for the current line contents, index, pageno, cursor row for the calling ABAP list. So when a user selected a row from the search help this would now become the current context and be transferred back to the calling program. 
    The fix was pretty simple; all I had to do was save the current line context and the context prior to calling the search help.  After the search help was run I would then replace the current line with the saved one in my local variable.  I hope this makes sense. We now have a couple of happy MAC OS users.
    Once again I thank you for your patience and support in  this matter.
    Have a great day,
    Edwin.

  • Exception while creating f4 help for editable alv field

         hi experts
    i have created search help for editable alv field by following link
    http://scn.sap.com/docs/DOC-39832
    But i m getting an exception :  Field symbol has not yet been assigned.
    exception area code
       read table <tab1> into <ls_wa> index i_row_id.
        assign component m_cl_variant->ms_layout-stylefname
               of structure <ls_wa> to <l_field>.
        read table <l_field> into ls_style
                with table key fieldname = is_col_id-fieldname.
        if sy-subrc eq 0.
          if ls_style-style o mc_style_enabled.
            ready_for_input = 1.
            exit.
          elseif ls_style-style o mc_style_disabled.
            ready_for_input = 0.
            exit.
          endif.
    first read statement is giving sy-subrc =4.
    PS: exception from method..:IS_READY_FOR_INPUT
    kindly help

    Hello Ankush,
    read table <tab1>  ASSIGNING <ls_wa> index i_row_id.
    IF  <ls_wa> IS ASSIGNED.
        assign component m_cl_variant->ms_layout-stylefname
               of structure <ls_wa> to <l_field>.
        read table <l_field> into ls_style
                with table key fieldname = is_col_id-fieldname.
        if sy-subrc eq 0.
          if ls_style-style o mc_style_enabled.
            ready_for_input = 1.
            exit.
          elseif ls_style-style o mc_style_disabled.
            ready_for_input = 0.
            exit.
          endif.
    ENDIF.
    Regards,
    TP

  • 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

  • How to add a search help for a field in alv?

    HI!Everyone ,
    i want to add a search help created by myself for one field in alv,
    and i want to use this function "HELP_VALUES_GET_WITH_TABLE".
    can anyone help me ?
    thanks!

    HI,Vijay.
    My code like this :
          PERFORM build_fcat.
          PERFORM build_objects.
          PERFORM layo_build.
          PERFORM set_drdn_table .
          CALL METHOD alv_grid->set_table_for_first_display
            EXPORTING
             i_structure_name = 'STU_S'
              is_layout        = s_layo
            CHANGING
              it_outtab        = itab_out
            it_fieldcatalog  = i_fcat
            ."Period
          IF sy-subrc <> 0.
            EXIT.
          ENDIF.
    for example, there is a field 'UNAME' IN Structure 'STU_S',
    i want to add a search help for 'UNAME'.
    the 'UNAME'  is not users in SAP R/3 , i want to add some data by myself or from a table .

  • How to add search help for field in ALV object

    Hello,
    In a program, we use ALV object ( container) to create a liste like : field1, field2 .. but when display we do not have search help for this . Could you please help me how to add match code in this case for field 1 and field2, We use set_table_for_first_display
    Thanks,

    Hi,
    when you define your field catalogue you can create data elements with search help in se11 and use them for field 1 and field 2.
    But maybe it is enough to use data elements belonging to a domain with a value help and to set field F$AVAILABL in the field catalogue or to fill the name of the field CHECKTABLE.
    Regards,
    Klaus

  • Using Search Help with ALV and Dynamic context node

    The topic subject already describes my situation.
    I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.
    This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.
    Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.
    I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:
      CALL METHOD lo_nd_info_root->add_new_child_node
        EXPORTING
          static_element_type          = vs_tabname
          name                         = 'SAMPLE_NODE_NAME'
    *    is_mandatory                 = abap_false
    *    is_mandatory_selection       = abap_false
         is_multiple                  = abap_true
         is_multiple_selection        = abap_false
    *    is_singleton                 = abap_false
          is_initialize_lead_selection = abap_false
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lo_nd_info_data .
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
          parent_info = lo_nd_info_root
          node_name = 'SAMPLE_NODE_NAME'
          structure_name = vs_tabname
          is_multiple = abap_true ).
    The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

Maybe you are looking for

  • Itunes problems with Windows 8.1 and Iphone 4S

    I can't sync my Iphone 4 S to my Itunes.  I get the following error:  "This Iphone can not be used because the required software is not installed. Run the Itunes installer to remove itunes then install the 64bit version of Itunes."  I am running the

  • Opening a PDF inside Flash compile errors

    I'm trying to open a pdf inside flash.  I followed a tutorial online but I'm have issues with the compiler.  Here's my code: import flash.html.HTMLLoader; import flash.html.HTMLPDFCapability; import flash.html.HTMLWindowCreateOptions; if( HTMLLoader.

  • How do I get Pages to mirror my documents on my desktop with my IOS devices

    In the Apple description of iCloud if you work on a document on one device it also shows the changes on all your other IOS devices and on your desktop.  How do I set that up?

  • JPA caching ResultSets

    I am experiencing something that make me wonder at JPA. I write a class that updates the status of a record and immediately query the table for a list that should contain the new updated query, but the list doesn't contain the record. Secondly, I use

  • Differences between WLI 7.0 and WLI 8.1?

    I am trying to make a determination on Workflow products, and I have used WLI 7.0 (and back to WLPI days), but 8.1 looks very foreign to me. Can anyone give me an idea of whether you think the modifications to the tool for 8.1 were beneficial from th