Alv multiple selections

hi,
my report is used to tigger a bdc .now in my alv report i have to select multiple clomuns but without using 'control key' in the keyborad.can anybody give me the coding for this requirement......

There is an option you should activate so you can make multiple selection. Check the example programs in SAP.
edit:
Just noticed: you're talking about columns and not rows.
Edited by: Maen Anachronos on Oct 6, 2008 1:37 PM

Similar Messages

  • Multiple selection in the ALV is not possible after system upgrade

    Hi Colleague,
    I had been using an ALV, which was performing as desired before, but recently we had a system upgrade to NW7.0 and after that in this ALV multiple selection of records/rows is not allowed.
    The colleagues who upgraded the system suggested that this may be because this ALV is instantiated at many places. I would request you to kindly provide a solution for the same ASAP, as I am not able to proceede ahead.
    Warm regards,
    Roopesh

    Hi all,
    Thanks for your replies, I had figured out the actual problem. The reason was, the referance of the selected rows was lost as I was doing bind elements to the context after moving to wddomodify.
    So I figured out an alternative solution to avoid binding on selection of records.
    Best regards,
    Roopesh
    Edited by: Roopesh Dolle on Apr 14, 2011 7:04 AM
    Edited by: Roopesh Dolle on Apr 14, 2011 7:05 AM

  • Get Selections From ALV on Multiple Selection Mode

    Hi,
    How can i get values of selected rows from ALV that has selection '0..n' (multiple selection) ?
    Can somebody help me pls?
    Thanks.

    Hi Nurullah,
    Steps to make multiple rows selectable in ALV:
    1) Create the selection property of the node that you are binding to the DATA node as o..n
    2) Un-check the, "Initialization Lead Selection" checkbox for the node which you are using to bind to the DATA node
    3) In the WDDOINIT method specify the ALV's selection mode as MULTI_NO_LEAD. It is important that you set the selection mode to MULTI_NO_LEAD or else in the end you would be capturing 1 row lesser than the total number of rows the user has selected. This is because 1 of the rows would have the LeadSelection property & our logic wouldnt be reading the data for that row. Check the example code fragment as shown below:
    DATA lo_value TYPE REF TO cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model( ).
      CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
        EXPORTING
          value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
    Steps to get the multiple rows selected by the user
    In order to get the multiple rows which were selected by the user you will just have to call the get_selected_elements method of if_wd_context_node. So as you can see its no different from how you would get the multiple rows selected by the user in a table ui element. First get the reference of the node which you have used to bind to the ALV & then call this method on it. Check the example code fragment below:
    METHOD get_selected_rows .
      DATA: temp TYPE string.
      DATA: lr_node TYPE REF TO if_wd_context_node,
                wa_temp  TYPE REF TO if_wd_context_element,
                ls_node1 TYPE wd_this->element_node_flighttab,
                lt_node1 TYPE wd_this->elements_node_flighttab.
      lr_node = wd_context->get_child_node( name = 'NODE_FLIGHTTAB' ).
    " This would now contain the references of all the selected rows
      lt_temp = lr_node->get_selected_elements( ).
        LOOP AT lt_temp INTO wa_temp.
    " Use the references to get the exact row data
          CALL METHOD wa_temp->get_static_attributes
            IMPORTING
              static_attributes = ls_node1.
          APPEND ls_node1 TO lt_node1.
          CLEAR ls_node1.
        ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • How to disable multiple select option in OO ALV.?

    I want to display an ALV with the multiple select button disabled.I want the "select" button at the start of each row but  the "select all/deselect all" button at the right hand top corner of the display be
    disabled.
    Please help me out.

    Hi
    You can add a new column to your internal table for the selection field.
    After registering the required events, for eg:
    METHOD alv_set_events.
      DATA: lr_events TYPE REF TO cl_salv_events_table.
      lr_events = mcn_alv->get_event( ).
    *- Register the event Double click
      SET HANDLER me->mt_on_double_click FOR lr_events.
    *- Register the event User command
      SET HANDLER me->mt_on_user_command FOR lr_events.
    ENDMETHOD.
    you can process the selected records and mark them as "Processed" by setting a color to the record.
    DATA: BEGIN OF lw_farb ,                  " Farbstruktur für ALV
            farb1(1) VALUE 'C',
            farb2(1),
            farb3(1) VALUE '0'.
      DATA: END OF lw_farb.
    DATA: lf_col_bearbeiten      TYPE i VALUE 5.
      lw_farb-farb2 = lf_col.
      ef_col = lw_farb.
    Regards
    Raj

  • How to create Multiple Selection Screen in ALV

    Hi,
    Can anybody tell me how to create the Multiple Selection screen in ALV reports.
    Plse give me code sample if possible.
    Thanks in advance
    KP

    Hi Rich,
    thanks for the reply.
    I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
    eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen. 
    Hope my problem is understood.
    Thanks
    KP

  • Multiple Selection on Matchcode in ALV Grid

    I need to implement a Matchcode with multiple selection on a Field in an ALV Grid. On F4 in this specific Field the specific matchcode muss be enable with multiple selection. And after multiple selection by the user, the result muss be concatenate and insert to this field.
    Any suggestions or code?
    Thanks and Best Regards
    Franck

    Check the program: BCALV_TEST_GRID_F4_HELP.
    IN the code, search foor the fm: F4IF_FIELD_VALUE_REQUEST.
    You should pass the parameter MULTIPLE_CHOICE = 'X' for multiple choice in the F4 pop up.
    Once you get the returned table, you can concatenate the result and put it it the target field.
    Regards,
    Ravi

  • How to avoid multiple selection in ALV tree control?

    Hi,
    Experts,
    I want to avoid multiple selections on Alv tree control after pressing control keyboard button(Ctrl). Even by pressing Ctrl keyword button i want to select only one row of a Alv tree control.i have used cl_salv_tree class for it is there any method to achieve this please pass some code/idea on it.
    Thanks in advance,
    Shabeer ahmed.

    I haven't tried it before but it should help.
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]

  • How to apply List box for multiple selection of rows  in ALV report ?

    Hi Exprots,
    1: How to apply List box for multiple selection of rows  in ALV report ?
    Thanking you.
    Subash

    hi,
    check the below program.
    REPORT zalv_dropdowns.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container,ALV grid, Fieldcatalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    START-OF-SELECTION.*Call to ALV
      CALL SCREEN 600.*On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.   
    CASE ls_fcat-fieldname.
       WHEN 'SLART'.
    *is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    is the second list box    
    WHEN 'ABART'.       
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.   
    ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .*Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.*Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Primary school'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Lower Secondary'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Upper Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Professional School'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 College'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 University'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Establishment'.
      APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2').  ls_dropdown-handle = '2'.
      ls_dropdown-value = '10 Primary School certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '20 Lower secondary/Junior high'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '30 High school diploma(B-levels)'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '31 Vocational'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '32 Matriculation'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '40 Specialist vocational certificate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '50 College degree Level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '51 College degree Level2'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '52 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '60 Univ Degree level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '61 Bachelors degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '62 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '63 Licenciate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '64 Doctors Degree Ph.D'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '89 None'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '90 Unknown'.
      APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .  gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.ENDFORM.                    " build_layout
    endform.
    Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM

  • Multiple selection in DISPLAY only ALV GRID

    Hi,
    I would like to make the rows of the ALV Grid Display only at the same time I would like to make multiple selection possible.
    Multiple selection is possible by giving EDIT = 'X' at the layout level. But then if we give EDIT = ' ' at the fieldcatalogue level or no_input = 'X' at the layout level it is still in Editable mode. Kindly help me.
    Thanks

    Hi,
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
      CALL METHOD go_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a valid line'.
        EXIT.
      ENDIF.
      LOOP AT gi_index_rows INTO g_selected_row.
         READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
        ENDIF.
      ENDLOOP.
    Example 2: Set selected row(s).
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines > 0.
        CALL METHOD go_grid->set_selected_rows
            exporting
              it_index_rows = gi_index_rows.
      ENDIF.
    Make an Exception field ( = Traffic lights)
    There can be defined a column in the grid for display of traffic lights. This field is of type Char 1, and can contain the following values:
    1 Red
    2 Yellow
    3 Green
    The name of the traffic light field is supplied inh the gs_layout-excp_fname used by method set_table_for_first_display.
    Example
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
    TYPES:  traffic_light TYPE c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
      Set the exception field of the table
        LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-traffic_light = '1'.
          ELSEIF g_wa_sflight-paymentsum => 100000 AND
                 g_wa_sflight-paymentsum < 1000000.
            g_wa_sflight-traffic_light = '2'.
          ELSE.
            g_wa_sflight-traffic_light = '3'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
      Name of the exception field (Traffic light field)
        gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
      Grid setup for first display
        CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                  is_layout               = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Refresh grid display
    Use the grid method REFRESH_TABLE_DISPLAY
    Example:
    CALL METHOD go_grid->refresh_table_display.
    ALV Grid Control with column and row selection
    Selecting and Deselecting Rows
    Use
    Depending on where the ALV grid control is used, there are various methods for selecting and deselecting cells and rows:
    If no pushbuttons are displayed on the left edge of the list:
    You can only select one row at a time.
    You can select multiple rows.
    If pushbuttons are displayed on the left edge of the list:
    You can select several rows or individual cells.
    You can select several rows as well as several cells or individual cells.
    Procedure
    If no pushbuttons are displayed on the left edge of the list, you select a row by clicking an entry in the row.
    If pushbuttons are displayed on the left edge of the list, you select a row by clicking the pushbutton on the relevant row.
    In this case, you select the relevant cell by selecting the entry in the row.
    In both cases:
    To select several rows, press the Shift button and choose the cells as described above.
    Adjacent rows:
    Select a row, choose Shift or Control, and select the desired rows,
    or
    Choose Shift, and select the first and the last of the desired rows,
    or
    Select a row, keep the mouse button pressed, and pass over the desired rows.
    Rows that are not adjacent:
    Select a row, choose Control, and select the desired rows.
    All rows:
    You can only select all rows at once if pushbuttons are displayed on the left side of your list. To select all rows, choose .
    To deselect individual rows, press the Ctrl button and click the relevant row.
    Result
    The selected cells have an orange background. The position of your cursor is indicated with a yellow background.

  • I have web dynpor alv tables set up for multiple selections but not working

    Hi ,
    I have numerous alv tables within my application and i have following the steps needed to set them up for multiple selection.
    The context node selection property is set up as 0..n
    I also have the modify method set up with the method call
    CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
        EXPORTING
          value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
    I also have the no lead selection option set so initially there is no entry selected
    I can select one entry without a problem.
    I can also select one entry and then if i use the shift button when selecting another record it will select all the records in between.
    However i cant pick numerous individual records at the same time.
    I try by selecting a record and the n using the control button to select a second record but it wont work.
    Any ideas what i am missing or what i am doing wrong.
    Any help is greatly appreciated.
    Regards
    Brian

    I tried the code listed above but it throws nothing but error messages
    The exact code i have in my modifyview method is as follows
    data lo_cmp_usage type ref to if_wd_component_usage.
    data lr_config TYPE REF TO cl_salv_wd_config_table.
    data lr_column TYPE REF TO cl_salv_wd_column.
    data lr_link TYPE REF TO cl_salv_wd_uie_link_to_action.
    data lr_column_settings type ref to if_salv_wd_column_settings.
    data lr_column_header type ref to cl_salv_wd_column_header.
    data lr_table_settings type ref to if_salv_wd_table_settings.
    data lr_columns type ref to cl_salv_columns_table.
    lo_cmp_usage =   wd_this->wd_cpuse_my_act_alv( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
    endif.
    DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
    lo_INTERFACECONTROLLER =   wd_this->wd_cpifc_my_act_alv( ).
      DATA lo_value TYPE ref to cl_salv_wd_config_table.
      lo_value = lo_interfacecontroller->get_model(
    CALL METHOD lo_value->if_salv_wd_table_settings~set_selection_mode
        EXPORTING
          value = cl_wd_table=>e_selection_mode-MULTI_NO_LEAD.
    lo_value->if_salv_wd_std_functions~set_aggregation_allowed( abap_true ).
    lo_value->if_salv_wd_std_functions~set_group_aggregation_allowed( abap_true ).
    lr_column_settings ?= lo_value.
    lr_table_settings ?= lo_value.
    lr_column = lr_column_settings->get_column( 'ACTIVITY_NO' ).
    CREATE OBJECT lr_link.
    lr_link->set_text_fieldname( 'ACTIVITY_NO' ).
    lr_column->set_cell_editor( lr_link ).
    lr_column = lr_column_settings->get_column( 'ACTIVITY_DESCR' ).
    lr_column->set_width( '160' ).
    lr_column->delete_header( ).
    lr_column_header = lr_column->create_header( ).
    lr_column_header->set_text( ls_dashboard_display-ACTIVITY_DESCR ).
    More code to set up individual columns  *********************
    lr_table_settings->set_visible_row_count( -1 ).
    lr_table_settings->set_footer_visible( 0 ).
    endmethod.
    The code listed in the note looks completely different to what i currently have , i dont read any nodes when setting up the alv table . Am i putting the code in the wrong place?
    Edited by: Brian Ramsell on Nov 10, 2009 2:21 PM

  • Multiple selection of rows in alv output list

    experts,
    using 'REUSE_ALV_GRID_DISPLAY'
    the following is the sample code ,without using ctrl or shift key i am unable to select multiple rows .
    any resolvable answers.
    REPORT zpushbutton1.
    type-pools : slis.
    *structure declarations
    types : begin of ty_mara,
    matnr type matnr,
    ernam type ernam,
    mbrsh type mbrsh,
    CHKBOX TYPE CHAR1,
    end oF ty_mara.
    types : begin of ty_marc,
    matnr type matnr,
    werks type werks_d,
    pstat type pstat_d,
    end of ty_marc.
    *internal table declarations
    DATA : gi_mara TYPE STANDARD TABLE OF TY_MARA INITIAL SIZE 0.
    data : gi_fieldcat type slis_t_fieldcat_alv.
    *workarea declarations
    DATA : gs_mara TYPE TY_MARA,
    gs_fieldcat type slis_fieldcat_alv.
    SELECT matnr
    ernam
    mbrsh
    FROM mara
    INTO TABLE gi_mara
    UP TO 10 ROWS.
    perform build_fieldcat using :
    '1' 'CHKBOX' 'GI_MARA' 'SELECT' 'X' ,
    '2' 'MATNR' 'GI_MARA' 'MATEIRALNO' ' ',
    '3' 'ERNAM' 'GI_MARA' 'PERSON CREAT' ' ',
    '4' 'MBRSH' 'GI_MARA' 'INDUSTRY' ' '.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IT_FIELDCAT = GI_FIELDCAT
    TABLES
    t_outtab = GI_MARA
    *& Form BUILD_FIELDCAT
    form BUILD_FIELDCAT using
    PCOL TYPE CHAR2
    PFLDNAME TYPE CHAR10
    PTABNAME TYPE CHAR10
    PSELTEXT TYPE CHAR15
    PINPUT TYPE CHAR1.
    GS_FIELDCAT-COL_POS = PCOL.
    GS_FIELDCAT-FIELDNAME = PFLDNAME.
    GS_FIELDCAT-TABNAME = PTABNAME.
    GS_FIELDCAT-SELTEXT_M = PSELTEXT.
    GS_FIELDCAT-EDIT = PINPUT.
    APPEND GS_FIELDCAT TO GI_FIELDCAT.
    CLEAR GS_FIELDCAT.
    endform. " BUILD_FIELDCAT
    thanks and regards

    experts,
    can we set cursor properties during the output display
    ex : i have used function module reuse_alv_grid_display to display a list of records with passing parameter
    is_layout-box_fieldname and is_layout-box_tabname to list the first column as pushbutton.
    when i select a row ,gets selected now when i move the
    cursor (mouse) to the other row and select the row, the row previously selected will be deselected.
      solution to the above problem is to hold the ctrl or shift key for
    multiple selections.
    is there any other alternative procedure so that without holding
    ctrl or shift key multiple rows get selected.
    thks and rgrds

  • ALV to select more than one column by row using set_table_for_first_display

    Hello everyone,
    I am developing an application (ALV OO) to select more than 1 column by row ( one ). This is an a holiday application so the idea is:
    -One column will be the day, and the row will be the user.
    So I am trying to select more than one day by user (that would be the row).
    I am using the method set_table_for_first_display but when it shows the alv, doesn't let me to select more than one column with a click of the mouse.
    Does anybody know if I can do this (select more than one column, by row) in somehow?
    Please let me know if you need more clarification about this.
    Thanks in advance
    Diego

    Hi Diego,
    it's all in the documentation.
    set different selection modes through the value of the field u201CSEL_MODEu201D in the layout structure.
    SPACE
    same as 'B'
    see 'B'
    Default setting
    'A'
    Column and row selection
    Multiple columns
    Multiple rows
    The user selects the rows through pushbuttons at the left border of the grid control.
    'B'
    Simple selection, list box
    Multiple columns
    Multiple rows
    'C'
    Multiple selection, list box
    Multiple columns
    Multiple rows
    'D'
    Cell selection
    Multiple columns
    Multiple rows
    Any cells
    The user selects the rows through pushbuttons at the left border of the grid control
    Beyond setting this option, you can set u201CNO_ROWMARKu201D option to hide the mark column which is normally visible when the selection mode allows multiple row selection.
    One point to notice here is that if you set your ALV Grid as to be editable, it may override your selection mode regardless of your layout settings.
    This is from SDN Community Contribution "An Easy Reference for ALV Grid Control" By: Serdar ŞİMŞEKLER
    Sorry, no link,. it's on my disk.
    Regards,
    Clemens

  • How to remove multiple selections button in LDB selection screens

    Hi Friends,
    I am facing a problem while doing an HR object. I took an LDB with Selection screen '100'. i got the company code select-option in it. But i need to avoid multiple selection button so that i have to take only a single company code to print the ALV heading as the company Text. Please tell me quickly, how can i do it.
    Regards,
    Santosh.

    You may have to do something like below where S_BUKRS is your company code select option of the LDB.
    REPORT  zakstest1 NO STANDARD PAGE HEADING.
    TABLES t001.
    TYPE-POOLS: sscr.
    SELECT-OPTIONS s_bukrs FOR t001-bukrs.
    INITIALIZATION.
    *-- Remove the the ranges option
      PERFORM remove_ranges_for_sel_options.
    *&      Form  remove_ranges_for_sel_options
    *       text
    FORM remove_ranges_for_sel_options.
      DATA: optlist  TYPE sscr_opt_list,
            restrict TYPE sscr_restrict,
            ***      TYPE sscr_***.
    *-- Allow EQ only
      CLEAR optlist.
      optlist-name       = 'EQ_ONLY'.
      optlist-options-eq = 'X'.
      APPEND optlist TO restrict-opt_list_tab.
      CLEAR ***.
      ***-kind    = 'S'.
      ***-sg_main = 'I'.
      ***-sg_addy = 'N'.
    *-- Make S_BUKRS range to have only EQ
      ***-name    = 'S_BUKRS'.
      ***-op_main = 'EQ_ONLY'.
      APPEND *** TO restrict-***_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          restriction            = restrict
        EXCEPTIONS
          too_late               = 1
          repeated               = 2
          selopt_without_options = 3
          selopt_without_signs   = 4
          invalid_sign           = 5
          empty_option_list      = 6
          invalid_kind           = 7
          repeated_kind_a        = 8
          OTHERS                 = 9.
    ENDFORM.                    " rem_ranges

  • Multiple Selection in dropdown in module pool/text editor

    Hi,
    How to provide an option for multiple selection in dropdown/listbox? Is there any option for this other than triggering F4 function and displaying in ALV or table control with multiple selection option?
    otherwise, is it possible to have multiple selection in text editor?
    Thanks,
    Amal

    HI,
    Instead of displaying multiple selection in deopdown list go for multiple section in ListBOx. It will be easier for you. Here is the demonstration of using ListBox along with screen shots and Code.
    Check this Link
    <Link farm to blocked site removed by moderator>
    Edited by: sum_it2 on Nov 16, 2011 9:37 AM
    Edited by: Vinod Kumar on Nov 16, 2011 3:01 PM

  • Multiple selection and lead selection

    I have now multiple selection in my application via selectin mode 8. but i also want that the app reacts when i make one selection. the lead_selection argument does not work anymore with mode 8.
    Anyone nows how to manage that?

    Hi,
    u want to know the value/column name of clicked cell in ALV, am i right?
    If i'm right do below:
    1. Create a event handler with name on_click , while creating the event handler u have to specify the select the event as ON_AFTER_CONFIG (Press F4 on the Event row).
    Inside on_click u can get the value of the selected cell.
    U have WDEVENT & R_PARAM parameters.
    Using these 2 parameters u can get as ur wish.
    Reward if useful.
    Thanks,
    Router

Maybe you are looking for