How to trigger dropdown list click in editable alv?

I have an editable alv - and wehn a certain field is changed - I want to force the user to update a 2nd field, which is filled via a dropdown list.
Ive trapped the change of the first field, in the handle_data_changed method, but need to from there - call an event to simulate a click onthe 2nd dropdown field, and can not figure out how to do that. the method modify_cell wont work as it expects a value to be passed in and I need to use my dropwdown.
How is this done?
Do I have to change it from a dropdown to an f4 event? I woudl really rather not.

Dear srivallika,
first you have do build up an steploop on your dynpro for the it_ccode-bukrs
AT PBO
loop at it_ccode cursor g_ccode_cur into wa_cccode.
my set loopc
module ccode_loopc.
endloop.
Include PBO
module ccode_loopc.
  g_ccode_loopc = sy-loopc.
endmodule.
You only see via DIAG Dialog the displayed rows on the Dynpro.
So if you only have a steploop of 4 rows -- you only get 4 rows to the wgate.
Better use the field-set makro.
AT PBO
module rfc_fieldset_ccode.
INCLUDE PBO
module rfc_fieldset_ccode.
data: ls_ccode like line of it_ccode.
data: i type i.
I'll use deeper structure
  perform rfc_fieldset_ccode.
but you also can define the code here
loop at it_ccode into ls_ccode.
     add 1 to i.
     field-set 'INDX'       i i .
     field-set 'BUKRS'   i   ls_ccode-bukrs .
endloop.
endmodule.
Why to do this? The field-set makro (don't forget to include AVWRTCXM at your topinclude) will send the data from internal table via AGATE to the WGATE.
Here now you can define the dropdown list:
srivallika, i'll hope i could help you a little. If you have any questions, you won't bother me. ASK!
With best regards
Thorsten

Similar Messages

  • How to set Dropdown list in tablen whith others Dropdown values in each row

    how to set Dropdown list in tablen whith others Dropdown values in each row of the table

    hi ,
    You have to add the parent element before adding data to the child node ...you follow the below steps it will work
    1) Take ContextStructure as follows ...
    tabledata (valuenode)
        ddownbyindex( value node) --within the tabledata node
             value (attribute)
    2)Binding to your layout
      tabledata (node) ---bind this to the dataSource property of your  table
          ddownbyindex( node)
                Value (attribute)--bind to the texts property of you DDbyIndex
    3)In wdinit() method add the following code
         IPrivate<Your view name>.ITabledataElement tabledataElement =wdContext.createTabledataElement();
        wdContext.nodeTabledata().addElement(tabledataElement);
        for(int i=0;i<5;i++)
         IPrivate<Your viewname>.IDdownbyindexElement ddbyindexElement=wdContext.createDdownbyindexElement();
             ddbyindexElement.setValue("Value"+i);
             wdContext.nodeDdownbyindex().addElement(ddbyindexElement);
    And set the cardinality property of the table node as 0..n
    and dropdownbyinex node to 1..n
    You try it ...
    Regards
    Madhavi
    Edited by: madhavi kotra on Sep 2, 2008 6:00 PM

  • How create combo/dropdown list in Acrobat toolbar?

    Hi! How create combo/dropdown list in my custom Acrobat toolbar (using plugins SDK)?

    You can add a dropdown/flyout menu to a toolbar button using the APIs provided.  There is a sample in the SDK.
    There is no support for an edit field or other type of UI.

  • [JS CS3] Can a dropdown list be made editable?

    Hello,
    I would like to have a dropdown list that is editable. The list I have is a list of existing xml tags. I have a script that creates new xml tags and I would like to include the now existing tag names and the ability to create new names.
    If a dropdown list cannot be made editable I can always create two fields, one a dropdown list, the other a textEditbox. But I'd like to just have one.
    Thanks,
    Tom

    Hmmmm...I thought I was using ScriptUI, but I now see in the ScriptUI Classes that there is an element called "ListItem" that appears to foot the bill. It appears that one can add to its drop down list.
    I'm not sure I want to rewrite what I have in "classical" just to eliminate an extra field. It is working fine now. Maybe next time I'll experiment with this.
    Thanks.

  • Search Criteria: how to filter dropdown lists?

    Hello Experts!
    In my 'Search Criteria' page of Complaints I have some fields such as Transaction ID, Transaction Type, Created By, Partner Function, etc. 'Partner Function' is bringing ALL partner functions of the system in the dropdown list. I need to restrict/filter this dropdown list in order to bring ONLY the values that I need.
    The same thing happens, for example, the field 'Status'. It brings all statuses of the system, but I just need it to bring the statuses of my Status Profile.
    This happens for all dropdown lists in all search pages.
    How can I filter these dropdown lists?
    Thanks a lot,
    Luis.

    Hi Luis,
    Redefine method GET_DEQUERY_DEFINITIONS and use the following piece of code:
    FIELD-SYMBOLS: <rt_result> TYPE crms_thtmlb_search_field_info.
    CALL METHOD super->get_dquery_definitions
        RECEIVING
          rt_result = rt_result.
    READ TABLE rt_result WITH KEY field = 'STATUS' ASSIGNING <rt_result>.
    <rt_result>-ddlb_options will contain all the values for status you see in the dropdown list. Modify this list as per your requirement and hence modify the main Internal table - RT_RESULT from <rt_result> for field status.
    I hope this helps.
    Thanks
    Vishal
    Edited by: Vishal Kesar on Nov 24, 2010 12:35 AM

  • How to use dropdown list in module pool

    Hi guys,
    I have provided  a dropdown list in my  screen in my module pool program.
    How should I insert values in the dropdown list.
    Regards
    Mac

    HI,
    Check this code.
    PROCESS AFTER INPUT
    PROCESS ON VALUE-REQUEST.
      FIELD ZDEPT-DEPTNO MODULE create_dropdown.
    *** DOUBLE CLICK ON CREATE_DROPDOWN
    MODULE create_dropdown INPUT.
      SELECT EMPNAME
                    DEPTNAME
                    FROM YDEPT
                    INTO CORRESPONDING FIELDS OF TABLE itab_details.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'DEPTNO'
                value_org       = 'S'
           TABLES
                value_tab       = itab_details
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc  0.
      ENDIF.
    ENDMODULE.
    HERE IN PAI DOUBLE CLICK THE MODULE THEN WRITE THE ABOVE CODE IT SHOULD WORK.
    YDEPT IS THE TABLE I CREATED TO STORE DEPARTMENT NUMBERS.
    ZDEPT IS THE STRUCTURE OF THE TABLE.
    IF YOU ARE STILL UNCLEAR
    PLEASE CHECK
    'DEMO_DROPDOWN_LIST_BOX' PROGRAM IN SE51 AND SCREEN NUMBER IS 100
    Regards and Best wishes.

  • How to implement dropdown list in catalog definition

    hi all,
    I am using wc11g, I defined my taskflow in DefaultGroupSpaceCatalog.xml and defined input parameters for this taskflow, but how to implement a dropdown list function when customer want to select one value from multiple available options, just like when user edit my taskflow in composer, in the "display options" tab, when user want to change background item, there is a dropdown list shows available values:
    light
    medium
    dark
    How to implement this dropdown list for my own parameters?
    Best regards

    Is their a specific reason why you are using taskflows and not portlets?
    Because with portlets you can have an additional mode for doing the customization. You can create your own jspx page that represents that mode and then you can easily implement a dropdownlist or whatever form you want.
    Using taskflows, you don't have such features available as far as i know.
    Another solution would be to add a button in your taskflows that only renders when you are the admin. Otherwhise, the button does not show.
    That button can open a popup were you add a form with a dropdownlist and in the backing bean you can set the parameter yourself but i don't realy know the code needed for that because it is an input parameter of the taskflow, right?

  • How to create dropdown list for custom remote function module

    HI ,
           I created a custom remote function module for a ztable.table having four fields.But now the requirement is to maintain the dropdown list for input parameter .
    For eg: I maintain Input parameter as action.For that Action we have to maintain a dropdown list(display,insert,update and delete  values ) in function module.Is it possible.

    Hi
    Try using POPUP_GET_VALUES function module in the begining of the Function module this gives a POP to provide a value to you
    In this you can provide a value
    Check the import parameters of this Function module if it has COMBOBOX as parameter ( I dont have SAP access at this point of time) you can pass X to it so you get List box for the following fields
    Create a domain to field and assing fixed values to it and use it in any table(As this works with only existing tables)
    refresh fields.
    DATA: fields LIKE SVAL OCCURS 0.
    fields-tabname = 'MAKT'.
    FILEDS-FIELDNAME = 'MAKTX'.
    APPEND FIELDS.
    CALL FUNCTION 'POPUP_GET_VALUES'  " Try copying this in a Test program and execute
            EXPORTING
              POPUP_TITLE  = 'Enter Mail Id here'
              START_COLUMN = '5'
              START_ROW    = '5'
            IMPORTING
              RETURNCODE   = SRETURN
            TABLES
              FIELDS       = FIELDS.
    Cheerz
    Ramchander Rao.K
    Edited by: Rob Burbank on Nov 23, 2011 9:50 AM

  • How to put dropdown list for a field in MIGO

    Hi all,
    I added a new tab in MIGO by using the BADI  MB_MIGO_BADI
    in that tab for one of the field i have to put dropdown list (some static values)
    i tried VRM_SET_VALUES , but how to pass the static values to the screen field as dropdown list.
    please help on this issue.
    Thanks,
    Satish

    Hi,
    The logic u told is right it should work.
    PROCESS ON HELP-REQUEST.
      FIELD MSEG-VENDTYPE MODULE HELP.
      PROCESS ON VALUE-REQUEST.
      FIELD MSEG-VENDTYPE MODULE HELP_VENDOR.
    MODULE HELP_VENDOR INPUT.
    *break-point.
      wa_values-key = 'M'.
    wa_values-text = 'Manufacturer'.
    append wa_values to values.
    clear wa_values.
    wa_values-key = 'FD'.
    wa_values-text = 'First Stage Dealer'.
    append wa_values to values.
    clear wa_values.
    wa_values-key = 'I'.
    wa_values-text = 'Importer'.
    append wa_values to values.
    clear wa_values.
    wa_values-key = 'DI'.
    wa_values-text = 'First stage or Second stage dealer of Imported Goods'.
    append wa_values to values.
    clear wa_values.
    wa_values-key = 'MD'.
    wa_values-text = 'Manufacturers Depot or Consignment Agent'.
    append wa_values to values.
    clear wa_values.
    wa_values-key = 'SD'.
    wa_values-text = 'Second stage dealer of Indeginious Ecisable Goods'.
    append wa_values to values.
    clear wa_values.
    CALL FUNCTION 'VRM_SET_VALUES'
      EXPORTING
        ID                    = '01'
        VALUES                = VALUES
    EXCEPTIONS
       ID_ILLEGAL_NAME       = 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.
    ENDMODULE.                 " HELP_VENDOR  INPUT
    *&      Module  HELP  INPUT
          text
    MODULE HELP INPUT.
    if sy-uname = 'ABAPUSER'.
      break-point.
    endif.
    ENDMODULE.                 " HELP  INPUT
    Process on help req is triggering on pressing the F1 help but process on value req is not triggering on pressing F4 it is triggering before the screen display i.e in PBO can u tell wat might be the problem.
    Thank u very much.

  • How to fill dropdown list in Adobe form

    Hi Experts,
                  I am new to adobe form.Please tell me ,how to fill drop down list in adobe form?
    Thanks,
    Hans

    Hello Arafat,
    I am using a drop down list in Adobe Interactive Form for Web Dynpro ABAP.
    The form is of ZCI type layout and the form interface is of XML schema-based interface type and the XML schema source is set to "Generated".
    I have included the following code in WDDOINIT method of the view:
    data: handle1 type ref to if_wd_context_node,
    begin of zstruct,
    zktokd type kna1-ktokd,
    end of zstruct,
    zitab type table of zsttxecr.
    handle1 = wd_context->get_child_node( name = 'DATA.NODE1' ).
    select ktokd from kna1 into corresponding fields of zstruct.
    append zstruct to zitab.
    endselect.
    handle1->bind_table( new_items = zitab ).
    In the Adobe Form Designer, i have binded the node NODE1 to the enumerated drop down list from native web dynpro library. Still the drop down box is not getting populated.
    Please let me know what is missing.
    Thanks and Regards.

  • How to create dropdown list in table

    dear friends,
                         i created one table in dynpro. In table i have one column dropdown by index. when i changed the value in dropdown box , same value reflect in all row in addition of row where i selected the value. please somebody tell me what i should do????
    regards,
    sunil sharma

    Hi,
    If you have got 10 rows, In the first row if you have selected some value from dropdown then you want to have this same value
    to be shown across the other rows of the same column right. Also for the new row you want the same value right.
    if this is the case, then first implement the action for leadselect for that dropdown.
    if your node has 3fields, empno, begda, endda. for ex: endda is the dorpdown by index.
    In the OnleadSelect event -
    Write this code -
    You will get the element right. for that element get the record using
    get_static_attributes into ls_table1.
    Now,
    loop at lt_table into ls_table.
    ls_table-endda = ls_table1-endda.
    modify lt_table from ls_table index sy-tabix.
    endloop.
    lo_nd_node->bind_table( lt_table).
    Or
    Also try this out.
    Using the GET_ELEMENTS of IF_WD_CONTEXT_NODE
    loop at lt_elments into ls_elmenets.
    ls_elements->set_attribute
    exporting
    name  =  `ENDDA`
    value =   ls_table1-endda.
    endloop.
    Regards,
    Lekha.
    Edited by: Lekha on Sep 30, 2009 12:00 PM

  • Presenter 7 - how to insert marker type "Click" in Edit Audio dialog

    http://www.adobe.com/education/resources/hed/instructional/connect/collaborative_teaching/ pdfs/edit_audio_adobe_pres.pdf
    The above document includes information that you can add four types of markers by using the Audio Editor in Presenter and one of the marker types is mouse-click animation. I can't find a way to do it in reality. The only way to insert this type of market is in Edit Sync dialog, not in Edit Audio. This requires resynchronisation of the whole audio instead of just adding one marker. In Edit Audio dialog I only have markers of type "Wait for user" and "Go to slide".

    Hi,
    This problem Could happen when you referesh quality or test system.
    Your delta setup for the related master and transaction data needs to be reinit.
    What happens is when you init. the delta and subsequent delta is all maintained in your source system
    please check Notes 852443,424848,834229
    Hope this helps
    Thanks
    Teja
    Message was edited by:
            Teja badugu

  • How to use dropdown list in selection screen

    Hi everyone.
    I'm stating a new report and a drop down list is required in initial filtering. I red different articles in google but  istill just don't get it... please help...

    Sample Code:
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id, list TYPE vrm_values, value LIKE LINE OF list.
    * List box
    PARAMETERS: ps_parm AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
    * Populate list box values
      name = 'PS_PARM'.
      value-key = '1'. value-text = 'Line 1'. APPEND value TO list.
      value-key = '2'. value-text = 'Line 2'. APPEND value TO list.
    AT SELECTION-SCREEN OUTPUT.
    * Set list box with value
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = name
          values = list.
    START-OF-SELECTION.
      WRITE: / 'Parameter:', ps_parm.
    Regards,
    Angelo.

  • How can I use hotspot click in an ALV grid?

    Hello,
    I have a table that is displayed in an ALV grid and I would like to have one of the columns as clickable icons.
    For example:
    Print  |  Doc. Type | Name
    (icon) |   .docx      | first
    (icon) |   .pdf         | second ... and so on.
    I would like to click in the icon (Print column) and execute an action, but no matter what I do I can't set the action.
    I know that is not just setting "fieldcatalog-hotspot='X'", but I don't know how to use a hotspot handler.
    Here's some of the code I have:
    TYPES: BEGIN OF ty_docs,
                        print LIKE ICON-ID,
                        doc_type LIKE table_doc-TYPE,
                        name LIKE table_doc-NAME,
                 END OF ty_docs.
    DATA:  oref_dock TYPE REF TO cl_gui_docking_container,
                oref_alv TYPE REF TO cl_gui_alv_grid,
                i_fieldcat TYPE lvc_t_fcat,
                aux_fieldcat TYPE lvc_s_fcat,
                aux_lay TYPE lvc_s_layo,
                i_exclude TYPE TABLE OF syucomm,
                i_docs TYPE ty_docs,
                t_docs LIKE TABLE OF i_docs.
    AT SELECTION-SCREEN OUTPUT.
       APPEND 'ONLI' TO i_exclude.
       APPEND 'SJOB' TO i_exclude.
       APPEND 'PRIN' TO i_exclude.
       CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
         EXPORTING
           p_status = sy-pfkey
           p_program = sy-repid
         TABLES
           p_exclude = i_exclude.
    AT SELECTION-SCREEN.
       CHECK sy-ucomm = space.
         SELECT
               icon~ID AS print
               doc~TYPE AS doc_type
               doc~NAME as name
                 INTO CORRESPONDING FIELDS OF TABLE t_docs
                 FROM table_doc AS doc
                      INNER JOIN ICON AS icon    
                        ON icon~NAME EQ 'ICON_PRINT'
                 GROUP BY icon~ID doc~TYPE doc~NAME.
       IF sy-subrc = 0.
         IF oref_dock IS NOT BOUND.
           CREATE OBJECT oref_dock
              EXPORTING
                repid = sy-repid
                dynnr = sy-dynnr
                side = cl_gui_docking_container=>dock_at_bottom
                ratio = 90
             EXCEPTIONS
               OTHERS = 1.
         ENDIF.
         IF oref_alv IS NOT BOUND.
           CHECK oref_dock IS BOUND.
           CREATE OBJECT oref_alv
             EXPORTING
               i_parent = oref_dock
             EXCEPTIONS
               OTHERS = 1.
           CHECK oref_alv IS BOUND.
           aux_fieldcat-fieldname = 'PRINT'.
           aux_fieldcat-coltext = 'Print'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-print'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-just = 'C'.
           aux_fieldcat-hotspot = 'X'.
           aux_fieldcat-outputlen = 10.
           aux_fieldcat-col_pos = 0.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_fieldcat-fieldname = 'TYPE'.
           aux_fieldcat-coltext = 'Doc. Type'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-doc_type'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-outputlen = 15.
           aux_fieldcat-col_pos = 1.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_fieldcat-fieldname = 'NAME'.
           aux_fieldcat-coltext = 'Name'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-name'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-outputlen = 12.
           aux_fieldcat-col_pos = 2.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_lay-grid_title = 'Docs'.
           aux_lay-edit = ''.
           CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
             EXPORTING
              i_structure_name = 'ty_docs'
              i_internal_tabname = 't_docs'
            CHANGING
              ct_fieldcat = i_fieldcat
           EXCEPTIONS
             OTHERS = 3.
           CALL METHOD oref_alv->set_table_for_first_display
             EXPORTING
               i_structure_name = 'ty_docs'
               is_layout = aux_lay
             CHANGING
               it_fieldcatalog = i_fieldcat
               it_outtab = t_docs
             EXCEPTIONS
               OTHERS = 1.
         ELSE.
           CALL METHOD oref_alv->refresh_table_display
             EXCEPTIONS
               OTHERS = 1.
         ENDIF.
      ENDIF.
    Thank you so much in advance!

    Hi,
    After creating grid set the even handler for hot spot.
    SET HANDLER lcl_event_receiver=>handle_hotspot_click FOR alv_grid.
    Try this code:
    TABLES: mara,t001l.
    DATA: BEGIN OF i_alv OCCURS 0,
           matnr TYPE mara-matnr,
           mtart TYPE mara-mtart,
           matkl TYPE mara-matkl,
           groes TYPE mara-groes,
           maktx TYPE makt-maktx,
           END OF i_alv.
    DATA: wa_alv  LIKE LINE OF i_alv.
    DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.
    DATA: gt_t001l TYPE STANDARD TABLE OF t001l.
    CLASS lcl_event_receiver DEFINITION.
       PUBLIC SECTION.
    *-->Method for User command
         CLASS-METHODS :
         handle_hotspot_click FOR EVENT hotspot_click    OF
                                               cl_gui_alv_grid
                                     IMPORTING E_ROW_ID e_column_id.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    CLASS  lcl_event_receiver IMPLEMENTATION.
       METHOD handle_hotspot_click.
         READ TABLE i_alv INTO wa_alv
          INDEX e_row_id-index
           TRANSPORTING matnr.
         SET PARAMETER ID 'MAT' FIELD wa_alv-matnr.
         CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
       ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    PARAMETERS: p_check TYPE matnr.
    INITIALIZATION.
    PERFORM get_data.
    AT SELECTION-SCREEN OUTPUT.
    *  START-OF-SELECTION.
       DATA: variant TYPE  disvariant.
       DATA: repid TYPE sy-repid.
       repid = sy-repid.
       variant-report = sy-repid.
       variant-username = sy-uname.
       layout-zebra = 'X'.
       layout-edit_mode = 'X'.
       CHECK alv_container IS INITIAL.
       CREATE OBJECT alv_container
                   EXPORTING repid     = repid
                             dynnr     = sy-dynnr
                             side      = alv_container->dock_at_right
                             extension = 350.
       CREATE OBJECT alv_grid
              EXPORTING
                    i_parent          =  alv_container.
    * Set event handler
       SET HANDLER lcl_event_receiver=>handle_hotspot_click FOR alv_grid.
    *  ALV Specific. Data selection.
    *  Populate Field Catalog
       PERFORM get_fieldcatalog.
       CALL METHOD alv_grid->set_table_for_first_display
         EXPORTING
           is_layout        = layout
           is_variant       = variant
           i_save           = 'U'
           i_structure_name = 'I_ALV'
         CHANGING
           it_outtab        = i_alv[]
           it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    * FORM GET_DATA
    FORM get_data.
       SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
             FROM mara
               INNER JOIN makt
                 ON mara~matnr = makt~matnr
                        UP TO 100 ROWS
                    WHERE makt~spras = sy-langu.
       SORT i_alv ASCENDING BY matnr.
    ENDFORM.                    "get_data
    *      Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.
       DATA: ls_fcat TYPE lvc_s_fcat.
       REFRESH: fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Number'.
       ls_fcat-fieldname  = 'MATNR'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '18'.
       ls_fcat-fix_column = 'X'.
       ls_fcat-key        = 'X'.
       ls_fcat-hotspot    = 'X'.
       ls_fcat-col_pos    = '1'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Type'.
       ls_fcat-fieldname  = 'MTART'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '10'.
       ls_fcat-fix_column = 'X'.
       ls_fcat-key        = 'X'.
       ls_fcat-col_pos    = '2'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Group'.
       ls_fcat-fieldname  = 'MATKL'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '12'.
       ls_fcat-col_pos    = '3'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Size'.
       ls_fcat-fieldname  = 'GROES'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '30'.
       ls_fcat-col_pos    = '4'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Description'.
       ls_fcat-fieldname  = 'MAKTX'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '40'.
       ls_fcat-col_pos    = '5'.
       APPEND ls_fcat TO fieldcat.
    ENDFORM.                    "get_fieldcatalog
    Hope this solves your problem....

  • How to display records when clicking button in alv

    I am using screen painter to create two buttons
    'classical' and 'alv'.
    When i click the first button control should move to
    corresponding classical program.Evan i got the answer
    I am not able to display the "select-options button" in the
    output as in classical report program.
    It displays all records instead of selecting particular records from select-option button.
    So how to display the select option button(i.e in the classical view program) while "clicking the classical button " .
    plz send me the coding....

    hi,
    try this.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
                     VBELN FOR V_VBELN MODIF ID G2.
    SELECTION-SCREEN END OF SCREEN 100 .
    PAI.
    module mod_name.
    case sy-ucomm.
    when 'BUTT!'.
    call selection-screen 100.
    when 'BUTT2'.
    """"your ALV logic"""".
    endcase.
    endmodule.
    if...any doubts revert back.
    Regards
    Sandeep Reddy

Maybe you are looking for