Issue while deleting a row

Hi,
We have a VL view comprising of B and _TL table.
Created an Entity Oject for _TL table , XXXTLEO
Created an Entity Object for _VL view,XXXVLEO
Created an association between these two EOs XXXToTLAO via Primary Key.
Changed the Accessor Name in the Destination to OA_TL_ENTITIES.
With the above association,we are able to create record in the B table. Also observed that corresponding records got inserted in to TL table.
But when we try to delete the record we are getting an error.
Unable to perform transaction on the record. \nCause: The record has been deleted by another user. \nAction: Cancel the transaction and re-query the records to get the new data.
In the _TL table, there is no Object Version Number Column. Even after creating the same and making the same as change Indicator, we are facing the same error.
Please let us know if we are missing any thing.
Thanks in advance,
Raghu

Hi,
We have a VL view comprising of B and _TL table.
Created an Entity Oject for _TL table , XXXTLEO
Created an Entity Object for _VL view,XXXVLEO
Created an association between these two EOs XXXToTLAO via Primary Key.
Changed the Accessor Name in the Destination to OA_TL_ENTITIES.
With the above association,we are able to create record in the B table. Also observed that corresponding records got inserted in to TL table.
But when we try to delete the record we are getting an error.
Unable to perform transaction on the record. \nCause: The record has been deleted by another user. \nAction: Cancel the transaction and re-query the records to get the new data.
In the _TL table, there is no Object Version Number Column. Even after creating the same and making the same as change Indicator, we are facing the same error.
Please let us know if we are missing any thing.
Thanks in advance,
Raghu

Similar Messages

  • Issue while deleting a row from a table

    Dear friends,
    i am getting an issue while deleting a row from a table, pls check screen shots , the first screen shot is my table contents
    when i delete 2 row , the second row is deleting properly like below screen shot
    but i want like below screen shot , Col1 contents should be like pic 1 . could any one pls let me know how to solve this issue.
    Thanks
    Vijaya

    Hi vijaya,
    please try this code, it will help you.
    DATA : it_rows  TYPE wdr_context_element_set,
              wa_rows LIKE LINE OF it_rows.
       DATA lo_nd_table TYPE REF TO if_wd_context_node.
        DATA lt_table TYPE wd_this->elements_table.
       DATA lo_el_table TYPE REF TO if_wd_context_element.
       DATA ls_vbap TYPE wd_this->element_table.
    DATA: ld_index TYPE i.
    data value TYPE sy-index.
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table= wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    * get element via lead selection
    * alternative access  via index
    * lo_el_table = lo_nd_table->get_element( index = 1 ).
    * @TODO handle not set lead selection
       IF lo_el_table IS INITIAL.
       ENDIF.
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
       lo_nd_table->get_static_attributes_table( IMPORTING table = lt_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    ** @TODO compute values
    ** e.g. call a model function
    * navigate from <CONTEXT> to <table> via lead selection
       lo_nd_table = wd_context->get_child_node( name = wd_this->wdctx_table ).
    * @TODO handle non existant child
    * IF lo_nd_table IS INITIAL.
    * ENDIF.
    ** @TODO compute values
    ** e.g. call a model function
    it_rows  =  lo_nd_table>get_selected_elements( ).
       CALL METHOD lo_nd_table->GET_LEAD_SELECTION_INDEX
       RECEIVING
         INDEX  = value .
      LOOP AT it_rows INTO wa_rows.
         CALL METHOD wa_rows->get_static_attributes
           IMPORTING
                  static_attributes = ls_table.
         READ TABLE lt_table INTO ls_table WITH KEY col1 = ls_table-col1.
          ld_index = value.
              ENDLOOP.
       CLEAR : ls_table-col2,
             ls_table-col2.
       MODIFY lt_table INDEX ld_index FROM ls_table.
      lo_nd_table->bind_table( new_items = lt_table set_initial_elements = abap_true ).

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

  • Issue while deleting Inbound delivery.

    Hello All,
    Here there is an issue while deleting Inbound delivery.
    GR ie 101 movement type is done for 1000 stocks.
    Later GR reversal ie 102 movement type is done for 200 stocks.
    So now in MD04 transaction inbound delivery is opened for 200 stocks.
    I am trying to delete Inbound delivery for 200 stocks but it doent allow.
    wht to do?please help

    I think you have used 102 and manully amend the qty.
    The inbound has 1000 qty, you reverse 200 qty. You should amend inbound delivery document qty to 800 and not delete it.
    Appreciate to revert is solution works for you.

  • Posting period issue while deleting a confirmation posted for a limit PO

    Hi ..
    I am facing an issue whiel deleting a confirmation posted for a limit PO.
    Confirmation was posted for a limit PO in SRM and it created a service entry sheet in SAP. If I deleted that confirmation in the same posting period, then it is getting deleted. No issue here.
    But if I deleted that confirmation in the next posting period then the reversal document is going to error in process. RZ20 is showing the error "Positng only possible in periods 2012/2 and 2012/3".
    Posting date of reversal document is current date only and the backend posting period is 2012/3, but still it is failing with this posting period error.
    If I tried to delete a confirmation posted for a normal PO then I could able to delete it even in next posting period by just changing the posting date.
    Why this posting occurs while deleting the limit confirmation, even through the posting date is falls within the backenn posting periiod? Is it like, SAP system is trying to delete the service entry sheet in original posting period? Kindly help.
    I am in SRM 5.0 (server 5.5) SP12.
    Thanks,
    Arun

    OK.
    Well, if the variable is not used in any interval selection, then I would say "something happened to it".
    I would make a copy of the query and run it to check if I get the same problem with period 12.
       -> If not, something is wrong in the original query (you can proceed as below, if changes to original are permitted).
    If so, then try removing the variable completely from the query and hardcode restriction to 12.
       -> If problem still persists, I would have to do some thinking.
    If problem is gone, then add the variable again. Check.
       -> If problem is back, then the variable "is sick". Only quick thing to do, is to build an identical variable and use that one.
    If problem also happens with the new variable, then it's time to share this experience with someone else and consider raising an OSS.
    Good luck!
    Jacob
    P.S: what fisc year variant are you using?
    Edited by: Jacob Jansen on Jan 25, 2010 8:36 PM

  • Error while  deleting a row in entity

    Hi
    I am facing a problem while trying to delete a row from a entity.
    Below is the scenario where i am facinmg a problrm.
    I have a ViewObject which has attributes from two entity and on e transient variable.
    in the RowImpl java class for the above Viewobject i changes the getter method of the transient variable to some text.
    I display all the Viewobject as a table in the UI.
    When a user selects a row and press delete method.
    I get a id(one of the attribute from the Viewobject) from the selected row and remove the row from the Entity.
    When i try to commit the changes i am getting the below error
    Another user has changed the row with primary key oracle.jbo.Key [742]. (Another user has changed the row with primary key {0}.)
    Can any one please help me in this
    Thanks
    Ranjith

    check {message:id=9271952}

  • Issues in Deleting table rows

    Hi all,
              After deleting any rows/row in the WebDynpro table it is showing one blank row showing the presence of row there already. This blank row is appearing when we add new row next time.  I don't want to appear this blank line after deleting the row. I Used
    wdContext.nodename().removeElement();
    removeElement() to delete the row.
              Is there any other possibilities to avoid this.
    Plz let me know.

    Hi,
    Try this code, it may use full for you.
    <b>Removing Element</b>
    ITestNodeElement ele = (ITestNodeElement) wdContext.nodeTestNode().getElementAt(wdContext.nodeTestNode().getLeadSelection());
    wdContext.nodeTestNode().removeElement(ele);
    <b>Adding Element to the node</b>
    ITestNodeElement testNodeELe = null;
    testNodeELe = wdContext.nodeTestNode().createTestNodeElement();
    testNodeELe.setTest1("Second ");
    testNodeELe.setTest2("Third ");
    wdContext.nodeTestNode().addElement(testNodeELe);
    It is working fine for me.
    Note: - TestNode is the node and Test1 and Test2 are the two elements in the node
    Regards,
    Sridhar

  • Issue while deleting user defined field in oim 11.1.1.3

    All,
    Made a mistake while creating user defined field called "Profile for" (loing to OIM -> advanced -> configuration -> User configuration). We are trying to delete it. It appears to get deleted from user attributes screen. But when we run LDAP User Create and Update Reconciliation Task we get the following error below:
    oracle.iam.ldapsync.exception.ProcessLDAPReconDataException: oracle.iam.ldapsync.exception.ReconEventCreationException: Thor.API.Exceptions.tcAPIException: Profile for - LDAPUser object does not exists for resource object
    Is any thing else need to be deleted adn cleaned up?
    thanks in advance,
    Prasad.

    How do i check what resource object the recon task is running against. here is what i found so far.
    I cannot find LDAPUser resource object when i query Resource Management -> Resource Objects in design console. Same thing with Manage Resource and search (here i only find Xellerate User, Xellerate Organiztion, USERS_GTC, and Installation) in OIM advanced administration menu.
    The LDAP User Create and Update Reconciliation job itself has the following parameters (batch size, last change number, OIM employee type, OIM User organization name, OIM user type)
    I also decompiled LDAPUserChangesReconTask and it is looking for LDAPUser metadata from MDS directly.
    Prasad.

  • Strange issue on deleting some rows on SYS.AUD$ table

    I just found out this strange thing happened on my 10gR2 database. I created a user called AUDIT_LOG and GRANT DELETE, REFERENCES, SELECT ON SYS.AUD$ TO AUDIT_LOG when I logged on as SYS dba.
    (1) Then I logged on as AUDIT_LOG user, tested the following statements:
    SELECT count(*) from sys.aud$ where ntimestamp# < TRUNC (SYSDATE-14);
    COUNT(*)
    2
    DELETE from sys.aud$ where ntimestamp# < TRUNC(SYSDATE-14);
    0 rows deleted
    (2) When I logged on as SYS account, SYS deleted them all,
    DELETE from sys.aud$ where ntimestamp# < TRUNC(SYSDATE-14);
    2 rows deleted
    I don't understand why the AUDIT_LOG user can't delete that two rows?
    Thanks for your help!
    lixidon

    Apologies for misreading the first time. I am wondering if the rows in question were related to audit actions on sys.aud$ itself as those rows should not be deleted by the AUDIT_LOG user (even if the user has been granted delete).
    Here's an excerpt from the Security Guide under the "Protecting the Standard Audit Trail" section:
    Audit records generated as a result of object audit options set for the SYS.AUD$ table can only be deleted from the audit trail by someone connected with administrator privileges, which itself has protection against unauthorized use.
    Here's a quick example illustrating this:
    SQL> connect / as sysdba
    Connected.
    SQL> grant delete, references, select on sys.aud$ to scott;
    Grant succeeded.
    SQL> connect scott/tiger
    Connected.
    SQL> select count(*) from sys.aud$ where sessionid = 30002;
      COUNT(*)
             2
    1 row selected.
    SQL> delete from sys.aud$ where sessionid = 30002;
    2 rows deleted.
    SQL> commit;
    -- now try to delete the sys.aud$ rows related to the above delete
    -- this will not succeed as user scott even though delete has been granted
    -- the session that performed the delete is 422426
    SQL> select count(*) from sys.aud$ where obj$name = 'AUD$' and action# = 7 and sessionid = 422426;
      COUNT(*)
             2
    1 row selected.
    SQL> delete from sys.aud$ where obj$name = 'AUD$' and action# = 7 and sessionid = 422426;
    0 rows deleted.
    SQL>Regards,
    Mark

  • While Deleting any Web App i dont see Loading or In Process of Deleting

    Hi,
    I am facing a very strange issue, while deleting a Web App I don't see any progress bar or any loading that show that deleting is in process.
    Has anyone faced this same or do I need to some settings which it shows me a progress bar.
    In the below  image I already have clicked on the Delete button but no update shown in title bar or anywhere.
    Thanks in advance.
    Regards,
    Purvish Shah

    Thanks for the reply Sairam.
    But I believe they should have disabled the Delete button after anyone clicks on it because there is no reaction while clicking on it & if any new admin will click they will not get any idea if any job is triggered in the background &
    they will hit twice or thrice till the job is completed or until they will receive any error saying that no such sites exist :)
    Lets hope this post reaches to Microsoft team for any update they should plan or to the new Administrators as a knowledge. :)
    Regards,
    Purvish Shah

  • Error Message AM057 while deleting contact person

    Hi,
    Recently, our company consolidated the SAP platforms for two regions and it is single instance now. The data is migrated to the new system by SLO. After this we are facing an issue while deleting the contact person in customer master. When we select the contact person and delete, we get a message saying "Specify a valid person use (PERSON_REFERENCE)". When we press enter, another entry (above the intended entry) gets deleted.
    The performance assistant shows nothing but message no. AM057.
    Based on the couple of OSS notes I have searched, I checked the table ADRVP entries and found two entries for that contact person. Both entries have the client number appearing in the field APPL_KEY.
    The first record is having old client number and the second record is having the new client number. I presume, we are seeing two records because the data was migrated by SLO. But what is confusing is, both are having same addr.no. and marked as X for Owner (Flag: Adress owner object reference).
    Data in table ADRVP looks as under.
    Cl.     Person            Seq. No.      Table      Field           Application table key      pers.addr. Key      Addr. no.            Owner
    300   0200591046          1            KNVK     PRSNR      2000000093060             BP                         0200026699       X
    300   0200591046   45333695     KNVK     PRSNR      3000007093060             BP                         0200026699       X
    Can there be more than one entry with same addr. no. in table ADRVP for the same person number? Can someone share what is wrong with deleting the contact person in customer master?
    Thanks,
    Balaji

    Dear Balaji
    You have asked same question In Different places
    Re: Error Message AM057 while deleting contact person in customer master

  • Error Message AM057 while deleting contact person in customer master

    Hi,
    Recently, our company consolidated the SAP platforms for two regions and it is single instance now. The data is migrated to the new system by SLO. After this we are facing an issue while deleting the contact person in customer master. When we select the contact person and delete, we get a message saying "Specify a valid person use (PERSON_REFERENCE)". When we press enter, another entry (above the intended entry) gets deleted.
    The performance assistant shows nothing but message no. AM057.
    Based on the couple of OSS notes I have searched, I checked the table ADRVP entries and found two entries for that contact person. Both entries have the client number appearing in the field APPL_KEY.
    The first record is having old client number and the second record is having the new client number. I presume, we are seeing two records because the data was migrated by SLO. But what is confusing is, both are having same addr.no. and marked as X for Owner (Flag: Adress owner object reference).
    Data in table ADRVP looks as under.
    Cl.     Person            Seq. No.      Table      Field           Application table key      pers.addr. Key      Addr. no.            Owner
    300   0200591046          1            KNVK     PRSNR      2000000093060             BP                         0200026699       X
    300   0200591046   45333695     KNVK     PRSNR      3000007093060             BP                         0200026699       X
    Can there be more than one entry with same addr. no. in table ADRVP for the same person number? Can someone share what is wrong with deleting the contact person in customer master?
    Thanks,
    Balaji

    Balaji Srinivasan wrote:
    Based on the couple of OSS notes I have searched,
    You should share the OSS note which you got from market place.
    Have you checked this note Note 445825 - Error message AM057 when deleting a contact person ?
    It has the reason and solution.

  • Problem of deletion of rows in jtable, table refreshing too

    Hi,
    I have a table with empty rows in the beginning with some custom properties( columns have fixed width...), later user would be adding to the rows to this table and can delete, I've a problem while deleting the rows from table,
    When a selected row is deleted the model is also deleting the data but the table(view) is not refreshed.
    Actually i'm selecting a cell of a row, then hitting the delete button.
    So the model is deleting the information, but i'm not able to c the fresh data in table( especially when the last cell of last row is selectd and hit the delete button, i am getting lots of exception)
    Kindly copy the below code and execute it, and let me know,
    * AuditPanel.java
    * Created on August 30, 2002, 3:05 AM
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.util.Vector;
    * @author yaman
    public class AuditPanel extends javax.swing.JPanel {
    // These are the combobox values
    private String[] acceptenceOptions;
    private Vector colNames;
    private Color rowSelectionBackground = Color.yellow;
    private int rowHeight = 20;
    private int column0Width =70;
    private int column1Width =96;
    private int column2Width =327;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    /** Creates new form AuditPanel */
    public AuditPanel() {
    public void renderPanel(){
    initComponents();
    public String[] getAcceptenceOptions(){
    return acceptenceOptions;
    public void setAcceptenceOptions(String[] acceptenceOptions){
    this.acceptenceOptions = acceptenceOptions;
    public Vector getColumnNames(){
    return colNames;
    public void setColumnNames(Vector colNames){
    this.colNames = colNames;
    public Vector getData(){
    Vector dataVector = new Vector();
    /*dataVector.add(null);
    dataVector.add(null);
    dataVector.add(null);
    return dataVector;
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jTable1 = new javax.swing.JTable();
    setLayout(new java.awt.GridBagLayout());
    setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jPanel2.setLayout(new java.awt.GridBagLayout());
    jPanel2.setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
    jButton1.setText("Add");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.ipadx = 8;
    gridBagConstraints.insets = new java.awt.Insets(0, 1, 5, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton1, gridBagConstraints);
    jButton2.setText("Delete");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    jPanel2.add(jButton2, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    add(jPanel2, gridBagConstraints);
    jPanel1.setLayout(new java.awt.GridBagLayout());
    jPanel1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.black, Color.gray) );
    jTable1.setModel(new javax.swing.table.DefaultTableModel(getData(), getColumnNames()));
    // get all the columns and set the column required properties
    java.util.Enumeration enum = jTable1.getColumnModel().getColumns();
    while (enum.hasMoreElements()) {
    TableColumn column = (TableColumn)enum.nextElement();
    if( column.getModelIndex() == 0 ) {
    column.setPreferredWidth(column0Width);
    column.setCellEditor( new ValidateCellDataEditor(true) );
    if( column.getModelIndex() == 1) {
    column.setPreferredWidth(column1Width);
    column.setCellEditor(new AcceptenceComboBoxEditor(getAcceptenceOptions()));
    // If the cell should appear like a combobox in its
    // non-editing state, also set the combobox renderer
    //column.setCellRenderer(new AcceptenceComboBoxRenderer(getAcceptenceOptions()));
    if( column.getModelIndex() == 2 ) {
    column.setPreferredWidth(column2Width); // width of column
    column.setCellEditor( new ValidateCellDataEditor(false) );
    jScrollPane1 = new javax.swing.JScrollPane(jTable1);
    jScrollPane1.setPreferredSize(new java.awt.Dimension(480, 280));
    jTable1.setMinimumSize(new java.awt.Dimension(60, 70));
    //jTable1.setPreferredSize(new java.awt.Dimension(300, 70));
    //jScrollPane1.setViewportView(jTable1);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
    jPanel1.add(jScrollPane1, gridBagConstraints);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    add(jPanel1, gridBagConstraints);
    // set the row height
    jTable1.setRowHeight(rowHeight);
    // set selection color
    jTable1.setSelectionBackground(rowSelectionBackground);
    // set the single selection
    jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    // avoid table header to resize/ rearrange
    jTable1.getTableHeader().setReorderingAllowed(false);
    jTable1.getTableHeader().setResizingAllowed(false);
    // Table header font
    jTable1.getTableHeader().setFont( new Font( jTable1.getFont().getName(),Font.BOLD,jTable1.getFont().getSize() ) );
    jButton1.setMnemonic(KeyEvent.VK_A);
    // action of add button
    jButton1.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){
    //System.out.println("table is edition ");
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // find out total available rows
    int totalRows = jTable1.getRowCount();
    int cols = jTable1.getModel().getColumnCount();
    if( jTable1.getModel() instanceof DefaultTableModel ) {
    ((DefaultTableModel)jTable1.getModel()).addRow(new Object[cols]);
    int newRowCount = jTable1.getRowCount();
    // select the first row
    jTable1.getSelectionModel().setSelectionInterval(newRowCount-1,newRowCount-1);
    jButton2.setMnemonic(KeyEvent.VK_D);
    // action of Delete button
    jButton2.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent actionEvent){
    int totalRows = jTable1.getRowCount();
    // If there are more than one row in table then delete it
    if( totalRows > 0){
    int selectedOption = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete this audit row?","Coeus", JOptionPane.YES_NO_OPTION);
    // if Yes then selectedOption is 0
    // if No then selectedOption is 1
    if(0 == selectedOption ){
    // get the selected row
    int selectedRow = jTable1.getSelectedRow();
    System.out.println("Selected Row "+selectedRow);
    if( selectedRow != -1 ){
    DefaultTableModel dm= (DefaultTableModel)jTable1.getModel();
    java.util.Vector v1=dm.getDataVector();
    System.out.println("BEFOE "+v1);
    v1.remove(selectedRow);
    jTable1.removeRowSelectionInterval(selectedRow,selectedRow);
    System.out.println("After "+v1);
    }else{
    // show the error message
    JOptionPane.showMessageDialog(null, "Please Select an audit Row", "Coeus", JOptionPane.ERROR_MESSAGE);
    } // end of initcomponents
    class AcceptenceComboBoxRenderer extends JComboBox implements TableCellRenderer {
    public AcceptenceComboBoxRenderer(String[] items) {
    super(items);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus, int row, int column) {
    if (isSelected) {
    setForeground(table.getSelectionForeground());
    super.setBackground(rowSelectionBackground);
    } else {
    setForeground(table.getForeground());
    setBackground(table.getBackground());
    // Select the current value
    setSelectedItem(value);
    return this;
    class AcceptenceComboBoxEditor extends DefaultCellEditor {
    public AcceptenceComboBoxEditor(String[] items) {
    super(new JComboBox(items));
    } // end editor class
    public class ValidateCellDataEditor extends AbstractCellEditor implements TableCellEditor {
    // This is the component that will handle the editing of the
    // cell value
    JComponent component = new JTextField();
    boolean validate;
    public ValidateCellDataEditor(boolean validate){
    this.validate = validate;
    // This method is called when a cell value is edited by the user.
    public Component getTableCellEditorComponent(JTable table, Object value,
    boolean isSelected, int rowIndex, int vColIndex) {
    if (isSelected) {
    component.setBackground(rowSelectionBackground);
    // Configure the component with the specified value
    JTextField tfield =(JTextField)component;
    // if any vaidations to be done for this cell
    if(validate){
    //tfield.setDocument(new JTextFieldFilter(JTextFieldFilter.NUMERIC,4));
    tfield.setText( ((String)value));
    // Return the configured component
    return component;
    // This method is called when editing is completed.
    // It must return the new value to be stored in the cell.
    public Object getCellEditorValue() {
    return ((JTextField)component).getText();
    // This method is called just before the cell value
    // is saved. If the value is not valid, false should be returned.
    public boolean stopCellEditing() {
    String s = (String)getCellEditorValue();
    return super.stopCellEditing();
    public void itemStateChanged(ItemEvent e) {
    super.fireEditingStopped();
    }//end of ValidateCellDataEditor class
    public static void main(String args[]){
    JFrame frame = new JFrame();
    AuditPanel auditPanel = new AuditPanel();
    frame.getContentPane().add(auditPanel);
    auditPanel.setAcceptenceOptions(new String[]{"Accepted", "Rejected", "Requested"} );
    java.util.Vector colVector = new java.util.Vector();
    colVector.add("Fiscal Year");
    colVector.add("Audit Accepted");
    colVector.add("Comment" );
    auditPanel.setColumnNames( colVector);
    auditPanel.renderPanel();
    frame.pack();
    frame.show();

    Hi,
    I've got the solution for it. As when the cursor is in cell of
    a row and hit the delete button, the data in that cell is not saved,
    So i'm trying to save the data first into the model then firing the action event by doing this ..
    jButton2.addActionListener( new ActionListener(){       
    public void actionPerformed(ActionEvent actionEvent){           
    // If a button press is the trigger to leave a JTable cell and save the data in model
    if(jTable1.isEditing() ){                   
    String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
    jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
    jTable1.getCellEditor().cancelCellEditing();
    // HERE DO THE DELETE ROW OPERATION
    <yaman/>

  • Re:Adding a row in a matrix using Lost_Focus event & deleting a row

    Dear All,
    Iam facing a problem in adding a row in a matrix using last focus event.its like if i keep the cusor in the last coloumn in a matrix n if i press tab it should add a row .the row is getting added the problem here is the cursor is gng to first row but it should come to the second row.
    the second problem is while deleting a row the row is getting deleted but the row count is showing the deleted row no.
    pls suggest a solution for these problems.
    Thanks & Regards
    Anand

    Hi,
    If pVal.BeforeAction = False Then
                Select Case pVal.EventType
                    Case SAPbouiCOM.BoEventTypes.et_KEY_DOWN
                        If pVal.ItemUID = "matlab" And pVal.ColUID = "mtimeout" And pVal.CharPressed = 9 Then
                            oMatrix = oForm.Items.Item("matlab").Specific
                            Dim rc As Integer = oMatrix.VisualRowCount
                            If rc = pVal.Row Then
                                addrow()    'funtion for adding row
                                oMatrix.Columns.Item("labc").Cells.Item(oMatrix.RowCount).Click()
                                'SBO_Application.MessageBox(oMatrix.RowCount)
                            End If
                        End If
    This is the function i hav used
    Private Sub addrow()
            Try
                If (oForm.UniqueID = "updt") Then
                    oForm = SBO_Application.Forms.ActiveForm
                    oForm = SBO_Application.Forms.Item("updt")
                    omatrix = oForm.Items.Item("matlab").Specific
                    omatrix.AddRow(1, omatrix.VisualRowCount)
                    Dim rc As Integer = omatrix.VisualRowCount
                    'SBO_Application.MessageBox(rc)
                    otext1 = omatrix.Columns.Item("mdatein").Cells.Item(rc).Specific
                    otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                    otext1 = omatrix.Columns.Item("mdateout").Cells.Item(rc).Specific
                    otext1.String = "s" 'RecSet.Fields.Item("date1").Value
                    End If
            Catch ex As Exception
                SBO_Application.MessageBox(ex.Message)
            End Try
        End Sub
    this is the code which m using
    Regards,
    Anand

  • Issue while playing the content of Azure Media Services after deleting the channel.

    Hi,
    We are having the issue while playing the content of Azure Media Services after deleting the channel.
    Please find detail scenarios below:
    We have done live streaming of an event using Azure Media Services, event was around 5-6 hrs. After completion of event channel was deleted, when we checked content data
    it was only 1hr. Content has only last 1 hr. recording, we are unable to get full recoding.
    We divided event into two parts to avoid above issue. After completion of 1st part which was of 2 hrs., we stopped the streaming and deleted the channel. New channel was
    created and streaming was started for 2<sup>nd</sup> part, after completion of event channel was deleted. Now we are unable to play the content data for 1st part but able to play the 2nd part of event through content publish URL.
    We have done streaming of 3 hrs. event on 18th April with same process and full recoding was available. 
    Can you let me know what might be the issue?

    Hi,
    Please refer to Justin’s blog and see if it helps:
    http://www.justinkobel.com/post/2012/04/30/SharePoint-2010-Claims%E2%80%93Operation-is-not-valid-due-to-the-current-state-of-the-object.aspx
    As suggested by Alex, please provide more information about your process of changing password.
    Here is an article for updating passwords on SharePoint 2010:
    http://blogs.technet.com/b/seanearp/archive/2011/01/25/updating-passwords-on-sharepoint-2010.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • Equivalent datatype in Oracle for datetime of SQL Server

    Hello Everyone, I'm very much new to Oracle. I have been working with SQL Server since 3yrs. Currently I'm working with Oracle 11g. What is the equivalent datatype in oracle for datetime in sql server with which has the format YYYY-MM-DD HH:MM:SS? I

  • Upload Module Pool program

    Hi Experts,                     I have developed a Module Pool Program in IDES. Unfortunately the ides system is crashed. But I took the back up of the program. But I dont have any idea of how to upload the program into ides again. Please let me know

  • Network chat program

    I'm trying to make a chatting program for my home network, but I can't find one good tutorial on using java and networking. They all just show me how to make a server and client programs on my own machine. Big bunch a help that'll give me. Can someon

  • Why won't my prject fit on one DVD

    I am trying to put a wedding reception that is 3.38 GB onto a DVD using DVD Studio Pro 2. But when I put it in a menu and try to print it says that the disc can't hold 5 GB of info. Why is it so much? The disc claims to hold up to 6 hrs in ep mode. W

  • I bought an album but i cant listen to it

    I bought an album an hour ago and i cannot listen to it. I found the files on my computer and tried to convert it to itunes and also adding it to itunes but nothing. Then i noticed the files i downloaded had a lock icon on them. Why is this and why c