How do I add remove Multiple rows in a table

Guys,
Can somebody tell me How do I add and remove <u><b>Multiple</b></u> rows between two tables.
<u>Also, I want the row or rows to disappear from the source table as soon as it is moved or added to the second table and appear again once its been removed from the second table.</u>
The data is being fed by a BI query not a BAPI..
thanks,
Naseer

Hi Jarrod,
Thanks for replying. Even though it seemed like it might not be possible. But we figured it out.
We are using signals to basically LOOP and do an ADD and REMOVE.
Thanks again,
Naseer

Similar Messages

  • How to create XML from multiple rows in a table?

    Hi All,
    I have a table where it has multiple rows as below which I need to send as a XML.. can any one let me know how to create?
    Table:
    PRDID,NAME,DESCRIPTION,SUPPLIER,PRICE
    2012,AAA,ADESC,SUPPLIER1,1.8
    2012,AAA,ADESC,SUPPLIER2,2.5
    XML should be :
    <ROOT>
    <PRDID>2012</PRDID>
    <NAME>AAA</NAME>
    <DESCRIPTION>ADESC</DESCRIPTION>
    <PRICE>
    <REGION>SUPPLIER1</REGION>
    <PRICE>1.8</PRICE>
    <REGION>SUPPLIER2</REGION>
    <PRICE>2.5</PRICE>
    </PRICE>
    </ROOT>
    Thanks
    Rajeev

    Hi
    This white paper shows how to do it - http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/101c974c-11f9-2b10-4da5-cd350b7eeda0
    Michael

  • How do I add a new row to an AbstractTableModel?

    I'm having an issue with adding new data to a table row. Every row I add contains the same data which is always the last data I grabbed from my database. I'm not sure if my issue has to do with how I set up the data to be passed or the table itself or both... Any help would be appreciated. It seems like the tablemodel is holding the memory spot ArrayList I'm passing. If I have to set up an arraylist of arraylists, to pass how do I do that?
    My output is always:
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    1,4,Laser,10,120,100
    Desired output:
    1,1,Beam,10,99,100
    1,2,Canon,10,120,100
    1,3,Missile,10,66,100
    1,4,Laser,10,120,100
         * Extract weaponIDs by hullType from weapon database
    private void setWeapons(int hullType){
    // equpModel is the tableModel
        equipModel.clearTable();
        Weapon tempWeapon = new Weapon();
        ArrayList newData = new ArrayList();
        for (Iterator <Weapon> i = dataBaseManager.weaponList.iterator(); i.hasNext(); ){
            tempWeapon = i.next();
            if (tempWeapon.weaponClass == hullType){
                newData.add(0,1);
                newData.add(1,tempWeapon.weaponID);
                newData.add(2,tempWeapon.weaponName);
                newData.add(3,tempWeapon.weaponCps);
                newData.add(4,tempWeapon.weaponMass);
                newData.add(5,tempWeapon.weaponCost);
                equipModel.insertRow(newData);
    }Here is a snipet from the table class
    public class GenTableModel extends AbstractTableModel {
      private ArrayList data; // Holds the table data
      private String[] columnNames; // Holds the column names.
       * Constructor: Initializes the table structure, including number of columns
       * and column headings. Also initializes table data with default values.
       * @param columnscolumns[] array of column titles.
       * @param defaultvdefaultv array of default value objects, for each column.
       * @param rowsrows number of rows initially.
      public GenTableModel(String[] columns, Object[] defaultv, int rows) {
        // Initialize number of columns and column headings
        columnNames = new String[ columns.length ];
        for(int i = 0; i < columns.length; i++) {
          columnNames [ i ] = new String(columns [ i ]);
        // Instantiate Data ArrayList, and fill it up with default values
        data = new ArrayList();
        for(int i = 0; i < rows; i++) {
          ArrayList cols = new ArrayList();
          for(int j = 0; j < columns.length; j++) {
            cols.add(defaultv [ j ]);
          data.add(cols);
       * Adds a new row to the table.
       * @param newrowArrayList new row data
      public void insertRow(ArrayList newrow) {     
        data.add(newrow);
        super.fireTableDataChanged();
       * Clears the table data.
      public void clearTable() {
        data = new ArrayList();
        super.fireTableDataChanged();
    }

    Hi thanks again for responding
    Here is the Initialization, including the panel and scrollpane it sits on.
          // Table attempt
            JPanel tablePanel = new JPanel(new BorderLayout());
            tablePanel.setBounds(PANEL_X+2*PANEL_DISTANCE, PANEL_Y, PANEL_WIDTH+300, PANEL_HEIGHT);
            title = BorderFactory.createTitledBorder(blackLine, "Table List");
            tablePanel.setBorder(title);
    // This is column tile plus one dummy initilization set.
            String[] columnNames = {"DB", "ID", "Name", "CPS", "Energy", "Mass", "Cost"};
            Object[] data = {new Integer(0),new Integer(0), "Empty", new Integer(0),
                        new Integer(0),new Integer(0),new Integer(0)};
    // here is the GenTableModel creation
            equipModel = new GenTableModel(columnNames, data, 1);
            equipmentTable = new JTable(equipModel);
            equipmentTable.setRowSelectionAllowed(true);
            equipmentTable.setFillsViewportHeight(true);
            equipmentTable.setColumnSelectionAllowed(false);
            TableColumn column = null;
            column = equipmentTable.getColumnModel().getColumn(0);
            column.setPreferredWidth(20);
            column = equipmentTable.getColumnModel().getColumn(1);
            column.setPreferredWidth(20);
            JScrollPane scrollPane = new JScrollPane(equipmentTable);
            tablePanel.add(scrollPane);
            add(tablePanel);
        Here is the full code for GenTableModel. It is as you guessed.
    public class GenTableModel extends AbstractTableModel {
      private ArrayList data; // Holds the table data
      private String[] columnNames; // Holds the column names.
      public GenTableModel(String[] columns, Object[] defaultv, int rows) {
        // Initialize number of columns and column headings
        columnNames = new String[ columns.length ];
        for(int i = 0; i < columns.length; i++) {
          columnNames [ i ] = new String(columns [ i ]);
        // Instantiate Data ArrayList, and fill it up with default values
        data = new ArrayList();
        for(int i = 0; i < rows; i++) {
          ArrayList cols = new ArrayList();
          for(int j = 0; j < columns.length; j++) {
            cols.add(defaultv [ j ]);
          data.add(cols);
      public int getColumnCount() {
        return columnNames.length;
      public int getRowCount() {
        return data.size();
      public String getColumnName(int col) {
        return columnNames [ col ];
      public Object getValueAt(int row, int col) {
        ArrayList colArrayList = (ArrayList) data.get(row);
        return colArrayList.get(col);
      public Class getColumnClass(int col) {
        // If value at given cell is null, return default class-String
        return getValueAt(0, col) == null ? String.class
                                          : getValueAt(0, col).getClass();
      public void setValueAt(Object obj, int row, int col) {
        ArrayList colArrayList = (ArrayList) data.get(row);
        colArrayList.set(col, obj);
      public void insertRow(ArrayList newrow) {     
        data.add(newrow);
        super.fireTableDataChanged();
      public void deleteRow(int row) {
        data.remove(row);
        super.fireTableDataChanged();
      public void deleteAfterSelectedRow(int row) {
        int size = this.getRowCount();
        int n = size - (row + 1);
        for(int i = 1; i <= n; i++) {
          data.remove(row + 1);
        super.fireTableDataChanged();
      public ArrayList getRow(int row) {
        return (ArrayList) data.get(row);
      public void updateRow(ArrayList updatedRow, int row) {
        data.set(row, updatedRow);
        super.fireTableDataChanged();
      public void clearTable() {
        data = new ArrayList();
        super.fireTableDataChanged();
    }

  • How do I effectively remove multiple duplicate contacts from S5?

    How do I effectively remove multiple duplicate contacts from Samsung S5? Genius who sold me the phone duplicated ALL of my existing contacts.

        Thank you for reaching back out to us, if your contacts are backed up by GMail, if you log in to your account on a PC, they should appear online under the Contacts tab. Try this also, if you go to Contacts>Settings icon(three vertical dots button) Settings>Contacts to Display> What options are selected? This screen will help you pick and choose what contacts list to display.
    NicandroN_VZW
    Follow us on twitter @VZWSupport

  • How do I add/remove programmes from computer.It is an OSX 10.7.5

    How do I add/remove programmes on my OSX 10.7.5 please

    Sorry its not an ipad it is a desktop computer

  • Updating multiple rows in a table in ADF

    Hi
    How do we update multiple rows in a table.
    Onclicking a update button the changed rows must be updated.

    Hi Prince,
    currently I am selecting one row from the table and rendering a region at the top of the table and capturing the user entered data with the following code:
    ViewObjectVOImpl vo = getViewObjectVO1();
    Row CurrentRow = vo.getCurrentRow();
    //After this I perform the checks like user entered value is not null or check input as per business logic.
    if(CurrentRow.getAttribute("attributeName") ==null){
    //Add what message you want to display
    //Add other business logic.
    After making all the checks, i commit it.
    getOADBTransaction().commit();
    Now in my new page I am capturing the user input in the table itself like an excel sheet. Suppose there are ten rows in my advanced table on my page, and each row has one editable field. I have one save button at the bottom of the table.
    Now on clicking the save button I have to capture the user input, check whether there is any null value and if all the entered data is correct then only I should commit it.
    Can you please let me know how we can accomplish that.
    Regards
    Hawker

  • Update row in a table based on join on multiple rows in another table

    I am using SQL Server 2005. I have the following update query which is not working as desired.
    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. But the above update query is considering only one row from
    PlantAction table even though there are multiple rows that match with DocID and PlantID.
    DocHistory column is of type NVARCHAR(MAX).
    How do I fix my query to achieve what I want ? Thanks for the help.

    UPDATE DocPlant
    SET DocHistory = DocHistory + CONVERT(VARCHAR(20), PA.ActionDate, 100) + ' - ' + PA.ActionLog + '. '
    FROM PlantDoc PD INNER JOIN PlantAction PA on PD.DocID = PA.DocID AND PD.PlantID = PA.PlantID 
    We do not use the old Sybase UPDATE..FROM.. syntax. Google it and learn how it does not work. We do not use the old Sybase CONVERT() string function. You are still writing 1950's COBOL with string dates instead of temeproal data types. 
    You also did not post DDL, so we have to guess about everything. Does your boss make you work without DDL? How do you do it? 
    >> For each DocID and PlantID in PlantDoc table there are multiple rows in PlantAction [singular name?] table. I would like to concatenate ActionDate and ActionLog information into DocHistory column of DocPlant table. <<
    Why? What does this new data element mean? This is like dividing Thursday by Red and expecting a reasonable answer. Now, non-SQL programmers who are still writing COBOL will violate the tiered architecture rule about doing display formatting in the database.
    If you will follow forum rules, we can help you. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How can we pass the entire rows of a table to a web service in a VC model ?

    Hi,
    On the click of the submit button, I have to pass the rows of two tables into an enterprise service. This service also takes other fields of a form as an input.
    How can we pass the entire rows of a table into a service ?
    Regards,
    Nitin

    Hi Nitin,
    It seems that you have two or three different structures to pass data using your webservice. In your main question, two tables, you can join both in one table and from there call the webservice. In order to pass the entire table you need:
    1. Draw a line between your joinned table and your service,
    2. Map the fields,
    3. Create a 'SUBMIT' in your table tool bar. Right click on your table and choose 'Create Toobar', '+', name and choose 'Submit' as your event.
    4. Go to Configure Element (Table View) 'Multiple' at Selection Mode.
    Reward points if helps you to solve your question.
    Regards,
    Gilson Teixeira

  • Inserting Multiple Rows in a table

    Hello,
    I need to insert multiple rows in a table with the selected items from a list (Multiple select).
    How do i go about it. I'm using ADF-struts-UIX application on Jdeveloper 9.0.5.2
    Thanks.

    Jonas, I've downloaded the sample application from your ADF UIX Editable table tip but have some problems.
    I can't even open the emp.table.uix file - errors are:
    Parsing error. Unable to parse binding.
    javax.servlet.jst.el.ELException:Function ctrl:createSortableHeaderModel was not found.
    and
    javax.servlet.jst.el.ELException:Function ctrl:getSortOrder was not found.
    Also - is there a place in the sample where you define the sample tables? They do not seem to match the standard sample emp table, for instance.
    I've just started using JDeveloper and would like to use the solution.
    Thanks - Linda

  • Best practice for deleting multiple rows from a table , using creator

    Hi
    Thank you for reading my post.
    what is best practive for deleting multiple rows from a table using rowSet ?
    for example how i can execute something like
    delete from table1 where field1= ? and field2 =?
    Thank you

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Need to remove duplicate rows from a table

    Hi Gurus ,
    I am using oracle 11.2.0.3 .
    SQL> desc osstage.S_EVT_ACT_X;
    Name                                      Null?    Type
    ROW_ID                                    NOT NULL VARCHAR2(15 CHAR)
    LAST_UPD                                  NOT NULL DATE
    PAR_ROW_ID                                NOT NULL VARCHAR2(15 CHAR)
    ATTRIB_17                                          NUMBER(22,7)
    ATTRIB_26                                          DATE
    ATTRIB_02                                          VARCHAR2(100 CHAR)
    PROCESS_TIMESTAMP                                  TIMESTAMP(6);
    now when i give the below command it gives the error as someone has disabled the constraint accidently .
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1;
    Error starting at line 3 in command:
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1
    Error report:
    SQL Error: ORA-02437: cannot validate (OSSTAGE.S_EVT_ACT_X_P1) - primary key violated
    02437. 00000 -  "cannot validate (%s.%s) - primary key violated"
    *Cause:    attempted to validate a primary key with duplicate values or null
               values.
    *Action:   remove the duplicates and null values before enabling a primary
               key.
    Can you please guide me with this issue .

    Please refer
    Script: Deleting Duplicate Rows from a Table (Doc ID 31413.1)
    How to Find or Delete Duplicate Rows in a Table (Doc ID 1004425.6)

  • Selecting multiple rows of a table

    Hi Forum,
    How to select multiple rows of a table at a time? Please help me..
    Thanks
    Swapna

    Hi Swapna,
    To select more then one row in table, just set the selectionmode property of table to 'multi' or 'auto' and also change the selection property of the node (to which table is binded) to  0:n.
    I hope it helps.
    Regards
    Arjun
    Edited by: Arjun on Feb 4, 2009 11:52 AM

  • Inserting multiple rows in child table

    i have two entity beans (main and child) with relationship one to many .... when i insert one row in main table (ie when i make one object for main entity bean)... how to insert multiple rows in child table...

    Can anyone pls provide some sample code for the above.. how to pass a collection and populate it in the child table.
    1.Where to pass the collection, to the childbean directly or to the parent bean and then itereate to the collectio and create child bean.
    Much obliged if you could paste some code for the above..

  • Inserting multiples rows into a table using function or procedure..

    How do i insert multiples rows into a table using function or procedure?
    Please provide me query..

    Use FORALL bulk insert statement...
    eg:
    procedure generate_test_data as
    type cl_itab is table of integer index by pls_integer;
    v_cl_itab cl_itab;
    type cl_vtab is table of varchar2(25) index by pls_integer;
    v_cl_vtab cl_vtab;
    type cl_dtab is table of date index by pls_integer;
    v_cl_dtab cl_dtab;
    begin
    for i in 1.. 100 loop
              v_cl_itab(i):= dbms_random.value(1,1000);
              v_cl_vtab (i):=dbms_random.string('a',20);
              v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');          
         end loop;
         forall i in v_cl_itab.first .. v_cl_itab.last
              execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);          
         commit;
    end;

  • Reg Selection of  Multiple Rows in a Table

    Hi all,
    I have to select multiple rows from a table and have to display those selected records in another table in the next screen.
    The problem is, when I am selecting the records in a table, selection should not be allowed on some records based on a condition. Is it possible with the default selection mode of webdynpro. If so, Please tell me how can we disable the selection of certain records in a table(using the default selection mode provided by webdynpro)
    Else, if we have to use check boxes for selection(in case of my problem), please do help me out in how to disable the selection of certain records in a table(using check boxes for selection).
    Please help me out. Its urgent...
    Reward points guranteed.
    Regards,
    Murthy.

    HI Narayana,
    Multiple selection  property is specific to a table, not for a tableElment(ie. for a row), so u cant set some of the rows as multi selected and some as node
    U can use Checkbox for this purpose. Based on the condition u can make the check box as enabled and disabled
    To achieve this, Create 2 boolean variables inside table node, one for checkbox value(Let it be <b>CBValue</b> .Bind this to checked property of Checkbox) and other for enabling and disabling Checkbox(Let it be <b>CBReadOnly</b>. Bind this to readonly property of CheckBox).
    At the time of creation of table elements, as per the condition, u can control the selection as
    IPrivate<View>.I<Table>Node tNode=wdContext.node<Table>();
    for(int i=0;i<5;i++)
    IPrivate<View>.I<Table>Element tEl=tNode.create<Table>Element();
    tNode.addElement(tEl);
    tEl.setCBValue(false);//Unchecking Checkboxes initially
    if(condition=non selectable)
      tEl.setCBReadOnly(true);
    else
      tEl.setCBReadOnly(false)
    Regards
    Fahad Hamsa

Maybe you are looking for

  • Moving itunes folder and music to external drive

    I moved my itunes folder and all my mp3's onto an external hard drive. As a result, all of the songs that appear in itunes has a ! and says they cannot find where the songs are. It seems that I have to re-import everything all over again including re

  • No light showing on my Apple Tv when i connect power lead. I have restored ATV with I tunes but still no luck when connected to power.

    No light showing on my Apple Tv Unit when connected to power source. I have restored and updated via i tunes light comes on whilst in this mode but as soon as i connect power cable and plug in nothing happens?

  • How to post in March 2008 ?

    Hi, Fiscal yr var is V3 - Apr - Mar. Special period 13-16. Now the period is 3 -June 2009 .So i have open the period. But i have closed period 12 2009. -March 2009. But  now i want to post some pending entries in Mar 2009. Then how to post the entry

  • PVLAN Guidance

    Greetings forum. So I am working on a project that could potentially make use of PVLANs to isolate some hosting servers we are possibly going to bring online in the coming weeks. We currently have Catalyst 4507R switches as the core at our DC running

  • Password Sync using Waveset

    Hello All, I am trying use the password sync util which is part of the Identity Manager aka Waveset Lighthouse to capture the password changes on Active Directory and pass it to an LDAP server. It intercepts the password change on the Active Director