Get Node Key Multiple Items Selected  from ALV tree

Hello Experts,
I'm having a problem in getting Node keys for the items displayed as ALV tree.
I'm able to get Node key, when only ONE record (Item) is selected.
But, when I select multiple items under a Single node am not able to read(get) the node keys for all the selected items.
I'm using the classCL_GUI_ALV_TREE.
I have tried using the method GET_CHECKED_ITEMS, but not getting the keys.
method GET_SELECTED_ITEM is giving node for a single item. I need it for multiple items selected.
Thank you for your time.
-SANGAR

Hi,
You need to use checkbox concept. and use method GET_CHECKED_ITEMS get selected items
please check this tread.
CL_GUI_ALV_TREE and Checkboxes
aRs

Similar Messages

  • 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

  • Cannot have multiple items selected in a DropDownList when edit the forum in sharepoint

    hi ,
    i  have custom forum for new and edit, in new forum we have controls drop down values, when select drop down1   values that related values are displayed in dropdown2 , when edit  item  that  time we getting error
    Cannot have multiple items selected in a DropDownList.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.HttpException: Cannot have multiple items selected in a DropDownList.
    Source Error:
    HttpException (0x80004005): Cannot have multiple items selected in a DropDownList.]
    System.Web.UI.WebControls.DropDownList.VerifyMultiSelect() +124
    System.Web.UI.WebControls.ListControl.RenderContents(HtmlTextWriter writer) +10956501
    System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +42
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +13
    System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +42
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +42
    ASP._controltemplates_amat_appayrequest_webparts_appayrequest_appayrequestusercontrol_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\AMAT.APPayRequest.Webparts\APPayRequest\APPayRequestUserControl.ascx:350
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +42
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +42
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
    System.Web.UI.Page.Render(HtmlTextWriter writer) +38
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240

    Hello,
    Could you please share your code with us? Also explain how you are binding DDL.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • I use iPhoto and want to know how to get the 'key photo' i select on my MacBook Pro to be the one that gets used on my iPhone when i sync them. Any ideas? also, i want the events to appear in the order i choose on my MacBook too

    I use iPhoto and want to know how to get the 'key photo' i select on my McBook Pro to be the same one that gets used on my iPhone 5s when i sync. i also want the events to appear on the iPhone in the same order i have them on my macbook. any ideas there too?

    Killerfinch wrote:
    My new yahoo account nestles comfortably in iCloud on the mine iPad.
    No, your Yahoo account is not in iCloud (which only handles iCloud mail), it is in Yahoo, and the Yahoo mail account is on your iPad.
    But the MacBook Pro will have none of it! I write this question now as I fear that I will be totally demented very soon and unable to formulate my thoughts clearly!
    Get the correct settings for your account from Yahoo and set it up manually.
    By the way, I also find the "password" issue problematical. It seems Apple want my Apple password rather than my eMail password. All very confusing.
    That would depend on what you are trying to do.

  • How do you get to the "Multiple Item Information" window so I can click "Part of a compilation:?

    How do you get to the "Multiple Item Information" window so I can click "Part of a compilation"?  When I transfer a CD to iTunes, and the CD has ten tracks, it loads as ten different albums.  Also, once this happens, do I have to delete the album and start over or is there a way to merge the albums in iTunes?  Using iTunes 10.04.08.

    And you've made me remember that using the compilation flag may only work in iTunes if you go into the Songs view, then use View > Column Browser > Show Column Browser and then View > Column Browser > Group Compilations to make sure this line is ticked.
    It is also best if View > Column Browser > Use Album Artists is also ticked.
    tt2

  • 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]

  • Multiple checkbox selection in ALV and updating internal table

    Dear Expert,
    Can anyone tell me how to handle the multiple checkbox selection in ALV Grid report and then updating the internal table.
    I tried the option but it works only when i select only 1 row in ALV.
                    DO L_LINES TIMES.
                      read table icoas index rs_selfield-tabindex.
                      if sy-subrc = 0.
                        ICOAS-NOCHK = 'X'.
                        modify ICOAS INDEX rs_selfield-tabindex TRANSPORTING NOCHK.
                      ENDIF.
                    ENDDO.
    Requires help....
    Regards & Thanx,
    Bhupathi.

    Hi,
    Use this method to capture the check box event. Write this once you create your grid using CREATE OBJECT grid1.
    DATA:      GRID1 TYPE REF TO CL_GUI_ALV_GRID,
    CALL METHOD grid1->register_edit_event
      EXPORTING
        i_event_id = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED
      EXCEPTIONS
        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.
      LOOP AT T_GRIDDETAILS INTO WA_GRIDDETAILS.
        IF WA_GRIDDETAILS-CHECKBOX = 'X'.
                  "Do your operation
        ENDIF.
        CLEAR WA_GRIDDETAILS.
      ENDLOOP.

  • Download from ALV Tree

    Dear All,
    Do anybody know how to download data from ALV tree into local PC. For example transaction O3O_MT10. Can we download it?
    Thanks
    Regards
    Hadi

    Thank a lot Rainer,
    It's definitely answer the question. I think I learn something new in here.
    Regards
    Hadi

  • Select From ALV Grid

    I'm hoping that someone can help.
    I have a program that displays an ALV grid. I want the user to be able to select one or more lines from this grid and then to pop up a box to allow them to input a new date and then update this date via BAPI.
    Could any one please point me in the right direction of how to get the info of the lines selected by the user into another internal table so that I can merge this with my new date info to run the BAPI.
    Thanks

    Which version of ALV technology do you use (REUSE_ALV, OO ALV, SALV ? ) <br />
    <br />
    e.g. for CL_GUI_ALV_GRID<br />
    - Use the <a class="jive-link-external" href="http://help.sap.com/saphelp_erp2004/helpdata/en/ef/a2e9eff88311d2b48d006094192fe3/frameset.htm" target="_newWindow">SEL_MODE</a> field of the layout to enable multiple row selection (also add a check box in internal table)<br />
    - you have method <a class="jive-link-external" href="http://help.sap.com/saphelp_erp2004/helpdata/EN/0a/b55312d30911d2b467006094192fe3/frameset.htm" target="_newWindow">GET_SELECTED_ROWS</a> and CHECK_CHANGED_DATA <br />
    <br />
    <i>Also, don't hesitate to use the search tool.there are sample in wiki like [Capture single and multiple row selction in ALV |http://wiki.sdn.sap.com/wiki/display/Snippets/Capturesingleandmultiplerowselctionin+ALV]</i><br />
    <br />
    Regards,<br />
    Raymond

  • Multiple Item selection

    Hi,
    I wanted to know if this scenario is possible to code in forms:
    You have a forms with 2 side by side window. In the left window there are records.
    The right window is empty. I want to select (multiple) items in the left window and bring them to the right window by using these buttons:
    , >>,Is there some base code that already exists from this?
    Thanks in advance,
    Marc.

    Ok,
    I've downloaded the forms demos for 10g.
    I'm following the instructions at:
    3 Modify the OC4J Configuration3a Modify orion-web.xml
    This step will create the virtual directories and servlet mappings for the HTTP listener, which are used by the demos.
    Using a text editor, open the following file:
    %ORACLE_HOME%\j2ee\DevSuite\application-deployments\forms\formsweb\orion-web.xml
    Add the following lines within the <orion-web-app> tags, making sure to replace %ORACLE_HOME% with the correct value:
    <classpath path="%ORACLE_HOME%/forms/java/frmjdapi.jar" />
    <classpath path="%ORACLE_HOME%\forms\demos/metadatabrowser/classes" />
    <virtual-directory virtual-path="/formsdemo" real-path="%ORACLE_HOME%\forms\demos" />
    To be sure you have the placement correct, your file should look something like the following:
    <?xml version="1.0"?>
    <!DOCTYPE orion-web-app PUBLIC "-//ORACLE//DTD OC4J Web Application 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd">
    <orion-web-app
    deployment-version="10.1.2.0.2"
    jsp-cache-directory="./persistence"
    temporary-directory="./temp"
    servlet-webdir="/servlet/"
    >
      <context-param-mapping name="configFileName">c:\oracle\ids1012/forms/server/formsweb.cfg</context-param-mapping>
      <virtual-directory virtual-path="/html" real-path="c:\oracle\ids1012/tools/web/html" />
      <virtual-directory virtual-path="/java" real-path="c:\oracle\ids1012/forms/java" />
      <virtual-directory virtual-path="/jinitiator" real-path="c:\oracle\ids1012/jinit" />
      <session-tracking cookies="disabled" />
      <!-- Uncomment this element to control web application class loader behavior.
      <web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
      -->
      <classpath path="c:\oracle\ids1012/forms/java/frmjdapi.jar" />
      <classpath path="c:\oracle\ids1012\forms\demos/metadatabrowser/classes" />
      <virtual-directory virtual-path="/formsdemo" real-path="c:\oracle\ids1012\forms\demos" />
    </orion-web-app>
    3b Modify web.xml
    Using a text editor, open the following file:
    %ORACLE_HOME%\forms\j2ee\formsapp\formsweb\WEB-INF\web.xml
    Find where this text is located:
    <servlet>
      <servlet-name>lservlet</servlet-name>
      <servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
    </servlet>
    and put the following text after it:
    <!-- Forms JDAPI Metadata Browser Servlet -->
    <servlet>
      <servlet-name>FormsBrowser</servlet-name>
      <servlet-class>oracle.forms.jdapi.util.FormsBrowser</servlet-class>
    </servlet>
    You should end up with the following:
    <servlet>
      <servlet-name>lservlet</servlet-name>
      <servlet-class>oracle.forms.servlet.ListenerServlet</servlet-class>
    </servlet>
    <!-- Forms JDAPI Metadata Browser Servlet -->
    <servlet>
      <servlet-name>FormsBrowser</servlet-name>
      <servlet-class>oracle.forms.jdapi.util.FormsBrowser</servlet-class>
    </servlet>
    In the same file, now find the following text:
    <servlet-mapping>
      <servlet-name>lservlet</servlet-name>
      <url-pattern>/lservlet*</url-pattern>
    </servlet-mapping>
    and put the following text after it:
    <servlet-mapping>
      <servlet-name>FormsBrowser</servlet-name>
      <url-pattern>/FormsBrowser*</url-pattern>
    </servlet-mapping>
    You should end up with the following:
    <servlet-mapping>
      <servlet-name>lservlet</servlet-name>
      <url-pattern>/lservlet*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>FormsBrowser</servlet-name>
      <url-pattern>/FormsBrowser*</url-pattern>
    </servlet-mapping>
    3c Verify the changes
    Start OC4J.  If you're not sure how to do that, refer to Appendix 1 for instructions.  If OC4J was already running when you made these changes then you need to restart it first.
    Once OC4J is running (or re-started), enter the following URL, replacing <host> and <port> with the correct values:
    http://<host>:<port>/forms/formsdemo/images/tick.gif
    If you are using Oracle Developer Suite, the URL might look like this:
    http://127.0.0.1:8889/forms/formsdemo/images/tick.gif
    You should see this image:Well the thing is I don't see anything and I get the Error page in my browser:
    The page cannot be found
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
    Please try the following:
    If you typed the page address in the Address bar, make sure that it is spelled correctly.
    Open the nca7445782e.hrdc-drhc.net:8889 home page, and then look for links to the information you want.
    Click the  Back button to try another link.
    Click  Search to look for information on the Internet.
    HTTP 404 - File not found
    Internet Explorer
    Can someone help me???
    Thanks,
    Marc.
    IGNORE THIS MESSAGE.
    Everything is OK.
    Message was edited by:
    MARC LAF

  • For multiple item selection in Table

    Plz use this code and paste it in perticular event of button. when u excute the application ,To select multiple items plz catch shift in keyboard otherwise u can select only single item.
    int n = wdContext.nodeProducts().size();
        int leadSelected = wdContext.nodeProducts().getLeadSelection();
        // loop backwards to avoid index troubles
        for (int i = n - 1; i >= 0; --i) {
          if (wdContext.nodeProducts().isMultiSelected(i) || leadSelected == i) {
            wdContext.nodeProducts().removeElement(wdContext.nodeProducts().getElementAt(i));

    Hi Vishal
    Thats the way the webdynpro table has been designed to work for multiple selection...on click of the Ctrl key or Shift key. There is no other alternative for this.
    What would your question be?
    Thanks
    oj

  • Sorting / Get Info for Multiple Item Information

    I want to sort based on album artist and then album. (Can I/How do I) select a secondary sort item? How do I suggest additions to the Multiple Item Information dialog, specifically sort album artist, sort album)?

    Click on Album column header a few times.
    It will cycle Album -> Album by Artist -> Album by Year and back to Album.
    How do I suggest additions to the Multiple Item Information dialog, specifically sort album artist, sort album)?
    No need to.
    Fill in the info in one sort field, then click okay.
    Right click on that song then *Apply sort field* and select which field you want to apply.

  • Multiple Item selection in comboBox

    Can combo box be used to selected multiple items at a
    time?

    Short of creating a custom component, I don't think this is
    possible.

  • Multiple Line selection in ALV

    Hi All,
    I have an alv report. In which, i have to get the selected row index values in return. Those selected row index will be used for further processing. I do not need check box selection, as ALV provide that inbuilt facility. Please tell me the parameter name.
    It is urgent.
    Regards
    Gajendra

    Hi,
    Your Call to ALV
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = sy-cprog
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND1'
    I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
    IS_LAYOUT = wa_layout
    IT_FIELDCAT = it_fieldcat
    T_OUTTAB = it_rfq
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    Implement a Form Routine with the name you gave for the I_CALLBACK_USER_COMMAND
    eg.,
    FORM user_command1 using ucomm type sy-ucomm
    selfield type slis_selfield.
    case ucomm.
    when '&IC1'.
    read table it_rfq into wa_rfq index selfield-tabindex.
    if sy-subrc eq 0.
    if selfield-fieldname = 'EBELN' " EBELN is the fieldname in Fieldcat
    Do the necessary coding to call the screen here
    endif.
    endif.
    ENDFORM.
    regards,
    Omkar.

  • PlD Distorted when multiple Item selected

    Hi ,
    In our Scenario we want to print Item description,serial no, qty  on same page in PLD for multiple Item with single quantity Print Layout is coming without distortion but when multiple item with multiple quantity it goes to next page and some data (Item Description and Qty ) for the last item on First page gets repeat on next page also Borders get distorted in print
    So how to fix this issue of data repeating and also how give page border to Print Layout

    Just as a note to clarify for all of these posts here.
    The real answer is that you can print the serial/batch number right on the main document.  You don't need to use the serial number transaction report at all.  You can disable it in print preferences (Administration >> System Initialization >> Print Preferences).
    In order to print the serial numbers relating to a document you need to use special system variables.  Just make a new field and then make it a system variable and use the following variables.  They need to be put on the same line as the regular detail info and the data will grow if there are multiple batches or serial numbers so make sure you allow for field adjustments.
    490          TEXT     serial number
    492          TEXT     batch number
    493          TEXT     warehouse code (batch/SN)
    494          MONEY (QUANTITY)     quantity (Batch/SN)
    495          DATE     admission date (receipt)
    496          DATE     date of production set by manufacturer (for Batch/SN)
    501          DATE     expiration date (for Batch/SN)
    502          TEXT     details (for Batch/SN)
    Hopefully this helps.
    Mike
    PRIELL.com

Maybe you are looking for