8 Replies Latest reply: Mar 16, 2015 1:40 PM by Abhijeet Kulkarni RSS

F4 Help on ALV

vishwanath vedula
Currently Being Moderated



I want to have a F4 help on a column in an ALV grid display.

The exact requirement is: In the tcode IW33, the unloading point ABLAD is having a search help as a custom table.

I want to display the same search help values as F4 help in 'Unloading points' column of my ALV. How to do this? There is no 'F4AVAILABL' field available in the field catalog i have used(SLIS_FIELDCAT_ALV).



  • Re: F4 Help on ALV
    Abhisheksingh Tomar
    Currently Being Moderated

    In Field Catalog give Reference field name and reference table.

    This will give F4 help for ALV

  • Re: F4 Help on ALV
    Nikhil Joshi
    Currently Being Moderated

    Hi Vishwanath ,


    Try to use LVC_S_FCAT fieldcatalog for this requirement.


    F4AVAILABL of LVC_S_FCAT can be used for this. There you can specify any F4 help you want.


    Hope this will help you.




  • Re: F4 Help on ALV
    Currently Being Moderated

    Hi ,



    Look on below reports for better understanding on F4 help in ALV grid,



    set handler g_handler->on_f4 for alv_grid

    If you are using OOPS ALV , then

    For F4 Help there is a field available in the field catalogue - F4AVAILABL

    Try this :

    wa_fcat-F4AVAILABL = 'X'.


    Manas M.

  • Re: F4 Help on ALV
    Abhijit Mandal
    Currently Being Moderated


    Try to add like this.. for example


    For standard field already have an search help, we can use below code when building the field catalog.


    ls_fcat-ref_table = 'BSEG'.

    ls_fcat-ref_field = 'SHKZG'.


    For those fields that we need custom F4 help.

    1. DATA: lt_f4   TYPE lvc_t_f4,

                   ls_f4   TYPE lvc_s_f4.


    2. Filled F4 table and register it to the alv grid instance


    ls_f4-fieldname  = u2018CDNMu2019. u201D field need to have F4 help

      ls_f4-register   = u2018Xu2019.

      ls_f4-getbefore  = u2018Xu2019.

      ls_f4-chngeafter = u2018Xu2019.

      ls_f4-internal   = u201D.

      INSERT ls_f4 INTO TABLE lt_f4.




      CALL METHOD grf_grid_0100->register_f4_for_fields


          it_f4 = lt_f4.


    3. In the event handler implemtation, use function module  u2018F4IF_INT_TABLE_VALUE_REQUESTu2019 to pop a screen for custom F4 help.

    After user selected an line, program use the selected line to update the internal table and refresh the table to update the changes to the frontend.


    • create search help



          retfield        = p_retfield

          dynpprog        = sy-repid

          dynpnr          = sy-dynnr

          dynprofield     = p_dynprofield

          window_title    = p_window_title

          value_org       = u2018Su2019


          value_tab       = pt_value

          field_tab       = pt_field

          return_tab      = pt_ret


          parameter_error = 1

          no_values_found = 2

          OTHERS          = 3.


      READ TABLE lt_ret INTO lw_ret INDEX 1.


      IF sy-subrc = 0.


        READ TABLE gt_result_0100 INDEX l_row INTO lw_result_0100.

        lw_result_0100-cdnm = lw_ret-fieldval.

        MODIFY gt_result_0100  INDEX l_row FROM lw_result_0100.

        CALL METHOD grf_grid_0100->refresh_table_display.







    Edited by: Abhijit Mandal on Jan 25, 2010 6:16 PM

    • Re: F4 Help on ALV
      vishwanath vedula
      Currently Being Moderated

      In OO ALVs, is it possible to display F4 using a field of a table different from that which has been used to create ALV?

      In my scenario, I have ABLAD field (Unloading point) being displayed as an ALV output. But, F4 for this field has to be available from a different Z field of a custom table. How is it possible?





      Edited by: vishwanath vedula on Jan 28, 2010 1:06 PM


      Edited by: vishwanath vedula on Jan 28, 2010 1:07 PM

    • Re: F4 Help on ALV
      Abhijeet Kulkarni
      Currently Being Moderated

      It worked for me. If anyone is wondering which event to program, as mentioned in point 3, it is the ONF4 event of CL_GUI_ALV_GRID. Thanks Abhijit!

  • Re: F4 Help on ALV
    vishwanath vedula
    Currently Being Moderated

    Included a search help in the Data element of the required column field.