Multiple Selection of Table Rows

Hi Friends
I created a web dynpro application which displays a table with multiple records.
I added a button "REMOVE" to delete the selected rows from the table.
It is working good if I select single row, but if I want to delete more than one row I am not able to select the rows and how can I delete all the selected rows.
Thanks

Change the selection property of node binded to table as 0..n.
This will allow you to select multiple rows.
To get multiple rows, use  get_selected_elements method of if_wd_context_node.
Code for your reference :
DATA:  wd_node TYPE REF TO if_wd_context_node,
         wa_temp  TYPE REF TO if_wd_context_element,
         lt_temp  TYPE wdr_context_element_set.
  wd_node = wd_context->get_child_node( name = 'NODE' ).
  CALL METHOD wd_node->get_selected_elements
    RECEIVING
      set = lt_temp.
  LOOP AT lt_temp INTO wa_temp.
    wd_node->remove_element( EXPORTING element = wa_temp ).
  ENDLOOP.

Similar Messages

  • Multiple selection in table not returning all selected rows

    I am unable to obtain multiple selected rows from a table. I only get a single row no matter how many I select.
    I have the following table
    <af:table value="#{bindings.TargetSelectorTargets1.collectionModel}"
    var="row"
    rows="#{bindings.TargetSelectorTargets1.rangeSize}"
    emptyText="#{bindings.TargetSelectorTargets1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.TargetSelectorTargets1.rangeSize}"
    rowBandingInterval="0"
    filterModel="#{bindings.ImplicitViewCriteriaQuery2.quickQueryDescriptor}"
    queryListener="#{bindings.ImplicitViewCriteriaQuery2.processQuery}"
    filterVisible="true" varStatus="vs"
    selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
    selectionListener="#{bindings.TargetSelectorTargets1.collectionModel.makeCurrent}"
    rowSelection="multiple"
    partialTriggers="::qryId1" id="t3"
    styleClass="AFStretchWidth"
    binding="#{testbean.targetselectortable}">
    <af:column sortProperty="Name" filterable="true"
    sortable="true"
    headerText="#{bindings.TargetSelectorTargets1.hints.Name.label}"
    id="c2">
    <af:outputText value="#{row.Name}" id="ot33"/>
    </af:column>
    <af:column sortProperty="Type" filterable="true"
    sortable="true"
    headerText="#{bindings.TargetSelectorTargets1.hints.Type.label}"
    id="c11">
    <af:outputText value="#{row.Type}" id="ot34"/>
    </af:column>
    </af:table>
    and I have the following bean method to get the selected rows
    RowKeySet rks = targetselectortable.getSelectedRowKeys();
    Iterator itr = rks.iterator();
    Object key;
    while(itr.hasNext())
    key = (Object)itr.next(); targetselectortable.setRowKey(key);
    Object o = targetselectortable.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
    Row row = rowData.getRow();
    System.out.println(row.getAttribute("Name").toString());
    and I only get one row.
    Note: selectedRowKeys="#{bindings.TargetSelectorTargets1.collectionModel.selectedRow}"
    shows a warning that "reference selectedRow" not found.
    Can I do something to make it work?

    can u change the logic like
    RowKeySet rowSet = targetselectortable.getSelectedRowKeys();
    Iterator rowSetIter = rowSet.iterator();
    > while (rowSetIter.hasNext()) {
    > List l = (List)rowSetIter.next();
    > Key key = (Key)l.get(0);
    >
    FacesContext fc = FacesContext.getCurrentInstance();> BindingContainer bindings =
    > (BindingContainer)fc.getApplication().evaluateExpressionGet(fc,
    > "#{bindings}",
    > BindingContainer.class);
    >
    DCBindingContainer bindings = (DCBindingContainer)bindings ;> DCIteratorBinding iter =
    > bindings.findIteratorBinding("TargetSelectorTargets1Iterator");
    >
    > iter.setCurrentRowWithKey(key.toStringFormat(true));
    > Row r = iter.getCurrentRow();
    > System.out.println(row.getAttribute("Name").toString());
    > }

  • Disable Lead selection for table row cloumn

    HI Team,
    I have table with multiple rows and multiple columns.
    Based on the lead selection of the row we are displaying the some form.
    But in table row there are some columns like enter date, when the user is trying to enter the date, it displaying the form because of lead selection and it is not allowing the user to enter the date.
    So, I want disable the lead selection for some columns.
    How can I do this?
    Regards,
    BAla

    Hi
    I think that you can get  the UI Table in the wdDoModifyView method, and then the UI Column and play with his values, is something like this:
    IWDTable table =(IWDTable)view.getElement( ");
    And then play with the "column" methods.
    Josué Cruz

  • Help needed with singleSelection and multiple selection in table.

    Hi ,
    How do i implement the singleSelection and multipleSelection on table rows.
    How do i capture the checked rows?
    How should the code be written and where should it be written.
    I should be capturing the values of the checked rows and pass it to the pl/sql package.
    I have a table - in -table so there is a singleselection on the outer table and multiple selection on the Inner table.
    Could anyone help me with this.
    Thanks,

    One solution to most of your questions : Read the advanced table section of Dev guide.
    Always go through the dev guide before putting up the issue. Let the forum be for those scenarios which dev guide doesn't covers in much detail.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Multiple Selection in Table in uix page

    Hello EveryBody,
    I'm using jdeveloper 9051+adf+uix.
    I'm using multiple Selection in a table (dragged as read only table of a View Object).
    Now i've to perform some action on the selected rows from the page.
    How to implement this feature please help me to solve this problem.
    Waiting for the reply
    Thanks and Regards
    Mina

    Hi RB,
    Yes still you can use this.
    Ex:
    for(int k=0;k<wdContext.nodeEmployeeInfo().size();k++)
    if (wdContext.nodeEmployeeInfo().isMultiSelected(k))
      /* Here you will get all the list of selected rows */
    Regards, Anilkumar

  • Multiple Selection in Table

    Hi,
    I have a table control which is configured for multiple selection.
    But, I need to get the list of selected rows?
    How can I do it?
    I didn't find any methods on the table control or at the context node.
    Can anyone guide me out of this issue?
    Thanks and regards
    RB

    Hi RB,
    Yes still you can use this.
    Ex:
    for(int k=0;k<wdContext.nodeEmployeeInfo().size();k++)
    if (wdContext.nodeEmployeeInfo().isMultiSelected(k))
      /* Here you will get all the list of selected rows */
    Regards, Anilkumar

  • Multiple Selection for Tables

    HI Team, When I try to select the multiple selection for field Material in table Mara, the To value is not displayed
    e.g in table mara if i select the material option from A* to Z*, all the materials are displayed from A until x but no of the materials are displayed starting with Z. I have found this as standard functionality in SAP and happens for all fields with multple selection in tables. can you guys advise if there is an OSS note for this?
    Thanks,
    Sunny

    Hai Sunny,
    Please check Do you have material staring with Z
    and check is there any
    Maximum No. of Hits restriction.
    Till you get SAP notes
    Create a query in SQVI for only ine table and
    MARA and tick mark the selection b fields and fields to be displayed in the report.
    Now in the report selection screen you will get TO option as well it will list all the Z materials.
    Regards,
    Mani

  • UIX/XML BC4J  Retaining multiple selection in tables

    We have a table with multiple selection, and we want the items to remain selected after the page refresh for some reason. Whats the cheapest way to obtain this?

    Data bind the selection attribute of multipleSelection to "someKey@ctrl:eventResult". Then in your event handler use an oracle.cabo.ui.data.ServletRequestDataSet and attach it to the event result, under the key "someKey".
    When the page is refreshed it should remember the multiple selection.
    Regards,
    John Fallows
    Oracle Corporation.

  • Selecting a table row

    I can't figure out how to programmatically select a jtable row. can someone fill me in? there must be an easy method call, but I can't seem to find it.

    Here is the method :
    JTable.setRowSelectionInterval(int beginIndex, int endIndex);Olek

  • LVC_S_LAYO  for multiple selection of the rows in the output failed

    Hi,
    I have used LVC_S_LAYO for outputting the list, now i need to select some and delete, but i am unable to do it, I am able select 1 record or all the record but not as per my wish.
    ex: ten records are displayed in the list, I am able to select only 1 record or all the 10 but not two randomly as i wish.
    Please let me know how to that, mean while i have used
    LVC_S_LAYO-SEL_MODE = 'A' but still i am unable, please let me know how to acheive that.
    points assured.
    regards,
    Prabhu

    Hi,
    Please refer the code below:
    *& Report  ZDEMO_ALVGRID_SELROW                                        *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display capture each row a user has *
    *& selected                                                            *
    REPORT  zdemo_alvgrid_selrow                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    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.
    *ALV data declarations
    data: fieldcatalog 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.
    *Start-of-selection.
    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.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      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'.
      fieldcatalog-col_pos     = 8.
      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_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           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'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
        WHEN '&DATA_SAVE'.  "user presses SAVE
        loop at it_ekko into wa_ekko.
          if wa_ekko-sel EQ 'X'.
    *       Process records that have been selected
          endif.
        endloop.
      ENDCASE.
    ENDFORM.
    Thanks,
    Sriram Ponna.

  • Multiple selection in table filters 12c

    Hi all,
    I would like to filter a table using  multiple values in the same filter. According to the normal behavior you can use VALUE1 OR VALUE2 OR VALUE3... in the table filter and it works but I have a new requirement where the "OR" cojuntion must be a ",".
    So the question is:
    How to use  "," as conjuntion instead of  "OR"?
    Jhon
    jdev 12c

    Jhon, there is no such function (never has been). You are trying to create an  IN clause.
    What you can do it adopt the technique I outlined in my blog  JDeveloper 11.1.1.6.0: Escape QBE Operators in Filterable Tables | JDev &amp;amp; ADF Goodies
    Here I use a special syntax in the filter field to modify the query. I'm looking for '_and_' in the field to then search for the word 'and' in the column. However, you can modify the sample, use your own syntax and return an IN clause.
    Timo

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • Add selected table row value to PageFlowScope so I can access in taskflow

    Hi all,
    Running into a problem getting a value from a selected ADF table row to a taskflow that is displayed as an inline popup. Here's the scenario. I have a view which displays a table. When I click on an edit btn I display my taskflow as an inline popup. What I would like to do is take the currently selected table row, pull off lets say the row name value and pass it to my taskflow for display. I've tried settting this value inside a mbean when I click the edit btn using:
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("editTargetNameSource", targetName);
            String tmpClear = (String) AdfFacesContext.getCurrentInstance().getPageFlowScope().get("editTargetNameSource");Which seems to get set but when I attempt to grab this value using EL inside my taskflow jspx page it looks to not be set.
    <af:outputLabel value="Selected Row" id="ol1"/><af:outputText value="#{pageFlowScope.editTargetNameSource}"It seems like pageFlowScope for my popup taskflow != pageFlowScope for the page my table lives in. I've tried setting this as a input page param but I have a feeling I'm missing something. I'd like to be able to set this value inside my bean when a user clicks the edit btn and then display this value in my taskflow popup.
    Any help is appreciated,
    -Wraith

    Thanks for the links Timo. I still must be missing something here. In the vids you linked it looked like he was using regions to pass params from main page to a taskflow; setting a param on child taskflow (causes param to be required when dragging into main page). So I think I understand I add an expected param to my taskflow which somehow will be set by my main page. The part I'm missing is from my main page how can I get the selected table row value and set it in the expected pageflowscope param that my taskflow is expecting?
    I've tried several things:
    1) Using managed bean associated with my main page; setting param inside the bean on main page btn click and then try accessing this mbean param (couldn't access this value as different pageflowscope I believe)
    2) Programmatically setting PageFlowScope as I linked in previous post.
    3) using setPropertyListener I can set a static value setting value in pageflowscope.start and then inside adfc.config for the task set start value to another value expected by the taskflow page. This seemed to work but I can't figure out how to do the programmatic version of this using the currently selected row and its value.
    One who seems to be missing something,
    -Wraith

  • 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

  • Add a table row

    I have a standard html table in and ICE div and want my
    client to be able to add table rows to enter new problems reported.
    When in edit mode we can edit content in the existing rows, but do
    not seem to be able to add a new row. Suggestions?
    Morris

    Hello Morris,
    You can set table rows to be repeating regions, which will
    make your table a repeating group element. Doing this allows your
    users to duplicate the table rows and add new ones.
    It sounds like the first thing you you will want to do is
    remove the DIV wrapping the table in Dreamweaver. Then, place your
    cursor in a table cell (the <td> elements in the row) and go
    to Insert > InContext Editing > Create Editable Region. Do
    this for each cell in the row you want to be editable. After you
    have specified the editable cells in your table row, select the
    table row (<tr> element of your table), and go to Insert >
    InContext Editing > Create Repeating Region. This will allow
    editors to duplicate the table rows, and edit the cells within the
    row you have specified as editable.
    Take a look at the following section of the Dreamweaver help
    for more information on repeating regions:
    http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WS228F034D-1255-463f-BE80-D075F0BACF11. html
    And please let me know if you need further assistance with
    this.
    Best regards,
    Corey

Maybe you are looking for

  • Unable to make changes to LAN Settings in IE after Group Policy Preference is applied

    Hi all, I have an IE10 group policy preference on a Server 2008 R2 domain that is pushed out to Windows 7 SP1 x64 clients. This IE10 GPP is used to push out proxy settings etc. The GPP is applied fine, however when I go into LAN Settings in IE and ma

  • Not able to edit Humantask activity

    Hi all, Im having issues with editing Humantask activities (SOA application) in my composite. Everytime i open the humantask activity to edit, changes are not saved, and it constantly throws the following error Uncaught exception java.lang.NullPointe

  • FX 5200 nview??? HELP! black & white

    I just bought the FX 5200 128MB graphic , but I´m having problem with the dualview or nview. My TV screen is black and white. I have the latest driver 45.xx, but still I can´t get the TV showing color.. Im not sure if my s-video cable is broken or no

  • Special Photo Montage Software... Is there a good one out there?

    I need a software just for that, a one of a kind. I do professional montages for clients... The only problem is, they are time consuming sometimes and I have to have them ready on time. I was wondering if there is any programs that are helpful to get

  • How to add live camera to my website?

    Hello, I have a live video stream here: http://sketchburger.dyndns.org Username: sketchburger Password: sketchburger I want to show that video stream on my iWeb page. Any idea how to do it?? THANKS!