F4 help in ALV grid field

Hello Experts,
I am using cl_salv_table=>factory to display ALV grid.
Now I also want to attach f4 help in one of the field of ALV grid.
I am unable to locate any event or method.
Please help.

Hello,
@Marcin: The aim to display values in search help is not to select values for editable field in alv grid but to display some additional information based on value in that field.
   If search help is not possible, then dropdown can also work for me or pls provide any other solution to this.
I had tried implementing dropdown, for that I am using class "cl_salv_column_list" method "set_dropdown_entry".
From this I am able to see dropdown icon for my field but not able to populate values in dropdown.
Pls help in populating values in dropdown.
My logic is:-
Based on the values in the field in alv grid I have to calculate value dynamically to be displayed in search help or drop down list.

Similar Messages

  • F4 help in ALV grid using existing search help

    Hi All,
    It would be appreciable , if some help on problem. Thanks in advance.
    How to provide user defined F4 help in ALV grid using existing search help?
    ALV grid has developed using OOPS concept.
    Thanks,
    Sudhakar.

    Hi,
    if you already developed using OO concept, it should be possible to:
    create a handler for event ONF4
    The interface will tell you actual field name and value where F4 is pressed. This will enable you to call your own routine (see FM F4-IF....).
    Please check how the standard handles F4  - if you have standard and customer-F4 mixed you shouldtake care that the standard handling is triggered.
    Regards,
    Clemens

  • F4 Help in ALV GRID class based

    hi
    you have any idea about how to invoke the F4 help in ALV GRID Class based program.,
    if u have any other related document or program using F4 function in ALV GRId please send to me for reference
    Thanks & Regards
    K.G

    hi for what kind of fields you need to give f4.
    are they std or custom...
    please let me know about the fields..
    try to check my logic which i gave in the below post..
    it will give f4 help to the fields(if thet are standard table fieldS)
    Message was edited by: Vijay Babu Dudla

  • Search Help In ALV Grid

    What is shortest way to attach particular Search Help in ALV grid using OOPS ?

    Thanks Gurpreet,
    Through search helps attached to data element it is possible but is there any other way to attach searchhelp differet from from the search help attached to the data element ? The new search-elp is not customized search help as given in the above threads ?
    Eg. - If I want to attach MAT2 to a field named MATNR in the table instead of the MAT1 which is standard.
    Thanks in advance

  • F4 help in ALV grid by using function module?

    Hi,
    I need to get f4 search help in ALV grid for a certain fields by using function module method.
    Please guide me.
    Thank You.

    Hi
    F4IF_INT_TABLE_VALUE_REQUEST  use this fm to get f4 search help for a certain fields .
    Regards
    Divya

  • F1 Documentation for ALV grid Field

    Hi All,
    I am working on ALV grid.I am able to dispaly the ALV grid.
    It is working perfectly.
    But client needs if i click on the 'F1' on field he needs the documentation of that field.
    I have field documentaion.But i am not able to display.
    Anybody please let me know how to make it.
    Thanks,
    Swapna.
    Edited by: tarangini katta on Mar 12, 2009 12:43 PM

    Hi,
    Refer:
    f1 help in alv grid
    Re: Display F1 help in ALV
    Hope this helps you.
    Regards,
    Tarun

  • How to get f4 help in alv grid in container-urgent

    hi,
    how to get f4 help in alv grid in container using abap objects
    ganesh

    Hi Ganesh,
    Did you have a look at sample report BCALV_TEST_GRID_F4_HELP ?
    Here is part of the header documentation:
    *& Report  BCALV_GRID_F4_HELP                                          *
    Purpose:
    ~~~~~~~~
    This report illustrates the use of f4-Help in an alv grid control.
    Background:
    ~~~~~~~~~~~
    There a two possibilities to implement an f4-Help in the alv grid
    control: one can either use standard f4-help or write one by Hand.
    For the former there is nothing to do at all. This report shows how
    to implement user-defined f4-help.
    I am sure you will find within this report the solution you are looking for.
    Reward points if this Helps.
    Manish

  • F4 help for ALV table field

    Hi Experts,
    I need to implement F4 help for ALV table field.
    I my scenario, I am using two views. If we click on any record in fist view then it displays the popup window (second view) with relevant record details.
    Here one of the columns having fieldnames corresponding values (old values), for correcting old values I have created new value editable column, we can enter new value for old value then we can save it. Till this functionality is ok.
    Then I have included OVS help for new value field. Here I need to get f4 help for newvalue field relevant to fieldname.
    For example: user clicks on f4 in cell (new value) then if corresponding fieldname is u2018WERKSu2019 then it shows the plant values
    Here I can get fieldname, domain name  and value table using method set_attribute ().
    Same concept I have implemented in ALV using F4IF_FIELD_VALUE_REQUEST. It is working fine
    Here I have little bit confusion. Please advise me how to implement in OVS.
    Regards,
    BBC

    Hi,
    you'll have to create a method for the OVS search help (define it in the "OVS component usage" field in the context).
    Sample code (should work for WERKS):
    method on_ovs .
    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
          WERKS TYPE WERKS,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
      add fields for the selection list here
          WERKS TYPE WERKS_D,
          NAME1 type NAME1,
        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,
            lv_window_title  type string,
            lv_group_header  type string,
            lv_table_header  type string,
            lv_werks type werks_d.
      field-symbols: <ls_query_params> type lty_stru_input,
                     <ls_selection>    type lty_stru_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)
    Set label from Medium Description to something more logical...
          ls_text-name = `NAME1`.  "must match a field in list structure
          ls_text-value = `Plant description`.
          insert ls_text into table lt_label_texts.
    Set col header from Medium Description to something more logical...
          ls_text-name = `NAME1`.  "must match a field in list structure
          ls_text-value = `Plant description`.
          insert ls_text into table lt_column_texts.
         lv_window_title = wd_assist->get_text( `003` ).
         lv_group_header = wd_assist->get_text( `004` ).
         lv_table_header = wd_assist->get_text( `005` ).
          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 ).
        when if_wd_ovs=>co_phase_1.  "set search structure and defaults
      In this phase you can set the structure and default values
      of the search structure. If this phase is omitted, the search
      fields will not be displayed, but the selection table is
      displayed directly.
      Read values of the original context (not necessary, but you
      may set these as the defaults). A reference to the context
      element is available in the callback object.
         ovs_callback_object->context_element->get_static_attributes(
             importing static_attributes = ls_search_input ).
        pass the values to the OVS component
         ovs_callback_object->set_input_structure(
             input = ls_search_input ).
        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.
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
          if not <ls_query_params> is assigned.
    TODO exception handling
          endif.
            call method ovs_callback_object->context_element->get_attribute
              exporting
                name  = 'WERKS'
              importing
                value = lv_werks.
            data: lv_subcat_text type rstxtmd.
            select werks
                   name1
              into table lt_select_list
              from T001W.
            ovs_callback_object->set_output_table( output = lt_select_list ).
        when if_wd_ovs=>co_phase_3.
      apply result
          if ovs_callback_object->selection is not bound.
          endif.
          assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
                                   name  = `WERKS`
                                   value = <ls_selection>-werks ).
          endif.
      endcase.
    endmethod.

  • Help search in alv grid field

    Hello.
    How to assign a help search to a field of an alv grid control?
    I would like to use another help search different form the field reference.
    Thanks!!!
    Alberto

    Check the sample code:
        handle_on_f4             FOR EVENT onf4 OF cl_gui_alv_grid
                                 IMPORTING sender e_fieldname e_fieldvalue
                                           es_row_no er_event_data
                                           et_bad_cells e_display.
      METHOD handle_on_f4.
        IF e_fieldname = text-027. "Date
          PERFORM f4_date USING sender e_fieldname e_fieldvalue es_row_no
                                       er_event_data et_bad_cells e_display.
        ENDIF.
      ENDMETHOD.                    "handle_On_f4
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    *&      Form  F4_contact_id
          F4 for Contact ID
    FORM f4_date  USING    sender        TYPE REF TO cl_gui_alv_grid
                           e_fieldname   TYPE lvc_fname
                           e_fieldvalue  TYPE lvc_value
                           es_row_no     TYPE lvc_s_roid
                           er_event_data TYPE REF TO cl_alv_event_data
                           et_bad_cells  TYPE lvc_t_modi
                           e_display     TYPE c.
      DATA: lv_anlage TYPE anlage.
      FIELD-SYMBOLS: <itab> TYPE lvc_t_modi.
      DATA: ls_modi TYPE lvc_s_modi.
      DATA : wa_field_tab TYPE  dfies,
             lws_date TYPE scal-date.
      DATA: lws_row_id TYPE lvc_s_roid,
            lws_tabix TYPE sy-tabix.
      DATA: li_ret_tab LIKE  ddshretval OCCURS 0 WITH HEADER LINE.
      CLEAR: ls_modi, lv_anlage, li_ret_tab, wa_final, wa_field_tab,
             lws_date, lws_row_id, lws_tabix.
      REFRESH: li_ret_tab.
      IF NOT er_event_data->m_event_handled = c_x.
        ws_f4_handle = c_x.
        MOVE es_row_no-row_id TO lws_tabix.
        READ TABLE i_final INTO wa_final INDEX lws_tabix.
        CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
            tabname           = text-012              "I_FINAL
            fieldname         = text-027              "DATE
            searchhelp        = text-038              "BU_DATE_CHAR
          TABLES
            return_tab        = li_ret_tab
          EXCEPTIONS
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        ASSIGN er_event_data->m_data->* TO <itab>.
        CONCATENATE li_ret_tab-fieldval+6(4)
                    li_ret_tab-fieldval+3(2)
                    li_ret_tab-fieldval+0(2) INTO lws_date.
        IF lws_date NE ''.
          IF lws_date > sy-datum.
            IF wa_final-zzmod_eff_code EQ c_03 OR
               wa_final-zzmod_eff_code EQ c_04 OR
               wa_final-zzmod_eff_code EQ c_05.
              wa_final-date = lws_date.
              MODIFY i_final FROM wa_final INDEX lws_tabix.
              PERFORM no_edit_for_date TABLES i_final.
              PERFORM alv_refresh.
            ENDIF.
          ELSE.
            wa_final-date = ''.
            MODIFY i_final FROM wa_final INDEX lws_tabix.
            PERFORM no_edit_for_date TABLES i_final.
            PERFORM alv_refresh.
            MESSAGE s001(zesspa) WITH text-037.
            EXIT.
          ENDIF.
        ENDIF.
        er_event_data->m_event_handled = c_x.
      ENDIF.
    ENDFORM.                                                    " f4_date
    Check the standard program <b>BCALV_EDIT_08</b>
    Regards,
    Prakash.

  • Need help with ALV Grid

    Hi,
    I am displaying Header and Item details in an ALV Grid. The first row will be having Header info and the next rows contains Item Details. I want to hide some of the columns of the first record only. The titles and the Item Details should remain same.
    Can any body help me.
    Regards,
    Srinivas

    Hello,
    That cannot be done as you are displaying the header and item level data together. Let the fields you do not want to display be blank while you display.
    Hope it helps.
    Thanks,
    Jayant

  • Help with alv grid

    Hi guys !!
    Do you have any good manual or tutorial on how to create a alv grid, including all the steps for the abap program and the screen painter.
    Thanks a lot !

    Javier,
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    Don't forget to reward if useful....

  • 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^

  • Standard F4 help in ALV  Grid

    Hi Experts,
    I have created an ALV grid using classes. I need to bring standard F4 help in the ALV Grid.
    Also the value that user enters should be returned back to the ALV.
    Please provide some inputs.
    Thanks.

    Hi,
    cosider the below steps :
    1.in Fieldcatalog set the field as editable like for eg.
    WA_FIELDCAT-COL_POS    = L_LIN.
        WA_FIELDCAT-FIELDNAME  = 'DATAB'.
        WA_FIELDCAT-DATATYPE   = 'DATS'.
        WA_FIELDCAT-REPTEXT    = 'Valid From'(T06).
        WA_FIELDCAT-F4AVAILABL = 'X'.
        WA_FIELDCAT-EDIT       = 'X'.
        APPEND WA_FIELDCAT TO I_FIELDCAT.
    2. Define F4 on the fields you want:
    DATA:
    * Line of  F4 table
      L_S_F4 TYPE LVC_S_F4,
    * Table for F4 relevant fields
      L_T_F4 TYPE LVC_T_F4.
    * F4 on datab
      L_S_F4-FIELDNAME  = 'DATAB'.
      L_S_F4-REGISTER   = 'X'.
      L_S_F4-GETBEFORE  = SPACE.
      L_S_F4-CHNGEAFTER = SPACE.
      APPEND L_S_F4 TO L_T_F4.
      CLEAR L_S_F4.
    similarly you can add other fields on which you want to provide F4
      CALL METHOD P_G_ALV_GRID->REGISTER_F4_FOR_FIELDS
        EXPORTING
          IT_F4 = L_T_F4[].
    3.Implement the metohds for Event handler:
    METHOD HANDLE_ONF4.
       <here you can call the F4 help>
    Regards,
    Neha

  • Help on ALV grid needed...

    HI, I am a new comer to SAP and I have some material on ALV grid but not enough to write code to display from an internal table to the grid. I have written the code using 2 methods:
    1. set_table_for_first_display and
    2. reuse_alv_grid_display
    The code with reuse_alv_grid_disply works fine but am not able to add more functionality to the code as I dont have any material explaining the methods to be used with it. The code with set_table_for_first_display has some problem in it. The code for it is:
    tables kna1.
    data: BEGIN OF itkna1 OCCURS 0,
             ktokd like kna1-ktokd,
             kunnr like kna1-kunnr,
             name1 like kna1-name1,
             name2 like kna1-name2,
          end of itkna1.
    *creating an instance of grid
    data it_custom_control_name type scrfname value 'CC_ALV'.
    data it_container type ref to cl_gui_custom_container.
    data it_alvgrid type ref to cl_gui_alv_grid.
    data it_lyo type lvc_s_layo.
    Selection-screen begin of block Enter_data with frame title text-001.
      PARAMETERS pktokd like KNA1-ktokd OBLIGATORY.
      SELECT-OPTIONS skunnr FOR KNA1-kunnr.
    Selection-screen end of block Enter_data.
    SELECT ktokd kunnr name1 name2
      FROM kna1 into CORRESPONDING FIELDS OF TABLE itkna1
           WHERE ktokd = pktokd AND kunnr IN skunnr.
    *loop at itkna1.
    write:/ itkna1-ktokd, itkna1-kunnr, itkna1-name1, itkna1-name2.
    *ENDLOOP.
    *prepare field catalog
    data it_fcat type lvc_t_fcat.
    data tmp_fcat like LINE OF it_fcat.
    clear: it_fcat, tmp_fcat.
    tmp_fcat-fieldname = 'KTOKD'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KTOKD'.
    tmp_fcat-col_pos = '1'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'Customer Group'.
    *tmp_fcat-seltext = 'Customer Group'.
    *tmp_fcat-outputlen = '4'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'KUNNR'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KUNNR'.
    tmp_fcat-col_pos = '2'.
    *tmp_fcat-inttype = 'N'.
    *tmp_fcat-coltext = 'Customer Number'.
    *tmp_fcat-seltext = 'Customer Number'.
    *tmp_fcat-outputlen = '10'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME1'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME1'.
    tmp_fcat-col_pos = '3'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'name'.
    *tmp_fcat-seltext = 'name'.
    *tmp_fcat-outputlen = '12'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME2'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME2'.
    tmp_fcat-col_pos = '4'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'name2'.
    *tmp_fcat-seltext = 'name2'.
    *tmp_fcat-outputlen = '12'.
    append tmp_fcat to it_fcat.
    *prepare layout
    it_lyo-grid_title = 'Custormer details'.
    *creating an instance of container class
    create OBJECT it_container
      EXPORTING
        container_name = it_custom_control_name
      EXCEPTIONS
        cntl_error = 1
        create_error = 2
        OTHERS = 3.
    *creating an instance of the grid
    create OBJECT it_alvgrid
      EXPORTING
        i_parent = it_container
      EXCEPTIONS
        error_dp_create = 1
        OTHERS = 2.
    *displaying the grid
    call METHOD it_alvgrid->set_table_for_first_display
       EXPORTING
         is_layout = it_lyo
         i_structure_name = 'KNA1'
       CHANGING
         it_outtab = itkna1[]
         it_fieldcatalog = it_fcat
       EXCEPTIONS
         invalid_parameter_combination = 1
         others = 2.
    It would be really helpful if some one could tell me what is wrong with this code and tell me where to get the material for extending code using type-pools-slis.
    Thanks in advance!!!

    i cant see any call screen in your prog... if you have to display an alv first you have to create a screen and in that screen you have to create a custom control which will contain the grid... pls go thrugh the prog
    here i have changed your code and it is working in my system just try this..
    tables kna1.
    data: BEGIN OF itkna1 OCCURS 0,
    ktokd like kna1-ktokd,
    kunnr like kna1-kunnr,
    name1 like kna1-name1,
    name2 like kna1-name2,
    end of itkna1.
    *creating an instance of grid
    data it_custom_control_name type scrfname value 'CC_ALV'.
    data it_container type ref to cl_gui_custom_container.
    data it_alvgrid type ref to cl_gui_alv_grid.
    data it_lyo type lvc_s_layo.
    DATA : OKCODE LIKE SY-UCOMM.
    Selection-screen begin of block Enter_data with frame title text-001.
    PARAMETERS pktokd like KNA1-ktokd OBLIGATORY.
    SELECT-OPTIONS skunnr FOR KNA1-kunnr.
    Selection-screen end of block Enter_data.
    SELECT ktokd kunnr name1 name2
    FROM kna1 into CORRESPONDING FIELDS OF TABLE itkna1
    WHERE ktokd = pktokd AND kunnr IN skunnr.
    *loop at itkna1.
    * write:/ itkna1-ktokd, itkna1-kunnr, itkna1-name1, itkna1-name2.
    *ENDLOOP.
    *prepare field catalog
    data it_fcat type lvc_t_fcat.
    data tmp_fcat like LINE OF it_fcat.
    clear: it_fcat, tmp_fcat.
    tmp_fcat-fieldname = 'KTOKD'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KTOKD'.
    tmp_fcat-col_pos = '1'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'Customer Group'.
    *tmp_fcat-seltext = 'Customer Group'.
    *tmp_fcat-outputlen = '4'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'KUNNR'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KUNNR'.
    tmp_fcat-col_pos = '2'.
    *tmp_fcat-inttype = 'N'.
    *tmp_fcat-coltext = 'Customer Number'.
    *tmp_fcat-seltext = 'Customer Number'.
    *tmp_fcat-outputlen = '10'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME1'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME1'.
    tmp_fcat-col_pos = '3'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'name'.
    *tmp_fcat-seltext = 'name'.
    *tmp_fcat-outputlen = '12'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME2'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME2'.
    tmp_fcat-col_pos = '4'.
    *tmp_fcat-inttype = 'C'.
    *tmp_fcat-coltext = 'name2'.
    *tmp_fcat-seltext = 'name2'.
    *tmp_fcat-outputlen = '12'.
    append tmp_fcat to it_fcat.
    *prepare layout
    it_lyo-grid_title = 'Custormer details'.
    call screen 100.
    *creating an instance of container class
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZSPD'.
    *  SET TITLEBAR 'xxx'.
    create OBJECT it_container
    EXPORTING
    container_name = it_custom_control_name
    EXCEPTIONS
    cntl_error = 1
    create_error = 2
    OTHERS = 3.
    *creating an instance of the grid
    create OBJECT it_alvgrid
    EXPORTING
    i_parent = it_container
    EXCEPTIONS
    error_dp_create = 1
    OTHERS = 2.
    *displaying the grid
    call METHOD it_alvgrid->set_table_for_first_display
    EXPORTING
    is_layout = it_lyo
    *i_structure_name = 'KNA1'
    CHANGING
    it_outtab = itkna1[]
    it_fieldcatalog = it_fcat
    EXCEPTIONS
    invalid_parameter_combination = 1
    others = 2.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
    call method cl_gui_cfw=>dispatch.
    CASE OKCODE.
    WHEN 'EXIT' OR 'BACK'.
    LEAVE PROGRAM.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    regards
    shiba dutta

  • Need help on ALV Grid Control

    Hi,
    I have written a program to display the details of customer in ALV Grid. I have also added code to add a hyperlink to the field name - KTOKD of the table KNA1. It would be helpful if anyone could tell me what is wrong with the code. The list is correctly displayed but the hyperlink is not working.
    tables kna1.
    data: BEGIN OF itkna1 OCCURS 0,
             ktokd like kna1-ktokd,
             kunnr like kna1-kunnr,
             name1 like kna1-name1,
             name2 like kna1-name2,
             ktokd_hdl type int4,
          end of itkna1.
    *creating an instance of grid
    data it_custom_control_name type scrfname value 'C_C_ALV'.
    data it_container type ref to cl_gui_custom_container.
    data it_alvgrid type ref to cl_gui_alv_grid.
    data it_lyo type lvc_s_layo.
    data it_fcat type lvc_t_fcat.
    data tmp_fcat like LINE OF it_fcat.
    data it_hype type lvc_t_hype.
    data tmp_hype type lvc_s_hype.
    Selection-screen begin of block Enter_data with frame title text-001.
      PARAMETERS pktokd like KNA1-ktokd OBLIGATORY.
      SELECT-OPTIONS skunnr FOR KNA1-kunnr.
    Selection-screen end of block Enter_data.
    SELECT ktokd kunnr name1 name2
      FROM kna1 into CORRESPONDING FIELDS OF TABLE itkna1
           WHERE ktokd = pktokd AND kunnr IN skunnr.
    *prepare field catalog
    clear: it_fcat, tmp_fcat.
    tmp_fcat-fieldname = 'KTOKD'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KTOKD'.
    tmp_fcat-col_pos = '1'.
    tmp_fcat-web_field = 'ktokd_hdl'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'KUNNR'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KUNNR'.
    tmp_fcat-col_pos = '2'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME1'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME1'.
    tmp_fcat-col_pos = '3'.
    append tmp_fcat to it_fcat.
    tmp_fcat-fieldname = 'NAME2'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'NAME2'.
    tmp_fcat-col_pos = '4'.
    append tmp_fcat to it_fcat.
    data: c_lines type I, count type I.
    DESCRIBE table itkna1 LINES c_lines.
    loop at itkna1.
      count = count + 1.
      tmp_hype-handle = count.
      tmp_hype-href = itkna1-ktokd.
      APPEND tmp_hype to it_hype.
      itkna1-ktokd_hdl = count.
      MODIFY itkna1.
    ENDLOOP.
    *prepare layout
    it_lyo-grid_title = 'Custormer details'.
    call screen 200.
    module status_0200 OUTPUT.
    *creating an instance of container class
    CREATE OBJECT it_container
        EXPORTING container_name = it_custom_control_name.
    *creating an instance of the grid
    create OBJECT it_alvgrid
        EXPORTING i_parent = it_container.
    *displaying the grid
    call METHOD it_alvgrid->set_table_for_first_display
       EXPORTING
         is_layout = it_lyo
         it_hyperlink = it_hype
       CHANGING
         it_outtab = itkna1[]
         it_fieldcatalog = it_fcat
       EXCEPTIONS
         invalid_parameter_combination = 1
         others = 2.
    ENDMODULE.

    Try this..
    give the field name in CAPITAL LETTERS..
    *prepare field catalog
    clear: it_fcat, tmp_fcat.
    tmp_fcat-fieldname = 'KTOKD'.
    tmp_fcat-ref_table = 'KNA1'.
    tmp_fcat-ref_field = 'KTOKD'.
    tmp_fcat-col_pos = '1'.
    tmp_fcat-web_field =<b> 'KTOKD_HDL'.</b>
    REGARDS,
    SAI RAMESH

Maybe you are looking for

  • Zen Style M300 problem lock button

    Hi, I have my new Zen Style M300 with a problem. The lock button is not working. If I move the button to the right position the device is not blocked, so if I touch any other button (an arrow...) it is possible to modify the music, radio or wathever.

  • SSO fails - userPassword having special characters

    Hi, This is a tricky situation i'm handling. I did a insert of around 1000 users into Sun DS whose userPassword contained special characters accepted by DS. mainly + and ;. For seeing if authentication will work, i just created a user through AM Cons

  • How can I Increase the Thickness of Blinking Cursor in adobe reader?

    I sometimes refer to another part of file of pdf and to get back, blinking cursor is supposed to help me but it is tiny blinking I have hard time to find it back. How can I increase the thickiness of blinking cursor in adobe reader?

  • NWP1 Current date

    Hi experts, Basis has recently change the time in the system to terminate daylight savings, after that, the date in transaction NWP1 that is setting in variant attributes as current date, instead of current day the system shows the date of a day befo

  • How to transort a Process chain

    Hi Experts   We are on BI7 and ECC6...My coworker has created all the Process chains in Production instead of transporting them from Dev....Now each time when we are making any changes / adding objects...we need to go and change the PC's in Prod...Wh