Problem in F4 help in ALV Grid

Hi All,
    Structure of my internal table is :-
  TYPES : BEGIN OF t_webtech,
          chk          TYPE char01,
          uname        TYPE uname,
          werks        TYPE ewerks,
          req_typ      TYPE zreqtyp,
         cost_cen     TYPE kostl,
          work_cen     TYPE kostl,
          general_cen  TYPE kostl,
          aufnr        TYPE aufnr,
          proj_wbs     TYPE ps_posnr,
          addrnumber   TYPE ad_addrnum,
          orig_row     TYPE i,
          ins_check    TYPE char01,
          celltab TYPE lvc_t_styl, "Table to edit
        END OF t_webtech.
and fieldcatalog is like :-
lv_pos = lv_pos + 1.
    ls_fcat-edit      = 'X'.
    ls_fcat-tabname   = 'IT_TECH'.
    ls_fcat-fieldname = 'COST_CEN'.
    ls_fcat-coltext   = 'Department'.
    ls_fcat-col_pos   = lv_pos.
    ls_fcat-outputlen = 20.
    ls_fcat-col_opt   = 'X'.
    ls_fcat-ref_field = 'KOSTL'.
    ls_fcat-ref_table = 'CSKS'.
    APPEND ls_fcat TO pt_fcat.
    CLEAR ls_fcat.
    lv_pos = lv_pos + 1.
    ls_fcat-edit      = 'X'.
    ls_fcat-tabname   = 'IT_TECH'.
    ls_fcat-fieldname = 'WORK_CEN'.
    ls_fcat-coltext   = 'Workcenter'.
    ls_fcat-col_pos   = lv_pos.
    ls_fcat-outputlen = 20.
    ls_fcat-col_opt   = 'X'.
    ls_fcat-ref_field = 'KOSTL'.
    ls_fcat-ref_table = 'CSKS'.
    APPEND ls_fcat TO pt_fcat.
    CLEAR ls_fcat.
now the problem is  i am able to see F4 help in grid but once i click on it (F4 on cell) its giving dump.
anybody know's where is the problem?
Thanks & Regards,
Ruchi Tiwari

Hi,
Check whether you are passing the correct 'Field name' and proper content to the F4 help function module.
I guess the problem lies with the F4-help FM called.
Regards,
Rajesh

Similar Messages

  • Problems with F4 help in ALV grid

    Hi all,
    I am trying to create a F4 help for the field Payee number in my reprot output (ALV Grid OO), i am able to get the window for selection of the value in the F4 help , but i am unable to pass the value back on to the screen.
    I need to insert the selected value from the F4 help and aslo need to populate the Name of the payee into the Payee field.
    Can some one help me in finding what error have i done in the code.
    Thanks in advance for all.
    I have the following code
    *&  Include      ZRMM_ALV_TOP                *
    data: gc_control100 type  ref to cl_gui_custom_container,
          gc_control101 type  ref to cl_gui_custom_container.
    data: gi_outtab100  type  table of ty_purchase.
    data: g_cont0100    type  ref to cl_gui_custom_container,
          g_grid0100    type  ref to cl_gui_alv_grid, " For Screen 100 Grid
          gi_fcat0100   type  lvc_t_fcat,  " Field Catalog for Screen 100
          gi_sort0100   type  lvc_t_sort,
          g_lout0100    type  lvc_s_layo.
    data: okcode_100    like  sy-ucomm,
          save_0100     like  sy-ucomm,
          okcode_200    like  sy-ucomm,
          save_0200     like  sy-ucomm.
    types: begin of f4_itab_type,
                  LIFNR type lifnr,
                  BUKRS type name1,
               end of f4_itab_type.
    data: f4_itab type table of f4_itab_type,
          ls_f4_itab type f4_itab_type.
    data : it_IZEMTAB type table of IZEMTAB,
           wa_IZEMTAB type IZEMTAB.
    Class Definitions.
    class event_receiver_0100 definition.
      PUBLIC SECTION.
        types: begin of onf4_event_parameters_type,
                  c_fieldname     type lvc_fname,
                  cs_row_no       type lvc_s_roid,
                  cr_event_data   type ref to cl_alv_event_data,
                  ct_bad_cells    type lvc_t_modi,
                  c_display       type char01,
                end of onf4_event_parameters_type.
        data: fieldcatalog type lvc_t_fcat.
        data :   f4_alv  type ref to cl_gui_alv_grid,
                 f4_cont type ref to cl_gui_custom_container.
        data: f4_params type onf4_event_parameters_type.
        METHODS:
           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.
      on_data_changed for event
                       data_changed of cl_gui_alv_grid
            importing e_onf4
                      e_onf4_before
                      e_onf4_after
                      er_data_changed
                      e_ucomm
                      sender.
    endclass.                    "lcl_event_receiver DEFINITION
    data: gs_variant type disvariant,
          gc_save    value 'A',
          gs_toolbar  TYPE stb_button,
          gs_toolbar1 type stb_button,
          gs_toolbar2 type stb_button.
    DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
    DATA : event_receiver_0100 TYPE REF TO EVENT_RECEIVER_0100.
    Class Implementation.
    class event_receiver_0100  implementation.
    For f4 help.
      method on_f4.
    data: ls_outtab type ty_purchase.
    field-symbols <itab> type lvc_t_modi.
    data: ls_modi type lvc_s_modi,
          ls_f4_itab type f4_itab_type.
        f4_params-c_fieldname   = e_fieldname.
        f4_params-cs_row_no     = es_row_no.
        f4_params-cr_event_data = er_event_data.
        f4_params-ct_bad_cells  = et_bad_cells.
        f4_params-c_display     = e_display.
    read table it_purchase into ls_outtab index f4_params-cs_row_no-row_id.
    Clear f4_itab[].
    CALL FUNCTION 'FI_VENDOR_ALTERN_PAYERS_READ'
      EXPORTING
        I_LIFNR                  = ls_outtab-lifnr
        I_BUKRS                  = ls_outtab-bukrs
      TABLES
        T_ZEMTAB                 = it_izemtab.
         clear f4_itab[].
        if not ls_outtab-lifnr is initial.
        loop at it_izemtab into wa_izemtab.
          ls_f4_itab-LIFNR = wa_izemtab-empfb.
          ls_f4_itab-BUKRS = wa_izemtab-name1.
          append ls_f4_itab to f4_itab.
        endloop.
        endif.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
       RETFIELD              = 'LIFNR'
       DYNPPROG              = sy-repid
       DYNPNR                = '100'
       WINDOW_TITLE          = 'f4 help for PAYEE'
       VALUE_ORG             = 'S'
      TABLES
        VALUE_TAB            = f4_itab
        RETURN_TAB           = T_RETURN.
    IF SY-SUBRC <> 0.
    ENDIF.
    assign f4_params-cr_event_data->m_data->* to <itab>.
    ls_modi-row_id = f4_params-cs_row_no-row_id.
        read table f4_itab into ls_f4_itab index es_row_no-row_id.
        if not f4_itab is initial.
           ls_modi-row_id    = es_row_no-row_id.
           ls_modi-value     = ls_f4_itab-LIFNR.
           ls_modi-FIELDNAME = 'LIFNR'.
           append ls_modi to <itab>.
           ls_modi-row_id    = es_row_no-row_id.
           ls_modi-value     = ls_f4_itab-BUKRS.
           ls_modi-FIELDNAME = 'NAME1'.
           append ls_modi to <itab>.
        endif.
       er_event_data->m_event_handled = 'X'.
    ENDMETHOD.                           
    *--ENDMETHOD SHOW_F4--
    endclass.    "lcl_event_receiver IMPLEMENTATION

    I have used the following FM for F4 help on editable ALV grid column and it worked fine.Try the below.
    Call function for Input helps
        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
             EXPORTING
                  i_title               = text-049
                  i_selection           = c_check
                  i_zebra               = c_check
                  i_screen_start_column = 55
                  i_screen_end_column   = 125
                  i_screen_start_line   = 10
                  i_screen_end_line     = 20
                  i_tabname             = c_fcat_str
                  it_fieldcat           = tl_fieldcat
             IMPORTING
                  es_selfield           = wal_selfield
             TABLES
                  t_outtab              = tl_code
             EXCEPTIONS
                  program_error         = 1
                  OTHERS                = 2.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ELSEIF sy-subrc = 0 AND NOT wal_selfield IS INITIAL.
          wl_index = wal_selfield-tabindex.
          READ TABLE tl_code ASSIGNING <l_code>
          INDEX wl_index.
          IF sy-subrc = 0.
            <l_fgis_lots>-status   = <l_code>.
          ENDIF.
        ENDIF.
      ENDIF.

  • 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

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

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

  • Problem creating an excel with ALV GRID

    Hi all,
    this is my problem:
    i have an ALV GRID in which I display several columns in a proper order, es : A B C D E F G
    when i create an excel from this display i obtain a different order of the columns!
    in particular the 3 columns which represent numeric values (es C D E) are the last 3 colums in the excel, instead in the alv grid this 3 comuns stay in the middle!
    so in the excel i obtain : A B F G C D E!!!!
    please can anyone help me to fix this problem?

    hi,
    if you do a debugging it will go into the function module alv_xxl_call.
    in this we can find  the code as below.
    catch system-exceptions import_mismatch_errors = 1.
        import l_xxl_toggle_date from database ltdx(XL) id
                                    'bcalv_xxl_toggle_date'.
      endcatch.
    here place a break point and check what value is it coming for this variable l_xxl_toggle_date.
    if it is coming as X. then this problem will arrive.
    here manually change the variable to space and check , the output will be coming perfectly.
    if value is coming as X.
    THEN WE CAN DO ONE THING.
    HERE we are having a report bcalv_toggle_date which MUST EXECUTED ONCE ONLY.
    WHEN IT IS EXECUTED IT DOES NOT DISPLAY ANYTHING.
    after executing once the variable will be changed from X TO SPACE.
    but we must run this report as other program excel sheet download order  might get disturbed.
    my might suggestion copy thwe standard gui  to custom one and right a code for that excel icon in your code as shown below.
    we need to copy the function module alv_xxl_call and comment the code
    catch system-exceptions import_mismatch_errors = 1.
        import l_xxl_toggle_date from database ltdx(XL) id
                                    'bcalv_xxl_toggle_date'.
      endcatch.
      if l_xxl_toggle_date is initial.
      and endif of the above if.
    WHEN 'XXL'.
          DATA : v_fieldcat TYPE STANDARD TABLE OF kkblo_fieldcat.
          DATA : wa_fieldcat TYPE kkblo_fieldcat.
          DATA : w_fieldcat LIKE LINE OF gt_fieldcat.
          DATA : g_sort TYPE slis_t_sortinfo_alv.
          DATA : g_filter TYPE slis_t_filter_alv.
          DATA : a_fieldcat TYPE slis_t_fieldcat_alv.
          CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
            IMPORTING
              es_layout   = gs_layout
              et_fieldcat = a_fieldcat[]
              et_sort     = g_sort
              et_filter   = g_filter
              es_variant  = gs_variant.
          DELETE a_fieldcat WHERE no_out = 'X'.
          LOOP AT a_fieldcat INTO w_fieldcat.
            MOVE-CORRESPONDING w_fieldcat TO wa_fieldcat.
            APPEND wa_fieldcat TO v_fieldcat.
          ENDLOOP.
          CALL FUNCTION 'ZALV_XXL_CALL'
            EXPORTING
              i_tabname                    = 'IT_FINAL'
            IS_LAYOUT                    =
              it_fieldcat                  = v_fieldcat[]
            I_CALLBACK_TOP_OF_PAGE       =
            I_TITLE                      =
            I_MODE                       =
            TABLES
              it_outtab                    = it_final
           EXCEPTIONS
             FATAL_ERROR                  = 1
             NO_DISPLAY_POSSIBLE          = 2
             OTHERS                       = 3.

  • Problem in F4 help in ALV

    Hi,
    I have 2 fields Partner function and Partner in my ALV grid display.
    Partner function is a drop down box and i have set F4 help for Partner based on input in Partner function field.
    The problem i'm facing is as below,
    I select Partner function e.g Contact Person  in the Partner function dropdown box and then if i press F4 for partner field the value in partner function field is automatically getting converted to UPPER CASE .
    as a result of this i'm not getting required result in my select statements.
    has anyone faced similar issues , kindly advise what needs to be done .
    Regards,
    Shrikanth

    u need to populate this in the fieldcatalog for partner function.
    <fieldcatalog>-LOWERCASE = 'X'.
    Edited by: Sukriti Saha on Mar 25, 2009 9:50 AM

  • 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

  • Problem with print preview in alv grid

    Hello all,
    I have to display base unit of measure(meins) in alv grid output. i am using a conversion routine to convert it from ST TO PC before display.After executing the report i am getting the correct data. the problem is when i select the print preview
    alv list is displayed. in that the unit of measure pc is not displayed, it is comming as '*******. what i came to know is the same conversion routine is triggered in the standard program for the display. so it canot convert that.
    so please help me out in solving this.
    Thanks in advance,
    Sarat

    hi sarath,
        this is an example code try using the statement before displaying, i think it works.
    *example cdoe.
    LOOP AT i_grp1 INTO wa_grp1.
    AT NEW tknum.
    READ TABLE i_grp1 intto wa_grp1 index sy-tabix.
    SUM.
    MOVE-CORRESPONDING wa_grp1 TO wa_grp2.
    APPEND wa_grp2 TO i_grp2.
    ENDAT.
    ENDLOOP.

  • F4 help in alv grid

    I developed an alv grid in which one field is ROUGH SIZE ( AUSP-ATWRT).I want F4 help in this field.
    I already wrote the code as given below but F4 help is not comming.
    IF LCAT-FIELDNAME = 'ROUGH_SIZE'.
          LCAT-REF_TABNAME = 'AUSP'.
          LCAT-REF_FIELDNAME = 'ATWRT'.
        ENDIF.
    Please help to fix this problem.
    Thanks,
    Rakesh

    Hi,
    Try this coding example:
    lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '6'.
      lv_fldcat-fieldname = 'ZEITB'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 5.
      lv_fldcat-scrtext_m = 'Time constraint'.
      lv_fldcat-edit = 'X'.
    *To avail the existing F4 help these are to
    *be given in the field catalogue
      lv_fldcat-f4availabl = 'X'.
      lv_fldcat-ref_table = 'T582A'.
      lv_fldcat-ref_field = 'ZEITB'.
    Regrds,
    Nikhil.

  • Need to help in alv grid graph

    Hi All,
       I made alv grid report.I put graph button in screen using pf status(&graph).
    Now when I execute the report output come and my graph button is also working fine.But when I click
    the graph button, the graph shows defalut column wise.Now I right click on graph and select chart type and then select LINES wise then graph shows LINES wise. Can we do default LINES wise so that
    when I click on graph button then it should come LINES wise default.
    Thanks,
    Rakesh

    HI,
    You can do this using the FM GFW_PRES_SHOW
    Check the sample program : DEMO_GFW_PRES_SHOW.
    For more infomation:
    refer to links:
    Re: How to plot graph in ALV?
    http://help.sap.com/saphelp_erp2005/helpdata/en/7e/daf830b46411d2961200a0c9308b1f/frameset.htm
    hope this infromation helps you.
    Thanks!

  • Problem While Saving the editable ALV GRID

    Dear Experts,
    I have a scenario in which i am display the ALV(using class) with some data in the custom container of module pool screen in the non-editable mode.Also i have save and edit buttons.If i click the edit button i have written the code to edit the some columns in the ALV grid, it is working fine.After editing it,when i click the save button then ALV has to refreshed with edited data and then it should go to non editable mode but it is not working.I have written the code for changing the editable ALv to non editable mode as follows :
      call method c_alvgd->set_ready_for_input
        exporting
          i_ready_for_input = 0.
    *****Row and column of the alv are refreshed after changing values
      stable-row = 'X'.
      stable-col = 'X'.
    *REfreshed ALV display with the changed values
    *This ALV is non editable and contains new values
      call method c_alvgd->refresh_table_display
        exporting
          is_stable = stable
        exceptions
          finished  = 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.
    Could you Suggest me solution for this issue ?
    Thanks & Regards,
    R.Dhineshraj.

    Dhinesh,
    I suppose that you are able to get your changes values on screen but not able to get your field in DISPLAY mode from editable mode, let me know if this is not your problem.
    When you press SAVE, after the PAI, again PBO will run and hence the editable code for that field will overwrite which will keep it editable.
    So, do something like this.
    data: gv_edit value 'X'.....  "global variable in TOP include
    PBO....
    loop at ...
    if gv_edit = 'X'.
    CALL METHOD lo_alv->set_ready_for_input
      EXPORTING
        i_ready_for_input = 1.
    else.
    CALL METHOD lo_alv->set_ready_for_input
      EXPORTING
        i_ready_for_input = 0.
    endif.
    endloop.
    PAI.
    when 'SAVE'.
    gv_edit =  space.
    When 'EDIT'.
    gv_edit = 'X'.
    Regards,
    Diwakar

Maybe you are looking for

  • When I try to update to iOS5, iTunes gets stuck on "Backing Up" its been there for hours and it barely moves

    When I try to update to iOS5, iTunes gets stuck on "Backing Up" its been there for hours and it barely moves. It finished backing up one then it went to a "Extracting Software" on the iTunes status bar up top and then it gave me an error saying somet

  • Zip and directory or package

    How on earth do I zip a package like an Omnigraffle file? I have a nice folder-action script that zips a file into an archive when it is dropped into the folder, but when I dropped an omnigraffle file into the folder it broke it into all the files th

  • Jar file for com.sapportals.wcm.service.propertyconfig

    Hi all, Where can i find the jar file for <b>com.sapportals.wcm.service.propertyconfig</b>. <b></b> If anyone can send that to my mail id(<b>[email protected]</b>) it would be very useful. Points will be rewarded for helpful answers. Regards Rajeev.

  • The product wont even open

    I just bought AEcc on my new macbook pro and upon opening it, there was no welcome screen and all of the tabs such as "new composition" are all disabled. It is just sitting on the render queue page. Does anyone know what i should do from here?

  • During updating version 9.0.7 loss effect riple is possible recover this?

    after updating version 9.07 the effect ripple is not present and in old video loss this effect, i want reinstalled this effect but i dont' know the methode