Change marked row values

Hi experts,
In APO DP planning book I want to build a macro that changes the values (example : put to 1) of the marked row.
Do you know how to do this ?
Thanks in advance.

Hi,
You will have to check for each row in your planning book. For whichever row a 1 is returned, it means that row is marked. Based on this test result, you can go ahead and change the values. I am assuming that you know what to change already.
So if the test returns 1. In the next line you can say Row Name = <value>. If it returns 0, it means the row is not selected and keep moving.
Hope this helps.
Thanks & Regards
Mani Suresh.

Similar Messages

  • LOV on Form changes DB row values

    I add a lov to a form and experience that the lov does not retain the value coming from the DB row but overrides it with what ever the lov presents first. A very strange default behavior, but what does a newbie know. Can anyone sugesst how to correct this behavior. Many thanks!

    Nicholas,
    How did you "add an lov to a form", exactly? Did you create a new item on the page like maybe a select list with the Source Type set to Database Column and the Source Used attribute set to "Always..."? If so, your LOV query may not be returning values that match those in the table.
    Scott

  • How to change the column value upto 68000 rows

    Hi,
    I want to change the column value.
    I have table called RefDoc
    Select distinct r.int_ref from refdoc r where r.int_ref like '\\dxb%'
    Int_Re__f
    \\dxb\Sample\BFE B777\2008\PO2025225.tif
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\dxb\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\dxb\Sample\BFE B777\2008\PO2025253.tif
    \\dxb\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    up to 68000 rows
    I want to change to \\AUH instead of \\dxb.
    I want the table like
    Int_Re__f
    \\AUH\Sample\BFE B777\2008\PO2025225.tif
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2022098.pdf
    \\AUH\Sample\RO\SFR\26-01-2009j\RO2040831.pdf
    \\AUH\Sample\BFE B777\2008\PO2025253.tif
    \\AUH\Sample\RO\UM INV\26-01-2009\RO2018358.pdf
    Thanks
    Nihar

    user REPLACE function and change it
    UPDATE refdoc
       SET int_ref = REPLACE(int_ref, '\\dxb\', '\\AUH\')
    WHERE int_ref like '\\dxb\%'

  • Right way to change datagrid row, column, cells background colors in code-behind?

    Hi all,
    I have a winform program that I'm upgrading to wpf (I'm new to wpf). The wpf code for the function (SetdataGridBackgroundColors()) is below with the winform code commented out so I can fix it.  I have a datagrid with a Cornsilk background color alteranating
    with LightGreen depending on the content of datetime  cell. If the day portion of the datetime is different then the color changes from one to the other. I used a colorIndex variable because at the end of the month it could go from 31 to 1 and that would
    not work if I use the day directly.
    I tried this line to change the background color:
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk);
    this works but it changes every row. I found this other stuff:
    DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    Either ContainerFromIndex or ContainerFromItem throw an exception because currentRowColor is null. I looked at optionsDataDatagrid.Items[i] and is not null. Then I read that using ItemContainerGenerator is not a good idea.
    BTW I'm calling SetdataGridBackgroundColors() after datagrid is been filled with data.
    So... what is the proper way to set each row, column or cell background color in wpf?
    Thanks
    private void SetdataGridBackgroundColors()
    optionRowData rowData = new optionRowData();
    if (optionsDataDatagrid.Items.Count == 0)
    return;
    int colorIndex = 1;
    DateTime savedDate, currentRowDate;
    rowData = optionsDataDatagrid.Items[0] as optionRowData;
    savedDate = rowData.col_datetime.Date; //only compare the date not the time
    for (int i = 0; i < optionsDataDatagrid.Items.Count; i++)
    //currentRowDate = Convert.ToDateTime(optionsDataDatagrid.Rows[i].Cells[3].Value); //winform code
    //currentRowDate = currentRowDate.Date; //winform code
    rowData = optionsDataDatagrid.Items[i] as optionRowData;
    currentRowDate = rowData.col_datetime.Date;
    if (currentRowDate != savedDate)
    colorIndex++;
    savedDate = currentRowDate;
    if (colorIndex % 2 == 0)
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.Cornsilk;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk); //this changes all rows
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    //currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.DarkSalmon;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.Aquamarine;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);
    else
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.LightGreen); //this has no effect
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.Coral;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.LimeGreen;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);

    I (also) strongly recommend mvvm.
    Setting values is a particularly bad idea in this case.
    I don't mean to be rude but your explanation of the requirement is kind of vague.
    I would bind solidcolourbrushes.
    Set the properties based on whatever your logic is within the viewmodel.
    You can switch out what each of the brushes holds when the user clicks wherever.
    So you use a highlightbrush when something or other is true.
    That highlightbrush is set to a blue brush when the user clicks left and a red brush when they click right.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • JBO-25014: Another user has changed the row with primary key...

    Hello,
    could you help me please with resolving this error "JBO-25014: Another user has changed the row with primary key..." - I am just getting a row from a view by bind "filter" variable, then I am assigning new values for some of the attributes - and trying to commit ..unsuccessfully..
    View is based on Entity.
    I saw directive for setting Entity's attributes as "update after insert / update" - but this did not help me.
    Thanks in advance.

    Hi
    Please try this solutions:
    One solution is to change the ADF BC locking behavior to optimistic instead of pessimistic. Choose the AM and click the Configuration context menu option. Select the LocalAM entry and go to the Properties. Scroll down to the locking setting and change the existing entry
    If there is a trigger changing values, you need to mark those attributes (the ones that may be changed) as refresh after insert and/or refresh after update in your Entity Object.

  • Error on commit: Another user has changed the row with primary key : Rec_10

    i am using jdev 11g R2
    i implemented a master form and two detail tables on a jspx page
    added createInsert, commit and rollback buttons
    actions from these buttons all are executed from a bean
    for entity attributes: refresh after insert and update are marked as checked
    i am using login page for authorizing the user by getting the user information from user table
    and then using the userid i am applying the setVisible property on some components at bean code
    when i am inserting a new row there is no problem, here i am generating the new id like 'Rec_10', using a database sequence
    but when i am trying to update a current record, it is showing the error --> Error on commit: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[Rec_22 ]
    on clicking the commit button and also it is not updating the record on database
    Thanx in Advance
    kumar
    Edited by: user10922309 on Nov 18, 2009 3:25 AM
    Edited by: user10922309 on Nov 18, 2009 4:28 AM

    Hi John
    thnq for your quick responce.
    here are the attribute details:
    Attribute Name: RecID, Type: String, Value Type: Expression, Value: 'Rec_' + (new oracle.jbo.server.SequenceImpl("Rec_SEQ_AN", object.getDBTransaction())).getSequenceNumber()
    Updatable: While New and Primary Key, Queryable, Persistent, Mandatory, Refresh After: Update, Refresh After: Update and Insert are markded as checked
    error details:
    oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[APP_22 ].
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1062)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:548)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7762)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5554)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6057)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6229)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3127)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2935)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1991)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2233)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1580)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1404)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:201)
    --> at Index.saveApplicationAll(Index.java:6246)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    --> on click commit button Index.saveApplicationAll method will invoked.
    Thats it.
    Kumar
    Edited by: user10922309 on Nov 18, 2009 4:32 AM

  • How to access each row value for a database item

    On my form I have a database datablock that represents a table in my database.
    5 rows are shown with a scroll bar that can be viewed to show the rest.
    The user is able to change some of the Database Item values represented in this datablock for any row shown in the datablock.
    I need to validate the correctness of the users change before allowing the database datablock to update the table in the database.
    But a database item in a datablock will represent a value for every row in the table. So how do I access each row value for a database item separately. What is the PL/SQL syntax?
    thanks,
    michelle

    In my situation it was better to use the loop instead
    of a when validate trigger because...Well it was clearly not better to use a loop that doesn't work. I don't understand what you're not clear on about the item and record validation triggers. If you have a specific validation rule for a single field (such as a date that cannot be in the future), that would go in a When-Validate-Item trigger on the date item. If the user enters a future date, your code would display an error message and raise a failure. Raising a failure prevents the item from being marked as valid. Invalid items prevent the record from being inserted/updated. Sometimes you have a validation rule that requires looking at more than one item at a time, such as two items that must either both be NULL or NOT NULL. In that case, you could not use a When-Validate-Item trigger because you can't clear or populate both at once. So then you would use a When-Validate-Record at the block level and if one field is NULL and the other isn't, you would display an error message and raise a failure. Forms is very civil in this respect; we don't throw exceptions around here, but then I digress.

  • Changing background color in JTable, only changes one row at a time...

    I'm trying to change the color of rows when the 5th column meets certain criteria. I think I'm very close, but I've hit a wall.
    What's happening is the row will change color as intended when the text in the 5th column is "KEY WORD", but when I type "KEY WORD" in a different column it will set the first row back to the regular colors. I can easily see why it's doing this, everytime something is changed it rerenders every cell, and the listener only checks the cell that was just changed if it met the "KEY WORD" condition, so it sets every cell (including the previous row that still meets the condition) to the normal colors. I can't come up with a good approach to changing the color for ALL rows that meet the condition. Any help would be appreciated.
    In this part of the CellRenderer:
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            //row that meets special conditions
            if(row == specRow && col == specCol)
                color = color.white; I was thinking an approach would be to set them to their current color except for the one that meets special conditions, but the two problems with that are I can't figure out how to getColor() from the table, and I'm not sure how I would initially set the colors.
    Here's the rest of the relevant code:
        public void tableChanged(TableModelEvent e)
            int firstRow = e.getFirstRow();
            int lastRow  = e.getLastRow();
            int colIndex = e.getColumn();
            if(colIndex == 4)
                String value = (String)centerTable.getValueAt(firstRow, colIndex);
                // check for our special selection criteria
                if(value.equals("KEY WORD"))
                    for(int j = 0; j < centerTable.getColumnCount(); j++)
                        CellRenderer renderer =
                            (CellRenderer)centerTable.getCellRenderer(firstRow, j);
                        renderer.setSpecialSelection(firstRow, j);
    import javax.swing.table.*;
    import javax.swing.*;
    import java.awt.Component;
    import java.awt.Color;
    public class CellRenderer extends DefaultTableCellRenderer
        int specRow, specCol;
        public CellRenderer()
            specRow = -1;
            specCol = -1;
        public Component getTableCellRendererComponent(JTable table,
                                                       Object value,
                                                       boolean isSelected,
                                                       boolean hasFocus,
                                                       int row, int col)
            setHorizontalAlignment(JLabel.CENTER);
            Color color = Color.green;
            if (isSelected)
                color = Color.red;
            else
                color = Color.blue;
            if (hasFocus)
                color = Color.yellow;
            if(row == specRow && col == specCol)
                color = color.white;
            //setForeground(color);
            setBackground(color);
            setText((String)value);
            return this;
        public void setSpecialSelection(int row, int col)
            specRow = row;
            specCol = col;
    }If I'm still stuck and more of my code is needed, I'll put together a smaller program that will isolate the problem tomorrow.

    That worked perfectly for what I was trying to do, but I've run into another problem. I'd like to change the row height when the conditions are met. What I discovered is that this creates an infinite loop since the resizing triggers the renderer, which resizes the row again, etc,. What would be the proper way to do this?
    Here's the modified code from the program given in the link. All I did was declare the table for the class, and modify the if so I could add the "table.setRowHeight(row, 30);" line.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.border.*;
    public class TableRowRenderingTip extends JPanel
        JTable table;
        public TableRowRenderingTip()
            Object[] columnNames = {"Type", "Company", "Shares", "Price", "Boolean"};
            Object[][] data =
                {"Buy", "IBM", new Integer(1000), new Double(80.5), Boolean.TRUE},
                {"Sell", "Dell", new Integer(2000), new Double(6.25), Boolean.FALSE},
                {"Short Sell", "Apple", new Integer(3000), new Double(7.35), Boolean.TRUE},
                {"Buy", "MicroSoft", new Integer(4000), new Double(27.50), Boolean.FALSE},
                {"Short Sell", "Cisco", new Integer(5000), new Double(20), Boolean.TRUE}
            DefaultTableModel model = new DefaultTableModel(data, columnNames)
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
            JTabbedPane tabbedPane = new JTabbedPane();
            tabbedPane.addTab("Alternating", createAlternating(model));
            tabbedPane.addTab("Border", createBorder(model));
            tabbedPane.addTab("Data", createData(model));
            add( tabbedPane );
        private JComponent createAlternating(DefaultTableModel model)
            JTable table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Alternate row color
                    if (!isRowSelected(row))
                        c.setBackground(row % 2 == 0 ? getBackground() : Color.LIGHT_GRAY);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        private JComponent createBorder(DefaultTableModel model)
            JTable table = new JTable( model )
                private Border outside = new MatteBorder(1, 0, 1, 0, Color.RED);
                private Border inside = new EmptyBorder(0, 1, 0, 1);
                private Border highlight = new CompoundBorder(outside, inside);
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    JComponent jc = (JComponent)c;
                    // Add a border to the selected row
                    if (isRowSelected(row))
                        jc.setBorder( highlight );
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public JComponent createData(DefaultTableModel model)
            table = new JTable( model )
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    //  Color row based on a cell value
                    if (!isRowSelected(row))
                        c.setBackground(getBackground());
                        String type = (String)getModel().getValueAt(row, 0);
                        if ("Buy".equals(type)) {
                            table.setRowHeight(row, 30);
                            c.setBackground(Color.GREEN);
                        if ("Sell".equals(type)) c.setBackground(Color.YELLOW);
                    return c;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.changeSelection(0, 0, false, false);
            return new JScrollPane( table );
        public static void main(String[] args)
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
        public static void createAndShowGUI()
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("Table Row Rendering");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.add( new TableRowRenderingTip() );
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
    }Edited by: scavok on Apr 26, 2010 6:43 PM

  • JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

    Hi,
    I am developing a Fusion Web Application using Jdeveloper 11.1.2.1.0. I have a home.jspx page that has a ADF table built on efttBilling View Object. . When you click on one of the rows in the table, it will take you to detail.jspx where you can edit the row and save. When 'save' is clicked, stored procedures are executed to update/insert rows into few tables , and then go back to home.jspx where you need to see updated content for that row.
    To get down to the exact issue, updates are made to the tables on which the efttBilling View Object is built using a stored procedure. Once this is done, I am trying to requery view object to see new content. But I keep getting JBO-25014: Another user has changed the row with primary key oracle.jbo.Key error. Following are the approaches I followed to query new results:
    a. Executed Application Modules Commit Method. Created 'Commit' Action binding and tied it to homePageDef.xml. Called this binding from a view scope bean.
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
         OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
       if (!operationBinding.getErrors().isEmpty())
        return null;
    b. Marked 'Refresh on Insert' , 'Refresh on Update', 'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    c. Tried to Requery View Object. Created a refreshViewObject method in Application Module Impl.java file, exposed this method to the client interface and created a invokeMethod Action binding in home.jspx
    Code in Application Module:
      public void refresheftTransactionsforBillingAccountViewObj1View()
        System.out.println("In eftTransactionsforBillingAccountViewObj1");
      findViewObject("eftTransactionsforBillingAccountViewObj1").executeQuery();
    Code in view scope bean
            DCBindingContainer bindings =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operation =
            bindings.getOperationBinding("refresheftTransactionsforBillingAccountViewObj1View");
            operation.execute();
    I have searched web, ADF forums and tried methods suggested in there but no sucess.
    Could anyone please provide some insight in this issue. I have been battling with this since quite some time. I can provide you with the log file too.
    Thanks!
    Shai.

    What code does your Commit method have .. can you try using the Commit executable from the AM itself instead ?
    Also -
    Shai wrote:
    'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    which all attributes you set this property for . it should just be for History columns as such.
    Did you also check if this could be your scenario ?
    Decompiling ADF Binaries: Yet another reason for &quot;JBO-25014: Another user has changed the row with primary key orac…
    OR
    JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
    OR
    Another user has changed the row with primary key -Table changed externally
    Message was edited by: SudiptoDesmukh

  • Planning function to change date field value in layout

    Hello experts,
                          I have 1 BPS layout with 2 date fields ( Start date, End date ). With a filter conditions, set of data comes in BPS layout on execution and 2 date fields also contain some value...I want to change values of these 2 dates...both the date fields are char infoobjects..in BPS layout, in planning function I got only 1 function ( Repost function ) to change the value of char infoobject based on some condition. but date field value is not the status field...i want to enter new date instead of old date..if i right exit function in that also i can change only keyfigs values..so please help me to solve this problem..
    Thanks & Regards,
    Priyanka Joshi

    Hi Priyanka,
    As of now master data planning is not so flexibly supported.
    Still u can refer the below link which is enhancement of standard Repost function,and can be used to change master data.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10d2b273-0e12-2c10-fab3-a34bde559f92]
    As far as my knowledge goes u cannot directly input date in rows.
    regards,
    Rajendra

  • Report layout changes with  the values in it

    I he a standard report, but i want certain report rows to show up in red when a value of the row is null.
    I know you have to use different templates, but how or where do i need to put the condition to change report row templates?
    Thanks

    Use multiple row/column templates (there are up to 4 available in a report template), controlling which is used via the Row/Column Template 1 Condition and Row/Column Template 1 Expression etc, depending on whether it is a named column (row) template or a generic column template.
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#BABFFGGJ

  • How to mark row in OO ALV ?

    Hi ,
    I am using OO editable ALV . Method set_table_for_first_display has been used . In the report, user can select a row /rows and click on button 'EDIT' in the toolbar . Then one pop up screen will be displayed where user can change the fields . The changed fields will be copied to original ALV output .
    In order to reflect changes in the ALV ouput , I am using method refresh_table_display  to refresh the ALV display . After refresh I am using method set_selected_rows to mark row/rows which were selected earlier but, the issue is that row/rows are not getting marked in the ALV output .
    Any suggestions to mark row/rows after using method refresh_table_display  to refresh the ALV display would be of helpful .
    Thanks in advance .

    HI,
    it should be a field in ALV data table  for select , for example CHK ( Character  len 1 ) see bellow :
    TYPES: BEGIN OF wa_out ,
        CHK   TYPE C LENGTH 1 ."MARK ROW
        INCLUDE STRUCTURE ZPP_BARCODE .
       TYPES : cellcolors TYPE lvc_t_scol ,
       SERNR TYPE objk-SERNR ,
       VORNR TYPE afru-VORNR  ,
       ROWNO TYPE i ,
       end of wa_out.
    you should update ALV data table with X or space in field CHK 
    data:
        ET_INDEX_ROWS     TYPE LVC_T_ROW ,
        ET_ROW_NO     TYPE LVC_T_ROID ,
        wa_ROW_NO     LIKE LINE OF ET_ROW_NO.
      data: w_cellcolor TYPE lvc_s_scol. "For cell color
      data:   gt_out  TYPE STANDARD TABLE OF wa_out , "ALV data table
              wa_out1 type wa_out .
    in layout table put CHK to BOX_FNAME  field
        ls_layout-edit  = ''.
        ls_layout-zebra = 'X'.
        ls_layout-CWIDTH_OPT = 'X' .
        ls_layout-BOX_FNAME = 'CHK' .
    after user select ALV rows and before process
    "-----  call GET_SELECTED_ROWS to read selected rows:
      CALL METHOD GI_GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = ET_INDEX_ROWS
          ET_ROW_NO     = ET_ROW_NO.
    "------now modify ALV table :
      LOOP AT ET_ROW_NO INTO wa_ROW_NO  .
                    WA_OUT1-chk = 'X' .
                    MODIFY   GT_out  index wa_ROW_NO-ROW_ID FROM WA_OUT1 TRANSPORTING chk  .
      ENDLOOP.
    now you can read selected rows from ALV
    loop at gt_out into  WA_OUT1 where CHK = 'X' .
    endloop.
    Regards ,
    REZA ROSTAMI / MAPNA / ABAP

  • How to handle marked rows in an ALV table

    Hi Experts,
    there is an ALV table in my Web Dynpro. It has a functionality to handle one marked row via lead selection. This is the coding to get the marked row:
    lr_nd_ma_leist = wd_context->get_child_node( name = wd_this->wdctx_tab_ma_leist ).
    lr_el_ma_leist = lr_nd_ma_leist->get_lead_selection( ).
    idx = lr_el_ma_leist->get_index( ).
    My problem is to handle more than one marked row. I changed the contexts' properties to allow to mark more than one row. But how can I get the number and the index of all the marked rows?
    Thanks in advance,
    Tan

    use the method get_element_selected( ) and get_index( ).
    data sel type WDR_CONTEXT_ELEMENT_SET.
    sel = lo_nd_zdealer->get_selected_elements( INCLUDING_LEAD_SELECTION = abap_true ).
    data el type ref to if_wd_context_element.
    data indx type  i.
    loop at sel into el.
      indx = el->get_index( ).
      endloop.
    thanks
    sarbjeet singh

  • Another user has changed the row with primary key -Table changed externally

    Hello,
    I am facing the error: "Another user has changed the row with primary key oracle.jbo.Key[94 ]." during the delete operation.
    User case scenario:
    1. Added new row in the table.
    2. Once new row is added to the the table, another application will update few columns in the newly added row based on some logic.
    3. On the same session I am trying to delete the newly added row and getting above mentioned error.
    I have added a "Button" in the table to partialRefresh the table to check the new values of the changed columns.
    I have checked the forum and found many similar errors and tried the following but nothing helped.
    1. By setting "Auto Refresh = True" for the view object.
    Issue faced-> It worked fine but after few add and remove my db is getting to inconsistent state after which, I am not able to do any add/delete from my page.
    Error: "Too many objects match the primary key oracle.jbo.Key". I have checked this and I am not getting this error when "Auto Refresh = False" even after multiple add and remove actions.
    2. By Setting "Auto Refresh" the iterator associated with the page.
    Issue -> Did not work at all.
    Looking forward inputs from gurus.
    Thanks
    Abhijeet

    Finally I found one solution to this problem at: [ http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/|http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/]
    Simply overriding the lock() method in the entity object resolved issue. Kudos to the author.
    Code:
    public void lock() {
    try {
    super.lock();
    } catch (RowInconsistentException e) {
    refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES);
    super.lock();
    But, Now my refresh button is not working as depend on the "Auto Refresh = True" to update the table.
    Can anyone tell me how can I refresh the VO of my table from the button.
    Thanks
    Abhijeet.
    P.S: I have already added the partial trigger but it is work not working as the data is cached in the VO. Removing the Cached property for the VO is creating other problems.

  • Compare previous row values for the same id and decide

    Hello ,
    I have this sample data
    create table #student_academic
    pk_id int identity(1,1) primary key ,
    student_id int ,
    [year] int,
    [aggr_marks] float
    insert into #student_academic
    student_id ,
    [year] ,
    [aggr_marks]
    values
    (112,2012,55.4),(113,2012,65.4),(114,2012,82.32),
    (112,2013,75.4),(113,2013,91.22),(114,2013,45.45),
    (112,2014,61.2),(113,2014,95.2),(114,2014,75.6)
    select * from #student_academic
    from the above data i have to generate an extra status column. this status column should be decided by comparing the previous row value. the exact output should be like below.
    student_id year aggr_marks Staus----------------------------------------------------------
    112 2012 55.4 None
    112 2013 75.4 Promoted
    112 2014 61.2 Demoted
    113 2012 95.2 None
    113 2013 75.6 Demoted
    113 2014 91.22 Promoted
    113 2012 45.45 None
    113 2013 65.4 Promoted
    113 2014 82.32 Promoted
    is there any way to write the t-sql with out using cursors ? this table has around 25GB of data. Any idea would be appreciated.
    Thanks in advance.

    Hello,
    The difficulty of your example is
    that there are several rows for
    the same year and the same student.
    I present a solution
    if there is
    one line per year per
    student:
    TRUNCATE TABLE #student_academicinsert into #student_academic
    student_id ,
    [year] ,
    [aggr_marks]
    values
    (112,2012,55.4),(113,2012,65.4),(114,2012,82.32),
    (112,2013,75.4),(113,2013,91.22),(114,2013,45.45),
    (112,2014,61.2),(113,2014,95.2),(114,2014,75.6)
    Go
    WITH CTE AS
    (SELECT pk_id, student_id, year, aggr_marks,
    (SELECT TOP 1 aggr_marks FROM #student_academic AS b
    WHERE a.student_id = b.student_id AND a.year -1 = b.year
    ORDER BY student_id) AS prev_aggr_marks
    FROM #student_academic AS a
    SELECT
    pk_id, student_id, year, aggr_marks,
    CASE
    WHEN prev_aggr_marks IS NULL THEN 'None'
    WHEN aggr_marks < prev_aggr_marks THEN 'Demoted'
    WHEN aggr_marks >= prev_aggr_marks THEN 'Promoted'
    END AS Status
    FROM CTE
    ORDER BY student_id, year
    Regards,
    Charlie
    Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

Maybe you are looking for

  • How many Pc can have installed ADOBE CREATIVE SUITE 4 Web Premium already bought?

    I have a legal copy ( cds and cases ) of Adobe creative suite 4 web premium for windows, but i cannot find if is legally possible to install it on another Pc ( total of 2 pc ). Can i install it on another pc without legal problems? Thanks in advance

  • How do i call web services from SAP ABAP

    Hello, Ian working with .net team. they are using sap .net Connector to connect SAP. But my job is In SAP side when Purchase Requisition is created, I have to call web services from ABAP and i have to pass the Purchase Requisition number to web servi

  • Db_hotbackup segfaults with -D option

    Running db_hotbackup with the -D option, along with a DB_CONFIG that does not contain a set_lg_dir command gives a segmentation fault. The script below tells the tale. This is with BDB 4.8.30. There's a simple workaround, so we're not stuck. $ ./ex_t

  • Asynchronous event in Process chains

    Hi Experts , What is the use of asynchronous scheduling of an event in the process chain (using ABAP program) . I have used synchronous and local selections generally for my process chains earlier , but was wondering where could we exactly use asynch

  • Remote Administra​tion from Turkey?

    Normally I would not be that concerned. This IP originates from Turkey though and to top it off I just changed my password about a week ago. According to this log, someone from Turkey succesfully connected to my router.  Well it does say ICMP which i