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.

Similar Messages

  • How to select multiple lines in ALV report

    hi gurus,
    I am working on an interactive ALV report where i have to select multiple lines from the basic list into an internal table, based on check box clicks. Using RS_SELFIELD i can select only 1 row. The coding has been done based on Call Function. Can u please suggest some way.
    Regards,
    Satyajit

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_ekko,
      sel,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          fieldcatalog1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA : BEGIN OF det_tab OCCURS 0,
            ebeln LIKE ekpo-ebeln,
           END OF det_tab.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      gd_layout-box_fieldname     = 'SEL'.
      "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = gd_repid
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_STAT'
          is_layout                = gd_layout
          it_fieldcat              = fieldcatalog[]
          i_save                   = 'X'
        TABLES
          t_outtab                 = it_ekko
        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.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
          IF rs_selfield-fieldname = 'EBELN'.
            READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
            SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
            CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'DET'.  "button add by me
          CLEAR det_tab.
          REFRESH det_tab.
          LOOP AT it_ekko INTO wa_ekko WHERE sel = 'X'.
            MOVE-CORRESPONDING wa_ekko TO det_tab.
            APPEND det_tab.
          ENDLOOP.
          PERFORM build_cat.
          PERFORM dis_data.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_stat
    *       text
    *      -->RT_EXTAB   text
    FORM set_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZSTAT' EXCLUDING rt_extab.
    ENDFORM.                    "set_stat
    *&      Form  build_cat
    *       text
    FORM build_cat.
      CLEAR fieldcatalog1.
      REFRESH fieldcatalog1.
      fieldcatalog1-fieldname = 'EBELN'.
      fieldcatalog1-tabname = 'DET_TAB'.
      fieldcatalog1-seltext_m = 'Order No.'.
      fieldcatalog1-outputlen = 10.
      APPEND fieldcatalog1 TO fieldcatalog1.
      CLEAR fieldcatalog1.
    ENDFORM.                    "build_cat
    *&      Form  dis_data
    *       text
    FORM dis_data.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = 'ZTEST_DS'
          it_fieldcat        = fieldcatalog1[]
          i_save             = 'X'
        TABLES
          t_outtab           = det_tab.
    ENDFORM.                    "dis_data
    here i have copied standard gui status of ALV into my z status ZSTAT and add one button DET......
    here u can select morethan one line using control(ctrl)
    reward if usefull...

  • 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

  • How to capture multiple rows of ALV grid when user selected?

    Actually,It is easy to get one single line.However, my user wants select several lines of ALV grid  by condition  .  i need to process the selected lines ,so i need to put these lines into an internal table. But now, i have no idea to capture the lines.
    What method for an ALV Grid will return the lines the user has selected?
    Appreciate for your help!
    Edited by: Heyman52 on Aug 25, 2010 4:28 AM
    Edited by: Heyman52 on Aug 25, 2010 4:30 AM

    Hi,
    Once user selects multiple rows and press another button for further execution, you can modify your internal table with marked rows using selection column.
    You need to add user command code in your ALV grid call. Please refer below code.
    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.
        IF SY-SUBRC NE 0.
          MESSAGE S475 DISPLAY LIKE 'E'.
          LEAVE LIST-PROCESSING.
        ENDIF.
    *- User command for details display.
        PERFORM F_USERCOMMAND USING I_UCOMM
                                    I_SELFIELD.
    FORM F_USERCOMMAND USING FP_R_UCOMM LIKE SY-UCOMM
                             FP_SELFIELD TYPE SLIS_SELFIELD.
    IF L_V_REF_GRID IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            E_GRID = L_V_REF_GRID.
      ENDIF.
      IF NOT L_V_REF_GRID IS INITIAL.
        CALL METHOD L_V_REF_GRID->CHECK_CHANGED_DATA.
      ENDIF.
    ENDFORM.
    You can then read your final internal table as below and take the selected records in another internal table.
    LOOP AT I_OUTTAB ASSIGNING <FS_OUTTAB> WHERE SEL EQ 'X'.
            APPEND <FS_OUTTAB> TO I_CHECK.
          ENDLOOP.
    Edited by: Archana Pawar on Aug 25, 2010 11:16 AM

  • 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

  • Selecting multiple rows in ALV grid display

    Hi,
    I have an ALV grid display in my report.
    My grid contains multiple rows.
    I have to select multiple rows at a time, to perform some operations on the selected rows.
    How can it be achieved?
    Thanks,
    Sandeep.

    Hi ,
    you have to use a box fieldname in the report to be able to select multiple lines at a time :
    - in your internal table declaration put the first field as 'box_fieldname' of type c1
    - then in your work area for layout add, lwa_layout-box_fieldname =     'box_fieldname'
    - in the perform for handling user commands, all selected lines will have an "X" in the field name  'box_fieldname'
    Thanks and Regards,
    Dev.

  • Selecting Multiple Rows from ALV GRID Display

    Hi,
    I am having a ALV GRID Display. I want to select multiple rows from the Output and move them to an internal table.
    Please let me know how do I acheive this.
    Thanks in advance,
    Ishaq.

    Hi,
    Have a look on the following code. It displays the selected rows which hv been selected in basic list.
    TABLES:
      spfli.
    TYPE-POOLS:
      slis.
    DATA:
      BEGIN OF t_spfli OCCURS 0,
        checkbox.
            INCLUDE STRUCTURE spfli.
    DATA:  END OF t_spfli.
    DATA:
      t_sspfli LIKE STANDARD TABLE OF t_spfli .
    DATA:
      fs_spfli LIKE LINE OF t_sspfli.
    DATA:
      fs_layout TYPE  slis_layout_alv,
      w_program TYPE sy-repid.
    SELECT *
      FROM spfli
      INTO CORRESPONDING FIELDS OF TABLE t_spfli.
    *fs_layout-info_fieldname = 'COLOR'.
    fs_layout-box_fieldname = 'CHECKBOX'.
    w_program = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        i_callback_program       = w_program
        i_callback_pf_status_set = 'FLIGHT'
        i_callback_user_command  = 'SPFLI_INFO'
        i_structure_name         = 'SPFLI'
        is_layout                = fs_layout
      TABLES
        t_outtab                 = t_spfli
      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  FLIGHT
          text
         -->RT_EXTAB   text
    FORM flight    USING rt_extab TYPE slis_t_extab..
      SET PF-STATUS 'FLIGHT' EXCLUDING rt_extab.
    ENDFORM.                    "FLIGHT
    *&      Form  SPFLI_INFO
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM spfli_info USING ucomm LIKE sy-ucomm
                           selfield TYPE slis_selfield.
      selfield-refresh = 'X'.
      CASE ucomm.
        WHEN 'FLIGHT'.
          LOOP AT t_spfli.
            IF t_spfli-checkbox = 'X'.
              t_spfli-checkbox = ' '.
             t_spfli-color = 'C51'.
              MODIFY t_spfli TRANSPORTING checkbox.
              fs_spfli = t_spfli.
              APPEND fs_spfli TO t_sspfli.
            ENDIF.
          ENDLOOP.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR fs_spfli.
      fs_layout-info_fieldname = 'COLOR'.
    fs_layout-confirmation_prompt = 'X'.
      fs_layout-key_hotspot = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = w_program
          i_structure_name   = 'SFLIGHT'
          is_layout          = fs_layout
        TABLES
          t_outtab           = t_sspfli
        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.
      REFRESH t_sspfli.
    ENDFORM.                    "SPFLI_INFO
    Regards,
    Chandu

  • How to select multiple rows from List Of Values

    Hello,
    I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
    so how i can select many rows to set them in my adf table.
    Thank in advance

    Hi,
    LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
    But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
    This blog post explain how to achieve this :
    http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
    Sameh Nassar

  • 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

  • How to select multiple row of table using check box?

    hi,
             i am having table on view having first field as checkbox. what i want, when i click on checkboxes in multiple rows, and i click on any button i need to use those content to next view...
              my problem is if i select only one row , i can use onlead select property of table..but when i select multiple rows  through check box how should i read contents of table....?
    Plz solve it.
    Thanks,
    Saurin Shah

    Hello Saurin,
    You are right using LeadSelection you can select only 1 row at a time. You will have to make use of Selection for achieving this. First you will have to change the selection mode of the table to multiple & also change the selection property for the related context to 0..n . Please find a code extract which might help you. (However this facility is only available from SP 14.) The main part is using the set_selected method of if_wd_context_node.
    data: node_zcourse_details type ref to if_wd_context_node,
             node_course_assign type ref to if_wd_context_node,
             elem_course_assign type ref to if_wd_context_element,
             stru_course_assign type if_v_details=>element_course_assign ,
             item_popin_selected like stru_course_assign-popin_selected.
    "     navigate from <CONTEXT> to <ZCOURSE_DETAILS> via lead selection
    node_zcourse_details = wd_context->get_child_node( name = if_v_details=>wdctx_zcourse_details ).
    "     navigate from <ZCOURSE_DETAILS> to <COURSE_ASSIGN> via lead selection
    node_course_assign = node_zcourse_details->get_child_node( name = if_v_details=>wdctx_course_assign ).
    "     @TODO handle not set lead selection
    if ( node_course_assign is initial ).
    exit.
    endif.
    data elem_set type wdr_context_element_set.
    field-symbols <wa_elem> like line of elem_set.
    elem_set = node_course_assign->get_elements( ).
    loop at elem_set assigning <wa_elem>.
       <wa_elem>->set_selected( TRUE OR FALSE ). " Supply either TRUE/FALSE in here
    endloop.

  • 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 delete multiple row in classic report.

    Dear Friends,
    i am using 4.1 ve.
    i have created classic report.i want to delete row .
    How can i do it.
    i need check box in classic report and if i select multiple check box then row should delete and before delete pop up should be pop up to confirmation to delete.
    How can i do it.
    Thanks

    Hi Vedant,
    here you have one advanced example:
    http://www.talkapex.com/2009/01/apex-report-with-checkboxes-advanced.html
    But you can do it easier using only apex_item.checkbox (creating one column in report query with this function).
    After you submit this page the value will be stored to apex_application.g_f0X variable where X is equal to p_idx param of function apex_item.checkbox.
    Note: only checked values will be stored.
    Br,
    Marko Goricki
    http://apexbyg.blogspot.com

  • How to colour a row in alv report

    Hi
    As per our client's requirement we have to do color the column on the basis of values in the column like
    if data is more than 5000 it will show in red,if less than 5000 it will show in green in ALV  report.
    Pls give me the solution.
    Thanks&Regards.

    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.

  • Selecting multiple rows in alv grid

    my requirement is i want to send the data from alv grid to smartforms using check boxes from report output but without using either oo framework or layout-box_fieldname.can anybody give me the solution?

    in fieldcatalog you have to use CHECKBOX = 'X'  INPUT = 'X' and EDIT = 'X' for the columns which ever you want to be check box .
    You need use the Function moduel in the user command to get the updated data with checked value.
    GET_GLOBALS_FROM_SLVC_FULLSCR
    follow the sample code.
    REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    L_LAYOUT TYPE SLIS_LAYOUT_ALV,
    X_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    CHK(1),
    color(4),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM VBAP
    UP TO 20 ROWS
    INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'CHK'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    X_FIELDCAT-INPUT = 'X'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-CHECKBOX = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-HOTSPOT = 'X'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_LAYOUT-info_fieldname = 'COLOR'.
    *L_LAYOUT-ZEBRA = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = L_LAYOUT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    "Copy the standard program SAPLKKBL , STANDARD status to your program
    SET PF-STATUS 'STATUS'.
    ENDFORM. " STATUS
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    IF REF_GRID IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    E_GRID = REF_GRID.
    ENDIF.
    IF NOT REF_GRID IS INITIAL.
    CALL METHOD REF_GRID->CHECK_CHANGED_DATA .
    ENDIF.
    loop at itab where chk = 'X'.
    "collect all the records to an internal table here..
    endloop.
    "Now call your smartform here using SSFFunction module and the get the dynamic function . From there call the Function with the selected values, to show the smartform
    RS_SELFIELD-refresh = 'X'.
    break-point.
    ENDFORM. "USER_COMMAND
    Regards
    Vijay Babu Dudla

  • How can select Multiple Rows in a Jtable

    Dear Forum
    i am working on jclient\swing.
    I want to select More than one row at a time from a table
    I am trying the following code at INIT but it is not working.
    jTable1.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    Please suggest me for the same.
    Thankx

    Girdhar,
    I tried with JDeveloper 9.0.3 and it worked.
    Either you are using another JDeveloper version, or you need to specify what you mean with "is not working".
    Frank

Maybe you are looking for

  • Unable to clear Google search history in Safari

    I am unable to clear old searches in Safari.  None of the following has any effect: using the clear recent searches button, totally resetting Safari, deleting all history and cache and trying to delete each individual search item manually, or by chan

  • Issue in ESS i.e. gives dump error while availing a leave through ESS

    Hi All, In My client place, system gives a dump error when employee is maintaining its leave in ESS system.Here TM is not integrated with payroll. Plz help me how to resolve the issue.

  • Known Issues - Enrollment SA

    b Dynamic Document Generator (DDG) i Problem: When you deploy DDGSample.war, and try to run the samples,the following exception occurs - [javax.servlet.ServletException: com/adobe/idp/um/businesslogic/authentication/AuthenticationToken org.apache.jas

  • Does spline-interpolation work? (what's it supposed to do?)

    Hello!       I was told (by a co-worker) that Spline_Interpolation[Xi] should exactly match a "tabulated" Y (input) if Xi was one of the "tabulated" X input values.  I don't know if this is correct - if it is, then the function isn't working as expec

  • Posting in Open item managed accounts in Non Leading ledger

    Hello, I would like to know how can we post into a open item managed G/L account in the non-leading ledger only. If it is not possible, then what could be the reason for the same? Regards, Sameer