Select multple rows in ALV without pressing pressing CTRL key

Hi experts,
Is there any way that I can select multple rows in an ALV without pressing pressing CTRL key?
I am using set_table_for_first_display method for displaying the ALV.
I tried different options of sel_mode, but none of them works without the CTRL key.
Thanks,
Mohit.

Hi,
You can add checkbox using ALV grid display.
Call your ALV grid as below. Pass 'wa_layout' with 'WA_LAYOUT-BOX_FIELDNAME' as your selection column name.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        I_CALLBACK_PF_STATUS_SET = 'F_GUI_STATUS'
        I_CALLBACK_USER_COMMAND  = 'F_USERCOMMAND'
        I_GRID_TITLE             = TEXT-026
        IS_LAYOUT                = WA_LAYOUT
        IT_FIELDCAT              = I_FIELDCAT
      TABLES
        T_OUTTAB                 = I_OUTTAB
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
Check below link for more help.
[http://www.sapfans.com/forums/viewtopic.php?t=40968]
Thanks,
Archana

Similar Messages

  • How to select multiple records in ALV with out pressing ctrl

    Hi Experts,
    Is there a way to select multiple records in ALV with out pressing ctrl button on the key board?
    Selection and deselection should allow multiple records.
    any clue is highly appreciated.
    regards,
    Ajay

    The keyboard always plays a role, although with the Shift key you can select blocks of records.
    ○       CTRLclick, CTRLspacebar
    Toggles a selection.
    ○       SHIFTclick, CTRLshift
    Selects the area from the lead selection to the row selected. If no lead selection is set, the selection starts from the first row. In the multiNoLead mode, the selection starts from the row last selected

  • Select  mutiple rows in ALV report output

    Hi All,
    I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
    Is there any options in Layout?
    Please let me know
    regards,
    Ajay
    Edited by: Ajay reddy on May 30, 2010 3:27 PM

    Hi Ajay,
    To select several rows without Control button, if the rows are adjacent:
    - select the first and the last of the desired rows with Shift button pressed
    or
    - select a row, keep the mouse button pressed, and pass over the desired rows
    I don't know an option without Control if the rows are not adjacent.
    http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
    Regards,
    Paulo Carvalho

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • Not able to select a row in ALV?

    Hi Experts,
    I am enhancing a standard e-recruiting WD ABAP component.
    It produces a search result as ALV.
    I am not able to select any row in ALV by clicking it like we normally do in ALV.
    I wrote below code to allow selection:
    lo_value->if_wd_salv_table_settings~set_selection_mode( cl_wd_table=>e_selection_mode-single).
    Even after this I am not able to select any row by clicking it.
    Need help to solve this.
    Regards,
    Sumit Oberoi

    Hi,
    To have the inputfields for the ALV.
    Get the column references of the ALV table and for each column rference create a inputfield object
    type CL_SALV_WD_UIE_INPUT_FIELD.
    lo_value is model object.
      CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
        RECEIVING
          value = wd_this->lit_columns.
    LOOP AT wd_this->lit_columns INTO wd_this->lis_columns.
          lv_id = wd_this->lis_columns-id.
          wd_this->gref_column = wd_this->lis_columns-r_column.
    case lv_id.
    when ' colname'.
                CREATE OBJECT lr_input
                  EXPORTING
                    value_fieldname = lv_id.
                CALL METHOD wd_this->gref_column->set_cell_editor
                  EXPORTING
                    value = lr_input.
    when ' colname'.
                CREATE OBJECT lr_input
                  EXPORTING
                    value_fieldname = lv_id.
                CALL METHOD wd_this->gref_column->set_cell_editor
                  EXPORTING
                    value = lr_input.
    endcase.
    endloop.
    Or you can take a attribute READ_ONLY for the node to which ALV table is bound.
    Set the readonly property to abap_false (for input field) by looping through the table.
    Get the column references and get the textview reference for each column and use the set_read_only
    method by passing the attribute name.
    This way the textview will now become the inputfield when the read_only property is set to abap_false.
    Regards,
    Lekha.

  • 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

  • My homepage shrunk when I accidentally pressed the ctrl key and the underscore key ( I mean't to press the shift key to underscore)

    I was entering a website a wanted to visit which required an underscore,
    but instead of pressing the shift key along with the ' underscore ' key (-_), I pressed the ctrl key and my firefox homepage shrunk to where the print was unreadable. How do I bring the homepage back to where it should be?

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    See:
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

  • Selection of rows in ALV grid (class CL_GRID_CATSXT)

    Hi all,
    The CATS transaction CATS_APPR_LITE is using the class CL_GRID_CATSXT, method GET_SELECTED_ROWS, to retrieve selected rows in the ALV report.
    The user/manager selects these rows to approve the work hours registered by his subordinates. He can only select and approve those rows that have been fully expanded, meaning he cannot select and approve total lines. (If he tries to do so, nothing happens).
    I have created a layout that shows only total lines per employee. Using this layout the manager should be able to select the total line for a particular employee and press the "Approve" button. In this way, I need to get a hold of the rows contained in the total line, meaning I need the row numbers of the actual rows which have been added up in the total line.
    Does anyone know how to do this...? As mentioned earlier, the CATS_APPR_LITE transaction is using class CL_GRID_CATSXT, method GET_SELECTED_ROWS.
    All helpful answers will be rewarded!
    Best regards,
    MV

    I guess method GET_SELECTED_ROWS returns the total lines when they are selected ?
    if so, you just have to do a LOOP on your internal table having same key fields as selected total line

  • Selecting multiple rows in ALV

    Hi Experts,
    I am using REUSE_ALV_GRID_DISPLAY FM in my program for my ALV output . I need to select multiple rows and will click a custom button on the appln toolbar. How can I know which all rows are selected? Please help.
    Many Thanks,
    Neeraj

    Hi,
    Try this way.
    <font color=blue><pre>
    REPORT ztest_alv_row_selection.
    DATA: BEGIN OF it_output OCCURS 0,
            select TYPE c,          <font color=red>"This variable stores the value when row selected.</font>
            bukrs  TYPE t001-bukrs,
            butxt  TYPE t001-butxt,
          END OF it_output.
    TYPE-POOLS:slis.
    DATA:it_events            TYPE STANDARD TABLE OF slis_alv_event,
         it_fieldcat          TYPE STANDARD TABLE OF slis_fieldcat_alv,
         wa_fieldcat          TYPE slis_fieldcat_alv,
         wa_events            TYPE slis_alv_event,
         wa_layout            TYPE slis_layout_alv.
    DATA:g_program            TYPE sy-repid VALUE sy-repid.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_output UP TO 100 ROWS.
      DEFINE fieldcatalog.
        wa_fieldcat-fieldname = &1.
        wa_fieldcat-tabname   = &2.
        wa_fieldcat-seltext_l = &3.
        append wa_fieldcat to it_fieldcat.
        clear  wa_fieldcat.
      END-OF-DEFINITION.
      fieldcatalog: "Column table       col text
                    'BUKRS' 'IT_OUTPUT' 'BUKRS',
                    'BUTXT' 'IT_OUTPUT' 'BUTXT'.
      wa_layout-box_fieldname     = 'SELECT'. <font color=red> "This has to be set to get selection</font>
      wa_layout-colwidth_optimize = 'X'.
      wa_events-name              = 'PF_STATUS_SET'.
      wa_events-form              = 'PF_STATUS_SET'.
      APPEND wa_events TO it_events.
      CLEAR wa_events.
      wa_events-name              = 'USER_COMMAND'.
      wa_events-form              = 'USER_COMMAND'.
      APPEND wa_events TO it_events.
      CLEAR wa_events.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = g_program
          is_layout          = wa_layout
          it_fieldcat        = it_fieldcat
          it_events          = it_events
        TABLES
          t_outtab           = it_output.
    *&      Form  PF_STATUS_SET
    FORM pf_status_set USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTEST'.
    1. When you set Pf status ZTEST, standard application tools will be removed.
    2. Goto SE41 give program 'SAPLKKBL' and status 'STANDARD_FULLSCREEN'.
    3. Copy the status from those to ZTEST of our program. Now you will see all standard functions.
    ENDFORM.                    "PF_STATUS_SET
          FORM USER_COMMAND                                          *
    FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN 'DISPLAY'.  "user presses SAVE
          LOOP AT it_output.
            IF it_output-select EQ 'X'.
          Process records that have been selected
              WRITE:/ it_output.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    ENDFORM.                    "user_command</pre></font>
    Thanks
    Venkat.O

  • Select single row in ALV grid

    ABAPer's ,
    Does anyone can guide me to select single row only in ALV grid , without OO.

    Hello,
    I did not get u.
    But check the below code it may help u.
    tables: mara.
    TYPE-POOLS: SLIS.
    data:repid like sy-repid.
    data: itb type mara occurs 0 with header line,
    IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV WITH HEADER LINE,
    IT_LAYOUT TYPE SLIS_LAYOUT_ALV,
    ITB1 TYPE MAKT OCCURS 0 WITH HEADER LINE.
    selection-screen begin of block b.
    parameters: p_matnr type matnr.
    selection-screen end of block b.
    select * from mara into table itb where matnr = p_matnr.
    SELECT * FROM MAKT INTO TABLE ITB1 WHERE MATNR = P_MATNR.
    repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = repid
      I_CALLBACK_PF_STATUS_SET       = ' '
       I_CALLBACK_USER_COMMAND        = 'HANDLE_USER_COMMAND'
       I_STRUCTURE_NAME               = 'MARA'
       IS_LAYOUT                      = IT_LAYOUT
       IT_FIELDCAT                    = IT_FIELDCAT[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = itb
    EXCEPTIONS
      PROGRAM_ERROR                  = 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.
    FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
    SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN '&IC1'.
    CLEAR IT_FIELDCAT[].
    IF RS_SELFIELD-FIELDNAME = 'MATNR'.
    READ TABLE ITB1 INDEX RS_SELFIELD-TABINDEX.
    WRITE: / ITB1-MAKTX.
    ENDIF.
    ENDCASE.
    ENDFORM. "HANDLE_USER_COMMAND
    Regards

  • Not able to select a row in ALV in Webdynpro

    Hi everyone,
    I have developed a webdynpro application and I have declared component usage for SALV_WD_TABLE.
    The data gets displayed in the ALV, but always the first row is selected.
    When I try to select another row,I am not able to select.
    Could anyone please suggest what might be the problem ?
    Thanks in advance.
    Regards,
    Kumudha.

    Hi Manas,
    Thanks for the inputs.
    I am placing the code below for your reference.
    I try to change the below as Display Text as Code...But it is not happening Plz check
    method wddoinit.
      if wd_this->ls_setup is initial.
        select single * from yyua_c_setup into wd_this->ls_setup
          where system_id = sy-sysid.
      endif.
      "adjustments for ALV
      data lo_cmp_usage type ref to if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
      if lo_cmp_usage->has_active_component( ) is initial.
        lo_cmp_usage->create_component( ).
      endif.
      data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
      l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
      data: l_value type ref to cl_salv_wd_config_table,
            lr_header_t type ref to cl_salv_wd_header,
            lv_text type string.
      l_value = l_ref_interfacecontroller->get_model( ).
      data: lr_column_settings type ref to if_salv_wd_column_settings,
            lr_input_field type ref to cl_salv_wd_uie_input_field,
            lr_column type ref to cl_salv_wd_column.
    Set column title and position
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'CSINSTA' ).
      lr_column->set_position( 1 ).
    lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/REQUEST_NUMBER' ).
      lr_column->r_header->set_text( 'Installation' ).
      lr_column->r_header->set_ddic_binding_field( '00' ).
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFUNAME' ).
         |
      lr_column->set_position( 18 ).
    lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/ACTIVITY_DATE' ).
      lr_column->r_header->set_text( 'Job profile ext' ).
      lr_column->r_header->set_ddic_binding_field( '00' ).
    Hide columns
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'ERFTSTMP' ).
      lr_column->set_visible( 0 ).
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'AETSTMP' ).
      lr_column->set_visible( 0 ).
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'STATUS' ).
      lr_column->set_visible( 0 ).
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'PRIO' ).
      lr_column->set_visible( 0 ).
      lr_column = l_value->if_salv_wd_column_settings~get_column( 'ISSUE' ).
      lr_column->set_visible( 0 ).
      data: lr_functions type ref to if_salv_wd_function_settings,
            lr_function type ref to cl_salv_wd_function,
            lr_button_t type ref to cl_salv_wd_fe_button.
    Add self-defined functions in toolbar
      lr_functions ?= l_value.
      lr_function = lr_functions->create_function( 'SELECT' ).
      create object lr_button_t.
    lv_text = cl_wd_utilities=>get_otr_text_by_alias( 'Z_REFERENCE/VIEW' ).
      lr_button_t->set_text( 'Select' ).
      lr_function->set_editor( lr_button_t ).
    data : LR_FUNCTION_SETTINGS TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
    create object LR_FUNCTION_SETTINGS.
    SET row selectable as true
    CALL METHOD LR_FUNCTION_SETTINGS->IF_SALV_WD_TABLE_SETTINGS~SET_ROW_SELECTABLE
    EXPORTING
    VALUE = ABAP_TRUE.
    endmethod
    Regards,
    Kumudha.

  • Select ALL rows in ALV by an ACTION

    Hi All -
    Is possible to have a button with an Action "select all" and when the user trigger that action all the records in the ALV are selected?
    i.e ALV has 10 records (lines or rows) and user click on a button with text "SELECT ALL" and once they click that button all the rows/lines are selected.
    Thanks!
    Jason P-V

    Hi ,
    yes it can be done....
    here is the procedure to do it.....
    first we need to make the context node "selection" property equals to "0..n"  you can find this property at your component controller level.....where you set your "cardinality" as well...
    than create a button in your view layout where the alv is being displayed and write the following code for button action:
    DATA lo_nd_alv_table TYPE REF TO if_wd_context_node.
    navigate from <CONTEXT> to <alv_table> via lead selection
       lo_nd_alv_table = wd_context->get_child_node( name = wd_this->wdctx_alv_table ).
    DATA counter TYPE i.
      counter =   lo_nd_alv_table->get_element_count( ).
      DO counter TIMES.
          lo_nd_alv_table->set_selected(
        EXPORTING
        index = sy-index ).
      ENDDO.
    I just tested this...and it worked for me....
    Thanks...
    AS...
    Just forgot to mention....if you want to de-select them all...you can use the method:
    lo_nd_alv_table->CLEAR_SELECTION(
    the above code can be put in in the btn action method.....say you have two btns one to select all rows and one to de-select all....
    this code can go under de-select all btn action method.....
    Edited by: J Are on Dec 11, 2009 8:53 PM

  • Selecting all rows in ALV on a button click

    Hi Experts
    Hi,
    I have a dynamic ALV table. I also have a button 'Select All Rows'. On clicking the button I want all the rows in the ALV table selected which is done by using set_selected method at the context node.
    All the rows in the alv is selected after clicking select_all except for the first row.
    Need your inpts to solve the same.
    Regards
    Karthick

    Use the folowing code
    *... get model
      data:
        lr_model type ref to cl_salv_wd_config_table.
      lr_model ?= me->r_model.
    *... get columns
      data:
        ls_column type salv_wd_s_column_ref,
        lt_column type salv_wd_t_column_ref.
      lt_column = lr_model->if_salv_wd_column_settings~get_columns( ).
      data:
        l_selected type abap_bool.
      loop at lt_column into ls_column.
        l_selected = abap_false.
        read table value transporting no fields with key column = ls_column-id.
        if sy-subrc eq 0.
          l_selected = abap_true.
        endif.
        try.
            me->if_salv_bs_model_column~set_selected(
              column = ls_column-id
              value = l_selected ).
          catch cx_salv_bs_sc_object_not_found.             "#EC NO_HANDLER
        endtry.
      endloop.

  • 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

  • When user select 1 row in alv some other rows must automaticaly get selecte

    When user selects say any row in alv with vbeln = 1234 all rows which have vbeln = 1234 also must get selected automaticaly.Is there some event to handle row selection in alv by clicking the push button beside each row to left of ALV?

    Hi
    U can implement an your push button in order to select the remaining rows: in user-command u need to implement a code where u get the selected line and the select the other.
    Or simply u can select the other lines as soon as the user do something after selecting a row.
    How to do it depends on whick kind of alv you're using: if the internal table fir output has a flag field for the marker, "To select a line" means to check that field.
    Max

Maybe you are looking for

  • Hard Drive was replaced, but now can't get Apple Backup to restore data

    My iMac had a damaged hard drive, so I replaced it and reinstalled Mac OS 10.4, along with iLife 06. My iMac is now up and running again (prior to hard drive replacement it froze and was then unable to get up and running again without repeated attemp

  • Location services not working on apps?

    I didn't know where else to put this so I put it here. I have an iPod Touch and an iPad and it's not showing my location on either of those. It is turned on, so before you say that, yes. I'm not that stupid. It's also not restricted. It can't be a pr

  • Reg:Java Server proxies

    Hi ...   I was doing soap to Java Proxy scenario.I have deployed the ear file in the server. Then while executing the sceanrio, in SXMB_MONI i am getting the below error.   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Inbound Mess

  • Rounding off service tax

    Hi Guru's, I would like to know what settings do I need to do the round off to next rupee in the service tax calculation. If sevice Tax Amt - INR 240.23 = INR 240 If service Tax Amt - INR 240.55 = INR 241. That means if it is .50 and above it should

  • Two identical keys on my keyboard. Missplaced!

    well, its not a big issue, but its a very, very annoying issue. My new MBP 2011 got two identical keys. What should I do? Cant be without my computer know when I have "settled" in this one. A proof: http://a5.sphotos.ak.fbcdn.net/hphotos-ak-ash4/1972