Get multiple selection data of Table into an internal table

Hi Guys,
I have a Table in my view layout and selected 'SelectionMode' as 'Multi' in the table properties.How to get the selected data into an internal table when rows selected on the table output.For example,I have a 10 rows in the table and selected only 5 rows,need to get these 5 rows into an internal table?
Regards
Nandana

Hi,
Here is some sample code. Please try this and let me know if you are still getting any errors.
DATA lo_nd_table_node TYPE REF TO if_wd_context_node.
  DATA lo_el_table_node TYPE REF TO if_wd_context_element.
  DATA ls_table_node TYPE wd_this->element_table_node.
  DATA lt_table_node TYPE wd_this->elements_table_node.
  DATA lt_table TYPE wdr_context_element_set.
  lo_nd_table_node = wd_context->get_child_node( name = wd_this->wdctx_table_node ).
  lt_table = lo_nd_table_node->get_selected_elements( including_lead_selection = abap_true ).
  LOOP AT lt_table INTO lo_el_table_node.
    lo_el_table_node->get_static_attributes(
      IMPORTING
        static_attributes = ls_table_node ).
    APPEND ls_table_node TO lt_table_node.
    CLEAR ls_table_node.
  ENDLOOP.
lt_table_node contains the selected rows.

Similar Messages

  • Probel while selecting data from table

    Hi,
      As per my below code i want to select data from table AFKO  where  PLNBEZ = it_mat-matnr, and  GETRI  IS BLANK , but data is not comingin IT_AFKO
    **********************CODE
    select AUFNR RSNUM GAMNG PLNBEZ From AFKO into table it_afko for all entries in it_mat
                                                              where PLNBEZ = it_mat-matnr
                                                                and GETRI =  '  '.
    regards,
    zafar

    Hi,
    Try below code
    select AUFNR RSNUM GAMNG PLNBEZ From AFKO into table it_afko for all entries in it_mat
    where PLNBEZ = it_mat-matnr
    and GETRI = '00000000'.
    Hope you need the records for which GETRI is not updated.
    Regards
    Vinod

  • How to get multiple selections from jsp page in my servlet

    Hello Everyone,
    I've a list that allows users to make multiple selections.
    <select name=location multiple="multiple">
        <option>
             All
        </option>
        <option>
             Hyd
        </option>
        <option>
             Dub
        </option>
        <option>
             Mtv
        </option>
      </select>I want to get the selections made by user in jsp page from my servlet, selections can be multiple too.
    ArrayList locList = new ArrayList();
    locList = request.getParameter("location");when I do so, I get compilation error as the request returns string type. How do I then get multiple selections made by the user.
    Please let me know.

    For those kind of basic questions it would help a lot if you just gently consult the javadocs and tutorials.
    HttpServletRequest API: [http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpServletRequest.html]
    Java EE tutorial part II: [http://java.sun.com/javaee/5/docs/tutorial/doc/]
    Coreservlet tutorials: [http://courses.coreservlets.com/Course-Materials/]

  • How to get multiple selected fields in list

    Hello all,
    I am trying to get multiple selected value from a list but i dont know how to get multiple selected fields from a list though AS3.
    Actually i want to pass the selected fields to php, so for that i need to get the selections and send to php.
    Thankx..

    i want to put the selected fields of list in an array through AS3....
    actually......i figured it out how to do that...........
    Its simple......use
    list.selectedItems[index]
    and to get the number of items selected......
    list.selectedItems.length
    simple.....

  • Toggling between single and multiple selection in a table

    I am working on ADF faces. I need to switch between single and multiple selection in <af:table based on a button I select.
    I cannot use switcher or rendered property inside <af:table. Only the first one is rendering the second one is not rendering based on the switch
    <f:facet name="selection">
    <af:tableSelectMany autoSubmit="true"
    rendered="#{treeBean.multipleRows}"/>
    </f:facet>
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"
    rendered="#{treeBean.singleRows}"/>
    </f:facet>
    When I use inside the switcher, it doesn't like the parent.
    Any ideas would be greatly appreciated.
    Thanks,
    Vijay.

    I have probably misunderstood what your issue is. I do not know what your version of ADF faces is. Here is some sample code working with my version. Please check if your jdev has "rowSelection" attribute. If it has, please try my sampe code
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:directive.page contentType="text/html;charset=utf-8"/>
    <f:view>
    <af:document title="tableSelectMany Demo">
    <af:form>
    <af:panelGroup layout="vertical">
    <af:messages/>
    <af:selectOneChoice value="#{sessionScope.tableSelection}"
    autoSubmit="true"
    id="selType"
    label="Selection Type">
    <af:selectItem label="Single" value="#{null}"/>
    <af:selectItem label="Multiple" value="#{true}"/>
    </af:selectOneChoice>
    <af:table summary="Periodic table"
    binding="#{tableActions.table}"
    partialTriggers="selType"
    rowSelection="#{sessionScope.tableSelection ? 'multiple' : 'single'}"
    value="#{periodicTable.tableData}" var="row" rows="10">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Name"/>
    </f:facet>
    <af:outputText value="#{row.name}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Symbol"/>
    </f:facet>
    <af:outputText value="#{row.symbol}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Action Column"/>
    </f:facet>
    <af:commandButton immediate="true" text="Action"
    action="#{row.action}"/>
    </af:column>
    </af:table>
    </af:panelGroup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • Select data from table not in another table

    Hi,
    I want to select data from table A which is not in table B.
    Currently I am doing:
    select
    snoA,
    nameA,
    dobA
    from A
    where snoA not in
    (select snoB from A, B
    where snoA = snoB
    and nameA = nameB)
    But above is very slow.
    Can I do something like:
    select
    snoA,
    nameA,
    dobA
    from A, B
    where
    EXCLUDE ( snoA = snoB and nameA = nameB)
    Please note that I need the where condition on both the columns.
    any help will be appreciated.
    -- Harvey

    What are the approximate data volumes in A and B?
    What is "very slow"?
    What version of Oracle?
    What is the query plan?
    Without knowing anything about your system, my first thought would be to see if a NOT EXISTS happened to be faster for your data
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE NOT EXISTS (
        SELECT 1
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )Of course, I'm not sure why you are joining A & B in your NOT IN subquery. It would seem like you would just need a correlated subquery, i.e.
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE snoA NOT IN (
        SELECT snoB
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )That should be more efficient than the original query. The NOT EXISTS version may or may not be more efficient than the NOT IN depending on data volumes.
    Justin

  • Can a procedure select data from tables on other schemas?

    Can a procedure select data from tables on other schemas?
    If it is posible, which syntax should I use to identify the tables and schemas on the SELECT query?

    Yes , it is possible..unless the current user has the right privileges on others' db objects schema.
    Now , as regards the syntax....
    1) The more descriptive way is to use the format ... <owner_schema>.<obj_name>.
    2) If you have declared public synonyms of other schema's objects then you can refer to them as just <obj.name>.... but the <owner_schema>.<obj_name> is not wrong.
    3) If the db objects reside on another database you must have declared a db link.... then the syntax is <owner_schema>.<obj_name>@<db_link_name>.
    Regards,
    Simon

  • Get multiple selected row

    Hi all,
    I need to get all the selected row of a table and pass it to another node .I followed the thread Re: How to Select Multiple Rows from a Table in  Webdynpro Abap
    but i am getting errors in the following code
    LOOP AT lt_temp INTO wa_temp.
        CALL METHOD wa_temp->get_static_attributes
          IMPORTING
            static_attributes = ls_node1.
        APPEND ls_node1 TO lt_node1.
        CLEAR ls_node1.
      ENDLOOP.
    it is throwing move-corresponding error.
    Is there any other way of doing it?
    Thanks,

    wa_temp->get_static_attributes(
    IMPORTING
    static_attributes = ls_node1 ).
    ls_node1 is of type node1
    and
    above declaration implies ls_node1 is type  IF_WD_CONTEXT_NODE
    wa_temp is of type wa_temp type ref to if_wd_context_element.
    above declaration implies wa_temp is of type IF_WD_CONTEXT_ELEMENT
    i tell you the easy way, use the CTRL+F7 wizard to Read  Context attribute from the context. This will generate the correct code for you to understand exactly how to fetch the attribute value.
    for example if i want to read value of attribute STATUS_VISIBILITY from a NODE say NODE_UTILITY
    generated code looks like below.
    DATA:
          node_utility                        TYPE REF TO if_wd_context_node,
          elem_utility                        TYPE REF TO if_wd_context_element,
          stru_utility                        TYPE if_v_podetails=>element_utility ,
          item_status_visibility              LIKE stru_utility-status_visibility.
    *   navigate from <CONTEXT> to <UTILITY> via lead selection
        node_utility = wd_context->get_child_node( name = if_v_podetails=>wdctx_utility ).
    *   get element via lead selection
        elem_utility = node_utility->get_element(  ).
    *   get single attribute
        elem_utility->get_attribute(
          EXPORTING
            name =  `STATUS_VISIBILITY`
          IMPORTING
            value = item_status_visibility ).
    greetings
    Prashant

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Select dates from table

    Hello,
    this is my table
    CREATE TABLE TEMP_LEAP
        "DATE_FROM" DATE
      )Data in it is inserted with procedure that takes 2 parameters of date format:
    CREATE OR REPLACE
    PROCEDURE  "T_PROC" (p_dat_from date, p_dat_to date) IS
    BEGIN
    DECLARE
      day       number     := 0;
      st           NUMBER := 0;
    BEGIN
    day := p_dat_to+1 - p_dat_from;
    for p in 1 .. day    
    loop  
       insert into temp_leapp (date_from) values (p_dat_from+st);   
        st := st+1; 
    end loop; 
    commit;
    END;
    END; Now lets fill up the data in table:
    execute T_PROC(TO_DATE('01.01.2010','DD.MM.YYYY'),TO_DATE('17.08.2013','DD.MM.YYYY'));Data is now filled in the table.
    What i want to do is make a select statment that will do the following output data:
    01.01.2010 - 31.12.2011
    01.01.2012 - 31.12.2012
    01.01.2013 - 17.08.2013What i want is get the leap year if there is one. I only need days of the year so dont mind the months.
    I need to check if there is a leap year in given period p_dat_from and p_dat_to.
    If its not then we will get only one record from our select statment and it will be made of values of: p_dat_from - p_dat_to.
    If there is a leap year in our given period we will get folowing statments (example above).
    01.01.2010 - 31.12.2011 <- first date is p_dat_from and second is the last day before leap year
    01.01.2012 - 31.12.2012 <- this is leap year. First date is start of leap year and last date is end of leap year or p_date_to (if it ends in leap year).
    01.01.2013 - 17.08.2013 <- and this is the period after leap year.
    This is a scrap of code i came ou with so far:
    SELECT
    MIN(date_from),
    MAX(date_from)
    FROM temp_leap
    WHERE remainder(to_number(to_char(date_from,'yyyy')),4) = 0
    union
    SELECT
    MIN(date_from) over (partition by to_char(date_from,'yyyy')),
    MAX(date_from) OVER (PARTITION BY to_char(date_from,'yyyy'))
    FROM temp_leap
    WHERE remainder(to_number(to_char(date_from,'yyyy')),4) <> 0
    ORDER BY 1,2;Ok thats it. I hope its understandable what i need to do.
    If you got any questions please ask away.
    PS there is all i need to do. Dont bother with questions "what i february is after before etc" i do not care about that. All the other logic is already fixed all i need is what i wrote above.
    Thanks.
    Edited by: BluShadow on 14-Mar-2013 08:24
    fixed code tags

    Here's one way...
    SQL> create table temp_leap(date_from DATE)
      2  /
    Table created.
    SQL>
    SQL> insert into temp_leap
      2  select date '2010-01-01' + rownum - 1
      3  from dual
      4  connect by rownum <= (date '2013-08-17' - date '2010-01-01') + 1
      5  /
    1325 rows created.
    SQL>
    SQL> commit
      2  /
    Commit complete.
    SQL> ed
    Wrote file afiedt.buf
      1  select min(date_from)||' - '||max(date_from)
      2  from
      3        (select date_from
      4              ,sum(leap_yr_switch) over (order by date_from) as leap_yr_switch_cnt
      5        from (
      6              select date_from
      7                    ,case when lag(leap_yr) over (order by date_from) != leap_yr then 1 else 0 end as leap_yr_switch
      8              from (
      9                    select date_from
    10                          ,case when mod(to_number(to_char(date_from,'YYYY')),400) = 0
    11                                 or (    mod(to_number(to_char(date_from,'YYYY')),4) = 0
    12                                     and mod(to_number(to_char(date_from,'YYYY')),100) != 0
    13                                    )
    14                           then 1 else 0 end as leap_yr
    15                    from temp_leap
    16                   )
    17             )
    18       )
    19  group by leap_yr_switch_cnt
    20* order by min(date_from)
    SQL> /
    MIN(DATE_FROM)||'-'||MAX(DATE_FROM)
    01-JAN-2010 00:00:00 - 31-DEC-2011 00:00:00
    01-JAN-2012 00:00:00 - 31-DEC-2012 00:00:00
    01-JAN-2013 00:00:00 - 17-AUG-2013 00:00:00Edited by: BluShadow on 14-Mar-2013 08:51
    slight correction to the leap year calculation, forgot about the 100 yrs not being leap years.

  • Select data from table where field is initial

    I have table that has 10 million records.
    I want to select data from this table where certain date field is blank.
    *SELECT * FROM table*
    INTO TABLE internal table
    WHERE PSTNG_DATE = BLANK.
    Does anybody know how to select data from data base table when certain field is blank.
    I cont select all data once and delete which i dont want, the table is big, it will blow up app server.
    thanks in advance,
    Sachin
    Moderator: Pls do not lock the posting instead provide me the link, its disrespecting.

    Respect the forum rules and common sense, and you will be respected.
    "how to select data from a database table when the field is blank" is very basic, and basic questions will be locked, because they have been asked many times and you can find the answer yourself with a little effort. There is nothing disrespectful about it.
    Thread locked.
    Thomas

  • Selecting datas from tables where tbale name is store in a row

    Hi
    I need to select datas from several different table (QE01, QE02, QE06, QEXXetc.).
    The code of the tables I need to select from is store in another table.
    Here's an example:
    In the table JOURNAL, I have several entries:
    01
    06
    21
    31
    These are the codes of the tables I need to select datas from:
    QE01
    QE06
    QE21
    QE31
    I can't use variables in here, how could that be done ?

    Hi,
    This should not be a question on how to query data, but rather on how to store them.
    You did not mention any version, but I suggest you read about partitioning,
    http://download.oracle.com/docs/cd/E11882_01/server.112/e25789/schemaob.htm#CNCPT112
    Could be that especially exchange partition is interesting.
    My guess is that these tables are created on the fly as part of data loads?
    If so, complete that ETL process by exchanging the just loaded data into a partioned table. And your problem of what to query has disappeared.
    Regards
    Peter

  • Adding a Multiple Selection to a Table Dynamically on Process Request

    Dear All
    I am trying to get a selected row in a Table in an Oracle Seeded page. I have tried Row reference but was not successful.Hence I an trying to add the Multiple selection to the same table . Please help.
    The code I tried is
    OATableBean tabObj=(OATableBean) webBean.findChildRecursive("partCompanyVO1");
    if(tabObj!=null)
    System.out.println(" Not Null ");
    tabObj.setSelectionDisabledBindingAttr("Disabled");
    tabObj.setSelectionDisplayed(true);
    tabObj.setControlBarDisplayed(false);
    tabObj.prepareForRendering(pageContext);
    OAWebBeanTable tableSelectionBean = (OAWebBeanTable)tabObj.getTableSelection();
    System.out.println(" tableSelectionBean "+tableSelectionBean);
    OASingleSelectionBean tabSingleSelObj=(OASingleSelectionBean)tabObj.getTableSelection() ;
    System.out.println(" tabSingleSelObj "+tabSingleSelObj);
    if(tabSingleSelObj!=null)
    tabSingleSelObj.setText("Select Object");
    System.out.println(" Selection is Enabled ");
    }

    Antony,
    You will be able to get all the selected rows using
    Row[] selectRows = VO.getFilteredRows("Flag","Y") ;
    Regards,
    Gyan
    www.gyanoracleapps.blogspot.com
    www.querenttech.com

  • Struts: getting multiple selected values from a select element

    Hi Friends,
    I am a total newbie with struts,I have manage to run a simple login script,
    Now I was wonderingif there is a select box and user has the ability to select multiple values from it how do I get those values in the *Form class
    my select tag looks like this
    <html:select property="listboxValue" mulitple="mulitple">
    ...options--
    </html:select>
    in the ****Form extends ActionForm{....I have setter and getters for getting the value  from select box as below
    public void setListboxValue(String value){
    this.listboxValue = value;
    and the getter is
    public String getListboxValue(){
    return this.listboxValue ;
    please never mind the missing brackets and such.
    What I was hoping to get to work was something like this
    public void setListboxValue(String[] value){
    this.listboxValue = value;
    but that does not work...If I have the an array being passed,it seems like this method is no even envoked
    Please guide me
    Thanks

    I'm having trouble to get in the ActionForm all the selected values in my multiple select. I select all the values by setting to true the selected attribute of all the options in a javascript function. In the ActionForm the variable is String[]. I'm not getting any ClassCastException, but I only receive the first value selected (String array with just one element).
    Select definition:
    <html:select name="detalleConsultaForm" property="destinatarios" multiple="true" size="8" >
    Javascript function:
    function validalistarelacion(campo)
    {   if (campo.length < 1)
    alert("Campo sin valores");
    campo.select();
    return false;
    for (var i = 0; i < campo.length; i++)
    campo.options.selected = true;
    return true;
    ActionForm:
    String[] destinatarios;
    public String[] getDestinatarios() {
    return destinatarios;
    public void setDestinatarios(String[] destinatarios) {
    this.destinatarios = destinatarios;
    What I get:
    2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG BeanUtils - setProperty(es.tme.apl.mante
    nimientosPlanificados.form.DetalleConsultaForm@59def5, destinatarios, [2320])
    2006-03-30 12:54:19,899 [ExecuteThread: '10' for queue: 'weblogic.kernel.Default'] DEBUG ConvertUtils - Convert String[1] to class
    'java.lang.String[]'
    Thnx

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

Maybe you are looking for

  • Help needed in BAdi -SRM

    Hi, i am new to SRM my problem is i need to change the standard form BBP_BIDINV_BID into ZPR_BIDINV_BID to fufill the enhancements like : The text for Published Bid Invitation email should read as: some text,The text for email when Bid is accepted sh

  • Use of Digital Certifcate

    From http://otn.oracle.com/sample_code/products/forms/extracted/hyperlink/fileupload.html: "You can obtain a new certificate from a Certificate Authority or you can generate your own using the cert-maker.bat file supplied in the fileupload\misc direc

  • Ways to reduce downtime for filling up setup table

    Hi Experts, Can anyone tell me the step by step process so that i can reduce downtime for filling up setup tables? I know that setup tables can be filled by considering sales document numbers....but the further steps are not clear with me...........s

  • Create new row and set ID

    Hi, I have to insert a new row in a database. How can I set the id? its value returns me it this query: SELECT xxril.evento_id_seq.nextval from dual The code is: row[id]= getEventiView1().createRow(); row[id].setAttribute("ID", ????? ); try{ row[id].

  • INSPECTOR HUD absolutely not working

    Wow.... this is frustrating. I am using Aperture 3.1. Suddenly, without reason, the Inspector HUD simply does not work in as follows: a. When I first open Aperture, no problem bringing up the IHUD with "H" (as it should). b. When I go into fullscreen