TableSorter performance

Hi All,
Please help it is urgent. I am using table sorter provided in Swing tutorial when i sort the table by any column and start feeding the table with updated after that as I need the table to be updated automatically, CPU usages exceeds 80% and may reach 100%. if i canceled sorting CPU usage drops down to 10%. Could you help me?

Below is some code used to sort columns within a JTable. It is implemented in an application that routinely receives 10k to 30k rows, and is fairly quick about the job it does.
    // The following code was found posted freely at http://javaalmanac.com/egs/javax.swing.table/Sorter.html
    public void sortAllRowsBy(DefaultTableModel model, int colIndex, boolean ascending)
        Vector data = model.getDataVector();
        Collections.sort(data, new ColumnSorter(colIndex, ascending));
        model.fireTableStructureChanged();
    public class ColumnSorter implements Comparator
        int colIndex;
        boolean ascending;
        ColumnSorter(int colIndex, boolean ascending)
            this.colIndex = colIndex;
            this.ascending = ascending;
        public int compare(Object a, Object b)
            Vector v1 = (Vector) a;
            Vector v2 = (Vector) b;
            Object o1 = v1.get(colIndex);
            Object o2 = v2.get(colIndex);
            // Treat empty strings like nulls
            if (o1 instanceof String && ((String) o1).length() == 0)
                o1 = null;
            if (o2 instanceof String && ((String) o2).length() == 0)
                o2 = null;
            boolean number = true; // Assume they are numbers
            Double d1 = null;
            Double d2 = null;
            try
            { // Are these strings represent Numbers. (first remove any commas or dollar signs that may be present)
                d1 = Double.valueOf(o1.toString().replaceAll("[,\\$]", ""));
                d2 = Double.valueOf(o2.toString().replaceAll("[,\\$]", ""));
            catch (Exception notANumber)
                number = false; // assumption wrong, they are not numbers
            finally
                if (number)
                    o1 = d1;
                    o2 = d2;
            // Sort nulls so they appear last, regardless
            // of sort order
            if (o1 == null && o2 == null)
                return 0;
            else if (o1 == null)
                return 1;
            else if (o2 == null)
                return -1;
            else if (o1 instanceof Comparable)
                if (ascending)
                    return ((Comparable) o1).compareTo(o2);
                else
                    return ((Comparable) o2).compareTo(o1);
            else
                if (ascending)
                    return o1.toString().compareTo(o2.toString());
                else
                    return o2.toString().compareTo(o1.toString());
    }

Similar Messages

  • TableSorter errors when adding new data

    so here is the deal:
    I am using the TableSorter.java helper class with DefaultTableModel
    from: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    It works great when the data is static and I get it for the first time. however, occationally, when adding new data I get a NullPointerException error.
    in use:
    DefaultTableModel.addRow()
    DefaultTableModel.removeRow() and
    DefaultTableModel.insertRow() methods.
    Error:
    java.lang.ArrayIndexOutOfBoundsException: 5
         at com.shared.model.TableSorter.modelIndex(TableSorter.java:294)
         at com.shared.model.TableSorter.getValueAt(TableSorter.java:340)
         at javax.swing.JTable.getValueAt(Unknown Source)
         at javax.swing.JTable.prepareRenderer(Unknown Source)...
    code problem I:
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        }code problem II:
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        }TableSroter class:
    package com.shared.model;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator()
            public int compare(Object o1, Object o2)
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter()
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel)
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader)
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState()
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel()
            return tableModel;
        public void setTableModel(TableModel tableModel)
            if (this.tableModel != null)
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null)
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader()
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader)
            if (this.tableHeader != null)
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer)
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null)
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer())
        public boolean isSorting()
            return sortingColumns.size() != 0;
        private Directive getDirective(int column)
            for (int i = 0; i < sortingColumns.size(); i++)
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column)
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column)
            return getDirective(column).direction;
        private void sortingStatusChanged()
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null)
                tableHeader.repaint();
        public void setSortingStatus(int column, int status)
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE)
                sortingColumns.remove(directive);
            if (status != NOT_SORTED)
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size)
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE)
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting()
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator)
            if (comparator == null)
                columnComparators.remove(type);
            else
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column)
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null)
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType))
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel()
            if (viewToModel == null)
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++)
                    viewToModel[row] = new Row(row);
                if (isSorting())
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex)
                 return getViewToModel()[viewIndex].modelIndex;     
        private int[] getModelToView()
            if (modelToView == null)
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++)
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount()
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount()
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column)
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column)
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column)
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column)
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column)
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable
            private int modelIndex;
            public Row(int index)
                this.modelIndex = index;
            public int compareTo(Object o)
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();)
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null)
                        comparison = 0;
                    } else if (o1 == null)
                        comparison = -1;
                    } else if (o2 == null)
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0)
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener
            public void tableChanged(TableModelEvent e)
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting())
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW)
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null)
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter
            public void mouseClicked(MouseEvent e)
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1)
                    int status = getSortingStatus(column);
                    if (!e.isControlDown())
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority)
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y)
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth()
                return size;
            public int getIconHeight()
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer)
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column)
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive
            private int column;
            private int direction;
            public Directive(int column, int direction)
                this.column = column;
                this.direction = direction;
    }any input will be appreciated.
    thanks
    Peter

    The code you posted doesn't help us at all. Its just a duplicate of the code from the tutorial. The custom code is what you have written. For example do you update the TableModel from the Event Thread? Do you update the SortModel or the DefaultTableModel? If you actually provide your test code and somebody has already downloaded the sort classes, then maybe they will test your code against the classes. But I doubt if people will download the sort classes and create a test program just to see if they can duplicate your results (at least I know I'm not about to).

  • Implementation of TableSorter class partially successful

    Greetings, esteemed experts.
    I have successfully applied the TableSorter class to my table, and sorting occurs correctly in runtime. The sort is performed in ascending order, which matches the clients' requirement. However, the tooltip text for the sort icon (up/down arrows) remains as 'not sorted', and clicking the icon multiple times does not result in the sort toggling between ascending and descending directions.
    All the articles and posts I have read regarding the TableSorter class seem to indicate that this is not consistent with its design.
    Any wisdom to share?

    Sorting was not being invoked properly because the field that is being sorted is a time field. The string comparison collator class could not sort the values, so the TableSorter.class Comparator method was modified to parse out hour and minute values. Fortunately, for our application, no other columns in the table have the 'sortable' requirement, so we could customize the class file for the project without impacting any other functionality.

  • TableSorter class never ever calls getModelToView()

    I am using TableSorter class to sort tables. There is a piece of optimization code that never gets called: getModelToView(). For that method to be called a check is performed (modelToView != null). But modelToView is assigned inside that method! This causes a single cell update to trigger fireTableDataChanged(). Is that a known bug? Is there a fix?

    I see what you mean.. you're right, it seems like modelToView will always be null.
    I found another bug.. when mouse is clicked on the tableheader area where it doesn't have any column (when table is stretched it can have no column there) , columnModel.getColumnIndexAtX(e.getX()) returns -1, and if the check there is not added, then get a runtime out-of-bounds exception on the following line columnModel.getColumn(viewColumn).getModelIndex() because viewColumn is set to -1. See the code snippet below:
    public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                if(viewColumn == -1) {  // added!
                    return;
                int column = columnModel.getColumn(viewColumn).getModelIndex();

  • TableSorter errors

    I am using the TableSorter.java helper class found in the Java swing tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    I am using it with the "DefaultTableModel" and it works great when the data is static, however I am getting a NullPointerException error whenever I add, insert or remove a row. I am using the DefaultTableModel.addRow() and DefaultTableModel.removeRow() and DefaultTableModel.insertRow() methods.
    Has anyone else run into this or know how to fix it? Any help would be much appreciated.
    Here is the entire output...
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at TableSorter.modelIndex(TableSorter.java:237)
    at TableSorter.getValueAt(TableSorter.java:274)
    at javax.swing.JTable.getValueAt(JTable.java:1852)
    at javax.swing.JTable.prepareRenderer(JTable.java:3902)
    at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1645)
    at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1547)
    at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1470)
    at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
    at javax.swing.JComponent.paintComponent(JComponent.java:740)
    at javax.swing.JComponent.paint(JComponent.java:1003)
    at javax.swing.JComponent.paintChildren(JComponent.java:840)
    at javax.swing.JComponent.paint(JComponent.java:1012)
    at javax.swing.JViewport.paint(JViewport.java:728)
    at javax.swing.JComponent.paintChildren(JComponent.java:840)
    at javax.swing.JComponent.paint(JComponent.java:1012)
    at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4930)
    at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4883)
    at javax.swing.JComponent._paintImmediately(JComponent.java:4826)
    at javax.swing.JComponent.paintImmediately(JComponent.java:4633)
    at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Here is the code. I am not doing anything special with the table on creation. Like I said, the sorter works great when the data is static, but as soon as I add/remove/insert rows is when I get the NullPointerException errors. Thanks for ttaking a look
    Here are the code snippets for creating my table...
    public class Basic_Mama_Listen extends JFrame {
    //global variables
         private static JTable table;
         private static TableSorter sorter;
         private static DefaultTableModel tableModel;
    //other variables...
         public Basic_Mama_Listen() {
    // Contructor... create the frame and other panels/buttons, etc using imbedded class below
            }  //end constructor
         class ContentPanel extends JPanel implements ActionListener {
              ContentPanel() {
                   setBackground(Color.white);
                   setLayout(new BorderLayout());
                   output = new JTextArea(5,30);
                   output.setMaximumSize(new Dimension(10, 5));
                   add(output, BorderLayout.WEST);
                   scrollpane = new JScrollPane(output);
                   add(scrollpane, BorderLayout.WEST);
                   scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                   scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
                   scrollpane.setPreferredSize(new Dimension(250,250));
                   // Create table and add it to the pane
                   tableModel = new DefaultTableModel();
                   tableModel.addColumn("Time");
                   tableModel.addColumn("Field Name");
                   tableModel.addColumn("Value");
                   tableModel.addColumn("Type");
                   tableModel.addColumn("Size");
                sorter = new TableSorter(tableModel);
                table = new JTable(sorter);
                sorter.setTableHeader(table.getTableHeader());
                TMevent = new TableModelEvent(tableModel);
                   scrollpane2 = new JScrollPane(table);
                   add(scrollpane2, BorderLayout.CENTER);
                   scrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                   scrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
                   } //end ContentPanel constructor
              public void actionPerformed(ActionEvent evt) {
      //handle events such as adding/removing/inserting rows
      } // end ContentPanel class
    } //end BasicMamaListen classTableSorter.java is unchanged from the tutorial example, but here is that code...
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.*;
    * TableSorter is a decorator for TableModels; adding sorting
    * functionality to a supplied TableModel. TableSorter does
    * not store or copy the data in its TableModel; instead it maintains
    * a map from the row indexes of the view to the row indexes of the
    * model. As requests are made of the sorter (like getValueAt(row, col))
    * they are passed to the underlying model after the row numbers
    * have been translated via the internal mapping array. This way,
    * the TableSorter appears to hold another copy of the table
    * with the rows in a different order.
    * <p/>
    * TableSorter registers itself as a listener to the underlying model,
    * just as the JTable itself would. Events recieved from the model
    * are examined, sometimes manipulated (typically widened), and then
    * passed on to the TableSorter's listeners (typically the JTable).
    * If a change to the model has invalidated the order of TableSorter's
    * rows, a note of this is made and the sorter will resort the
    * rows the next time a value is requested.
    * <p/>
    * When the tableHeader property is set, either by using the
    * setTableHeader() method or the two argument constructor, the
    * table header may be used as a complete UI for TableSorter.
    * The default renderer of the tableHeader is decorated with a renderer
    * that indicates the sorting status of each column. In addition,
    * a mouse listener is installed with the following behavior:
    * <ul>
    * <li>
    * Mouse-click: Clears the sorting status of all other columns
    * and advances the sorting status of that column through three
    * values: {NOT_SORTED, ASCENDING, DESCENDING} (then back to
    * NOT_SORTED again).
    * <li>
    * SHIFT-mouse-click: Clears the sorting status of all other columns
    * and cycles the sorting status of the column through the same
    * three values, in the opposite order: {NOT_SORTED, DESCENDING, ASCENDING}.
    * <li>
    * CONTROL-mouse-click and CONTROL-SHIFT-mouse-click: as above except
    * that the changes to the column do not cancel the statuses of columns
    * that are already sorting - giving a way to initiate a compound
    * sort.
    * </ul>
    * <p/>
    * This is a long overdue rewrite of a class of the same name that
    * first appeared in the swing table demos in 1997.
    * @author Philip Milne
    * @author Brendon McLean
    * @author Dan van Enckevort
    * @author Parwinder Sekhon
    * @version 2.0 02/27/04
    public class TableSorter extends AbstractTableModel {
        protected TableModel tableModel;
        public static final int DESCENDING = -1;
        public static final int NOT_SORTED = 0;
        public static final int ASCENDING = 1;
        private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
        public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return ((Comparable) o1).compareTo(o2);
        public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
            public int compare(Object o1, Object o2) {
                return o1.toString().compareTo(o2.toString());
        private Row[] viewToModel;
        private int[] modelToView;
        private JTableHeader tableHeader;
        private MouseListener mouseListener;
        private TableModelListener tableModelListener;
        private Map columnComparators = new HashMap();
        private List sortingColumns = new ArrayList();
        public TableSorter() {
            this.mouseListener = new MouseHandler();
            this.tableModelListener = new TableModelHandler();
        public TableSorter(TableModel tableModel) {
            this();
            setTableModel(tableModel);
        public TableSorter(TableModel tableModel, JTableHeader tableHeader) {
            this();
            setTableHeader(tableHeader);
            setTableModel(tableModel);
        private void clearSortingState() {
            viewToModel = null;
            modelToView = null;
        public TableModel getTableModel() {
            return tableModel;
        public void setTableModel(TableModel tableModel) {
            if (this.tableModel != null) {
                this.tableModel.removeTableModelListener(tableModelListener);
            this.tableModel = tableModel;
            if (this.tableModel != null) {
                this.tableModel.addTableModelListener(tableModelListener);
            clearSortingState();
            fireTableStructureChanged();
        public JTableHeader getTableHeader() {
            return tableHeader;
        public void setTableHeader(JTableHeader tableHeader) {
            if (this.tableHeader != null) {
                this.tableHeader.removeMouseListener(mouseListener);
                TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
                if (defaultRenderer instanceof SortableHeaderRenderer) {
                    this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
            this.tableHeader = tableHeader;
            if (this.tableHeader != null) {
                this.tableHeader.addMouseListener(mouseListener);
                this.tableHeader.setDefaultRenderer(
                        new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer()));
        public boolean isSorting() {
            return sortingColumns.size() != 0;
        private Directive getDirective(int column) {
            for (int i = 0; i < sortingColumns.size(); i++) {
                Directive directive = (Directive)sortingColumns.get(i);
                if (directive.column == column) {
                    return directive;
            return EMPTY_DIRECTIVE;
        public int getSortingStatus(int column) {
            return getDirective(column).direction;
        private void sortingStatusChanged() {
            clearSortingState();
            fireTableDataChanged();
            if (tableHeader != null) {
                tableHeader.repaint();
        public void setSortingStatus(int column, int status) {
            Directive directive = getDirective(column);
            if (directive != EMPTY_DIRECTIVE) {
                sortingColumns.remove(directive);
            if (status != NOT_SORTED) {
                sortingColumns.add(new Directive(column, status));
            sortingStatusChanged();
        protected Icon getHeaderRendererIcon(int column, int size) {
            Directive directive = getDirective(column);
            if (directive == EMPTY_DIRECTIVE) {
                return null;
            return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
        private void cancelSorting() {
            sortingColumns.clear();
            sortingStatusChanged();
        public void setColumnComparator(Class type, Comparator comparator) {
            if (comparator == null) {
                columnComparators.remove(type);
            } else {
                columnComparators.put(type, comparator);
        protected Comparator getComparator(int column) {
            Class columnType = tableModel.getColumnClass(column);
            Comparator comparator = (Comparator) columnComparators.get(columnType);
            if (comparator != null) {
                return comparator;
            if (Comparable.class.isAssignableFrom(columnType)) {
                return COMPARABLE_COMAPRATOR;
            return LEXICAL_COMPARATOR;
        private Row[] getViewToModel() {
            if (viewToModel == null) {
                int tableModelRowCount = tableModel.getRowCount();
                viewToModel = new Row[tableModelRowCount];
                for (int row = 0; row < tableModelRowCount; row++) {
                    viewToModel[row] = new Row(row);
                if (isSorting()) {
                    Arrays.sort(viewToModel);
            return viewToModel;
        public int modelIndex(int viewIndex) {
            return getViewToModel()[viewIndex].modelIndex;
        private int[] getModelToView() {
            if (modelToView == null) {
                int n = getViewToModel().length;
                modelToView = new int[n];
                for (int i = 0; i < n; i++) {
                    modelToView[modelIndex(i)] = i;
            return modelToView;
        // TableModel interface methods
        public int getRowCount() {
            return (tableModel == null) ? 0 : tableModel.getRowCount();
        public int getColumnCount() {
            return (tableModel == null) ? 0 : tableModel.getColumnCount();
        public String getColumnName(int column) {
            return tableModel.getColumnName(column);
        public Class getColumnClass(int column) {
            return tableModel.getColumnClass(column);
        public boolean isCellEditable(int row, int column) {
            return tableModel.isCellEditable(modelIndex(row), column);
        public Object getValueAt(int row, int column) {
            return tableModel.getValueAt(modelIndex(row), column);
        public void setValueAt(Object aValue, int row, int column) {
            tableModel.setValueAt(aValue, modelIndex(row), column);
        // Helper classes
        private class Row implements Comparable {
            private int modelIndex;
            public Row(int index) {
                this.modelIndex = index;
            public int compareTo(Object o) {
                int row1 = modelIndex;
                int row2 = ((Row) o).modelIndex;
                for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
                    Directive directive = (Directive) it.next();
                    int column = directive.column;
                    Object o1 = tableModel.getValueAt(row1, column);
                    Object o2 = tableModel.getValueAt(row2, column);
                    int comparison = 0;
                    // Define null less than everything, except null.
                    if (o1 == null && o2 == null) {
                        comparison = 0;
                    } else if (o1 == null) {
                        comparison = -1;
                    } else if (o2 == null) {
                        comparison = 1;
                    } else {
                        comparison = getComparator(column).compare(o1, o2);
                    if (comparison != 0) {
                        return directive.direction == DESCENDING ? -comparison : comparison;
                return 0;
        private class TableModelHandler implements TableModelListener {
            public void tableChanged(TableModelEvent e) {
                // If we're not sorting by anything, just pass the event along.            
                if (!isSorting()) {
                    clearSortingState();
                    fireTableChanged(e);
                    return;
                // If the table structure has changed, cancel the sorting; the            
                // sorting columns may have been either moved or deleted from            
                // the model.
                if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
                    cancelSorting();
                    fireTableChanged(e);
                    return;
                // We can map a cell event through to the view without widening            
                // when the following conditions apply:
                // a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
                // b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
                // c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
                // d) a reverse lookup will not trigger a sort (modelToView != null)
                // Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
                // The last check, for (modelToView != null) is to see if modelToView
                // is already allocated. If we don't do this check; sorting can become
                // a performance bottleneck for applications where cells 
                // change rapidly in different parts of the table. If cells
                // change alternately in the sorting column and then outside of            
                // it this class can end up re-sorting on alternate cell updates -
                // which can be a performance problem for large tables. The last
                // clause avoids this problem.
                int column = e.getColumn();
                if (e.getFirstRow() == e.getLastRow()
                        && column != TableModelEvent.ALL_COLUMNS
                        && getSortingStatus(column) == NOT_SORTED
                        && modelToView != null) {
                    int viewIndex = getModelToView()[e.getFirstRow()];
                    fireTableChanged(new TableModelEvent(TableSorter.this,
                                                         viewIndex, viewIndex,
                                                         column, e.getType()));
                    return;
                // Something has happened to the data that may have invalidated the row order.
                clearSortingState();
                fireTableDataChanged();
                return;
        private class MouseHandler extends MouseAdapter {
            public void mouseClicked(MouseEvent e) {
                JTableHeader h = (JTableHeader) e.getSource();
                TableColumnModel columnModel = h.getColumnModel();
                int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                int column = columnModel.getColumn(viewColumn).getModelIndex();
                if (column != -1) {
                    int status = getSortingStatus(column);
                    if (!e.isControlDown()) {
                        cancelSorting();
                    // Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
                    // {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
                    status = status + (e.isShiftDown() ? -1 : 1);
                    status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
                    setSortingStatus(column, status);
        private static class Arrow implements Icon {
            private boolean descending;
            private int size;
            private int priority;
            public Arrow(boolean descending, int size, int priority) {
                this.descending = descending;
                this.size = size;
                this.priority = priority;
            public void paintIcon(Component c, Graphics g, int x, int y) {
                Color color = c == null ? Color.GRAY : c.getBackground();            
                // In a compound sort, make each succesive triangle 20%
                // smaller than the previous one.
                int dx = (int)(size/2*Math.pow(0.8, priority));
                int dy = descending ? dx : -dx;
                // Align icon (roughly) with font baseline.
                y = y + 5*size/6 + (descending ? -dy : 0);
                int shift = descending ? 1 : -1;
                g.translate(x, y);
                // Right diagonal.
                g.setColor(color.darker());
                g.drawLine(dx / 2, dy, 0, 0);
                g.drawLine(dx / 2, dy + shift, 0, shift);
                // Left diagonal.
                g.setColor(color.brighter());
                g.drawLine(dx / 2, dy, dx, 0);
                g.drawLine(dx / 2, dy + shift, dx, shift);
                // Horizontal line.
                if (descending) {
                    g.setColor(color.darker().darker());
                } else {
                    g.setColor(color.brighter().brighter());
                g.drawLine(dx, 0, 0, 0);
                g.setColor(color);
                g.translate(-x, -y);
            public int getIconWidth() {
                return size;
            public int getIconHeight() {
                return size;
        private class SortableHeaderRenderer implements TableCellRenderer {
            private TableCellRenderer tableCellRenderer;
            public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
                this.tableCellRenderer = tableCellRenderer;
            public Component getTableCellRendererComponent(JTable table,
                                                           Object value,
                                                           boolean isSelected,
                                                           boolean hasFocus,
                                                           int row,
                                                           int column) {
                Component c = tableCellRenderer.getTableCellRendererComponent(table,
                        value, isSelected, hasFocus, row, column);
                if (c instanceof JLabel) {
                    JLabel l = (JLabel) c;
                    l.setHorizontalTextPosition(JLabel.LEFT);
                    int modelColumn = table.convertColumnIndexToModel(column);
                    l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
                return c;
        private static class Directive {
            private int column;
            private int direction;
            public Directive(int column, int direction) {
                this.column = column;
                this.direction = direction;
    }

  • TableFilter and TableSorter Java Classes

    Does anybody has link to TableFilter and TableSorter java classes for CE 7.11 Tables?
    Thanks

    Hi Michael Vstling,
    Did you try the java classes library (SDOAPI) that can be downloaded from OTN?
    It may provide you with a better alternative when manipulating geometries in the Java space. There is an adapter in SDOAPI which can convert a JDBC STRUCT object into Java Geometry object defined in SDOAPI, and vice versa.
    There are at least two ways in mixing PL/SQL and Java. The first one, as you mentioned, is to define your custom function in terms of PL/SQL and call it from within your Java program. With SDOAPI, you have the second option, which is to define your own functions in Java using SDOAPI and deploy them as Java stored procedures in db. You can then call them from within your PL/SQL code. In either way performance depends on a lot of things and generally it requires a "try and improve" approach.
    About JPublisher and sdo_ordinate_array it may not be a spatial related problem. Did you try search the Java-related forums first?
    LJ

  • Quote Report - Performance

    I have created a quote report with narratives around the opportunity, opportunity-product, and account information. The report contains a pivot table.
    I'm getting very hit or miss performance results on the report. Sometimes the report runs faster for all opportunities compared to when its prompted with an opty id from a web link.
    Any thoughts? There doesn't seem to be one column that makes a difference.
    Also this is not an analytical report as the quotes need to be generated same day.

    Hi Shaik,
    Please remove all the join select queries and use 'for all entries' varaiant of the select query. Check whether you can create and use indexes in ur queries.
    Thanks and Regards,
    Saurabh Chhatre

  • IS NOT NULL and performance

    I have a performance issue with a query - it would be something like -
    select col1,col2, sum(col3), get_val(col_4)
    from table1
    where
    get_val(col_4) is not null
    group by col1,col2, get_val(col_4)
    I have simplified this but it is something similar. This works great - performance is great. Now I commented out the where clause as I needed to populate null values - and that's it the query does not retrieve the resultset - it keeps running forever. With the where clause it comes back in 60 seconds. There is only one row out of 560 rows that has null value for col_4 which i need to display.
    Any help is appreciated.

    The only difference I notice between the two sqls is HASH(UNIQUE) -
    with IS NOT NULL in where clause -
    SELECT STATEMENT     ALL_ROWS     1598     1     209
    HASH(UNIQUE)          1598     1     209
    HASH(GROUP BY)          1598     1     209
    When is not null is removed from the where clause -
    SELECT STATEMENT     ALL_ROWS     1598     1     206
    HASH(GROUP BY)          1598     1     206          
    I'm guessing that the index is being used in the first scenario and not in the second. Any idea/suggestion as to how to over come this?          
    Thanks

  • Issues with WebForm performance

    Hi,
    We had migrated a new application from UAT to PROD and we encounter webform performance issues with the following actions..
    After login, the first form you open it is
    always slow. After this you can switch from one form to another without a
    delay.
    Then once you change any data – the next time
    you access a form it gets delayed.
    The point to be noted is, it doesnt have any performance issues in the UAT environment and the configuration settings,essbase cache settings are all the same. We did try to move the EPM system to a new server to see if this is a hardware issue but no luck, the performance issues still exist. The consumption of the CPU/memory has been checked and it is proved that the form opening delay has nothing to do with lack of memory.
    The JVM head settings is set up at 4GB which is infact higher than that of the UAT environment(2GB).
    runs on Windows server2008,11.1.2.1.600 EPM serve, has planning,reporting,foundation on one server (32GB ram) and essbase on another server (32GB ram). Any help is appreciated.
    Please find attached the planning logs below and there is nothing mentioned in the hyperionplanning error logs.-----------------------------------------------------------------------------------------------------------------------------------------------------------------
    <Nov 5, 2013 8:05:43 PM CET> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Nov 5, 2013 8:05:43 PM CET> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Nov 5, 2013 8:05:44 PM CET> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Oracle JRockit(R) Version R28.0.2-11-135406-1.6.0_20-20100624-2119-windows-x86_64 from Oracle Corporation>
    <Nov 5, 2013 8:05:46 PM CET> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0  Fri Dec 17 20:47:33 PST 2010 1384255 >
    <Nov 5, 2013 8:05:48 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <Nov 5, 2013 8:05:48 PM CET> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <Nov 5, 2013 8:05:48 PM CET> <Notice> <Log Management> <BEA-170019> <The server log file C:\Oracle\Middleware\user_projects\domains\EPMSystem\servers\Planning0\logs\Planning0.log is opened. All server side log events will be written to this file.>
    <Nov 5, 2013 8:06:22 PM CET> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Nov 5, 2013 8:06:28 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <Nov 5, 2013 8:06:28 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Calling getDomainConfiguration()
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Calling getRuntimeService()
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
      return com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
      return com.bea:Name=EPMSystem,Type=Domain
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Domain location is 'C:\Oracle\Middleware\user_projects\domains\EPMSystem'
    Calling getRuntimeService()
      return com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Calling getConnection()
      return weblogic.management.jmx.mbeanserver.WLSMBeanServer@327b36fb
    Checking C:\Oracle\Middleware\user_projects\domains\EPMSystem\servers\Planning0\registry_update.xml file
    EPM_ORACLE_HOME: C:\Oracle\Middleware\EPMSystem11R1
    Template for PLANNING#11.1.2.0: C:\Oracle\Middleware\EPMSystem11R1\common\templates\applications\epm_planning_11.1.2.1.jar
    Dependencies for C:\Oracle\Middleware\EPMSystem11R1\common\templates\applications\epm_planning_11.1.2.1.jar: []
    BPMUI shared webapp not referenced from PLANNING#11.1.2.0
    Application name: PLANNING#11.1.2.0
    Application source: HyperionPlanning.ear
    Server name: Planning0
    Server port: 8300
    Server SSL port: 8343
    Application context: HyperionPlanning
    Registry product type: PLANNING_PRODUCT
    Registry physical web application type: PLANNING_WEBAPP
    weblogic.Name property is 'Planning0', seems to be WebLogic mode
    registry.isRegistryDatabaseCreated()true
    Registry was initialized sucessfully
    Executing pre custom update for PLANNING#11.1.2.0
    EPM_ORACLE_INSTANCE: C:\Oracle\Middleware\user_projects\epmsystem1
    Physical Web App found
    Web app already linked to some application server: false
    The registry was not modifyed because it already containse all sturctures
    Web app is already linked to the logical web app
    No needs to run custom updater for PLANNING#11.1.2.0
    loggingUpdatePLANNING.block file exist or the system is running in the Fusion mode, skipping logging.xml configuration
    Planning locale: en_US
    <Nov 5, 2013 8:06:39 PM CET> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    <Nov 5, 2013 8:06:39 PM CET> <Notice> <Cluster> <BEA-000197> <Listening for announcements from cluster using unicast cluster messaging>
    <Nov 5, 2013 8:06:39 PM CET> <Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of Planning.>
    <Nov 5, 2013 8:07:09 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <Nov 5, 2013 8:07:09 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <Nov 5, 2013 8:07:09 PM CET> <Notice> <Cluster> <BEA-000162> <Starting "async" replication service with remote cluster address "null">
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoIdentity.jks.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\DemoTrust.jks.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file C:\Oracle\Middleware\jrockit_160_20\jre\lib\security\cacerts.>
    <Nov 5, 2013 8:07:10 PM CET> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
      Version: V3
      Subject: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
      Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
      Key:  Sun RSA public key, 512 bits
      modulus: 9550192877869244258838480703390456015046425375252278279190673063544122510925482179963329236052146047356415957587628011282484772458983977898996276815440753
      public exponent: 65537
      Validity: [From: Thu Mar 21 21:12:27 CET 2002,
                   To: Tue Mar 22 21:12:27 CET 2022]
      Issuer: CN=CACERT, OU=FOR TESTING ONLY, O=MyOrganization, L=MyTown, ST=MyState, C=US
      SerialNumber: [    33f10648 fcde0deb 4199921f d64537f4]
    Certificate Extensions: 1
    [1]: ObjectId: 2.5.29.15 Criticality=true
    KeyUsage [
      Key_CertSign
      Algorithm: [MD5withRSA]
      Signature:
    0000: 9D 26 4C 29 C8 91 C3 A7   06 C3 24 6F AE B4 F8 82  .&L)......$o....
    0010: 80 4D AA CB 7C 79 46 84   81 C4 66 95 F4 1E D8 C4  .M...yF...f.....
    0020: E9 B7 D9 7C E2 23 33 A4   B7 21 E0 AA 54 2B 4A FF  .....#3..!..T+J.
    0030: CB 21 20 88 81 21 DB AC   90 54 D8 7D 79 63 23 3C  .! ..!...T..yc#<
    ] The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=thawte Primary Root CA - G3,OU=(c) 2008 thawte\, Inc. - For authorized use only,OU=Certification Services Division,O=thawte\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=VeriSign Universal Root Certification Authority,OU=(c) 2008 VeriSign\, Inc. - For authorized use only,OU=VeriSign Trust Network,O=VeriSign\, Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[3]" is now listening on 127.0.0.1:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[1]" is now listening on fe80:0:0:0:0:5efe:a53:4816:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[4]" is now listening on 0:0:0:0:0:0:0:1:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.83.72.22:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 127.0.0.1:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[4]" is now listening on 0:0:0:0:0:0:0:1:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on fe80:0:0:0:0:ffff:ffff:fffe:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fe80:0:0:0:0:5efe:a53:4816:8300 for protocols iiop, t3, CLUSTER-BROADCAST, ldap, snmp, http.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure[2]" is now listening on fe80:0:0:0:0:ffff:ffff:fffe:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <Server> <BEA-002613> <Channel "DefaultSecure" is now listening on 10.83.72.22:8343 for protocols iiops, t3s, CLUSTER-BROADCAST-SECURE, ldaps, https.>
    <Nov 5, 2013 8:07:10 PM CET> <Warning> <Server> <BEA-002611> <Hostname "WIPLPRD01.svc.unicc.org", maps to multiple IP addresses: 10.83.72.22, 0:0:0:0:0:0:0:1>
    <Nov 5, 2013 8:07:10 PM CET> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "Planning0" for domain "EPMSystem" running in Production Mode>
    <Nov 5, 2013 8:07:12 PM CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <Nov 5, 2013 8:07:12 PM CET> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    using java.library.path: C:\Oracle\Middleware\EPMSystem11R1/products/Planning/lib64;C:\Oracle\Middleware\EPMSystem11R1/bin;C:\Oracle\Middleware\EPMSystem11R1/common/EssbaseRTC-64/11.1.2.0/bin;C:\Oracle\MIDDLE~1\patch_wls1034\profiles\default\native;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\x64;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\bin;C:\Oracle\MIDDLE~1\modules\ORGAPA~1.1\bin;C:\Oracle\MIDDLE~1\JROCKI~1\jre\bin;C:\Oracle\MIDDLE~1\JROCKI~1\bin;C:\Oracle\MIDDLE~1\WLSERV~1.3\server\native\win\x64\oci920_8
    EPM_ORACLE_HOME (C:\Oracle\Middleware\EPMSystem11R1) is set from JVM property "EPM_ORACLE_HOME".
    using Java property for Hyperion Home C:\Oracle\Middleware\EPMSystem11R1
    EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
    Reaquired task list lease: Tue Nov 05 20:11:49 CET 2013: 1383678709156
    Seeking ESAPI.properties
      Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\ESAPI.properties
    Loaded 'ESAPI.properties' properties file
    Seeking validation.properties
      Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\validation.properties
    Loaded 'validation.properties' properties file
    Seeking antisamy-esapi.xml
      Found in 'org.owasp.esapi.resources' directory: C:\Oracle\Middleware\EPMSystem11R1\products\Planning\config\esapi\antisamy-esapi.xml
    EnterData_Inner Processing Time:424
    2013-11-05 20:14:47,454 INFO Thread-51 calcmgr.launch - Date/Time Started: 2013/11/05:20:14:47.452 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Wrk_Scenario:"Work_Plan_2014"[Variable] Funds:"Regular"[Variable] Units:"0001"
    - Date/Time Started: 2013/11/05:20:14:47.452 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Wrk_Scenario:"Work_Plan_2014"[Variable] Funds:"Regular"[Variable] Units:"0001"
    2013-11-05 20:14:54,066 INFO Thread-51 calcmgr.launch - Date/Time Ended: 2013/11/05:20:14:54.066 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin.
    - Date/Time Ended: 2013/11/05:20:14:54.066 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: WPA_Count By Planning user: wipoadmin.
    EnterData_Inner Processing Time:64
    EnterData_Inner Processing Time:15
    EnterData_Inner Processing Time:359
    EnterData_Inner Processing Time:2
    EnterData_Inner Processing Time:53
    EnterData_Inner Processing Time:4
    EnterData_Inner Processing Time:7
    EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
    EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
    EPM_ORACLE_INSTANCE (C:\Oracle\Middleware\user_projects\epmsystem1) is set from JVM property[EPM_ORACLE_INSTANCE].
    Setting HBR Mode to: 2
    In lookupBRLWA()
    Found HBR product = ESSBASE_PRODUCT
    Found HBR product = ESSBASE_PRODUCT
    Found HBR product = ESSBASE_PRODUCT
    HBR LWA Component = Default
    Default HBR = http://WIPLPRD01.svc.unicc.org:19000/eas
    In getDBDetails()
    Found HBR product = ESSBASE_PRODUCT
    In lookupBRLWA()
    Found HBR product = ESSBASE_PRODUCT
    Found HBR product = ESSBASE_PRODUCT
    =2013-11-05 20:35:08,234 WARN [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.security.HbrSecurityAPI - Error retrieving user by identity
    - Error retrieving user by identity
    Embedded HBR initialized.
    EnterData_Inner Processing Time:6
    EnterData_Inner Processing Time:867
    [Tue Nov 05 20:35:33 CET 2013] Planning successfully notified HBR repository.
    EnterData_Inner Processing Time:7
    2013-11-05 20:40:38,613 INFO Thread-67 calcmgr.launch - Date/Time Started: 2013/11/05:20:40:38.606 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Funds:"Regular"[Variable] Units:"0001"[Variable] Wrk_Scenario:"Work_Plan_2014"
    - Date/Time Started: 2013/11/05:20:40:38.606 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin Values entered for run-time prompts: [Variable] Funds:"Regular"[Variable] Units:"0001"[Variable] Wrk_Scenario:"Work_Plan_2014"
    2013-11-05 20:40:47,241 INFO Thread-67 calcmgr.launch - Date/Time Ended: 2013/11/05:20:40:47.241 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin.
    - Date/Time Ended: 2013/11/05:20:40:47.241 CET Server/Application/Database: localhost/1415_WP/AWP Business Rule Name: NonPersonnel_Calc By Planning user: wipoadmin.
    EnterData_Inner Processing Time:44
    EnterData_Inner Processing Time:2
    EnterData_Inner Processing Time:525
    EnterData_Inner Processing Time:1
    Reaquired task list lease: Tue Nov 05 20:41:49 CET 2013: 1383680509246

    I already replied there but it seems no moderator is willing to approve my reply so it never shows up.
    So I'll try replying in here instead:
    I never thought it could be an emulator issue, I thought I had done something wrong to begin with. So I take having performance issues with tiled layer is not a common problem I suppose?
    I'm using MOTODEV SDK platform, A1200 model (motorola).

  • Apple DVI to Video Adapter performance issues in Lion

    I'm an active Apple DVI to Video Adapter user for a couple of years already and everything worked perfectly well until I've upgraded to Lion.
    Everything on my TV screen is lagging now, even mouse pointer, and there is no change to watch any movie like that.
    Does anyone have the same issue? Maybe someone could give me an advice of what could I do in order to improve graphics performance on TV screen using Apple DVI to Video Adapter? I'm using late 2007 MBP with 8600M GT video adapter.

    I am having the exact same problem.  I have a late 2007 MBP. I use it everyday where I teach.  I use the adapter to project on a large white screen using S-Video.  SInce the Lion update, it is very slow and has even completely crashed my computer a few times.  I realize the MBP is getting a bit dated, but the difference between Snow Leopard & Lion is remarkable.

  • Vendor performance report

    hai
    how to create an vendor performance report which display purchase order issued to a vendor, material supplied delivery times, payment terms, prices during a period of time.
        for this report what are the tables and fields we have to use pls give me sample report..
                  thank you..

    Hi,
    Against the RFQ's vendor submit quotations and the Based on the RFQ's data we have to compare the different Vendors with the respective data like terms and prices
    Fetch the data of all RFQ's from EKKO and EKPO tables
    and take the EKKO-KNUMV field and pass to KONV table and fetch the different prices based on the Condition types  for each RFQ and put it in a tabular format  and compare.
    see the sample code
    *& Report  ZRFQ_COMP
    *& Quotation Comparison Report
    REPORT  ZRFQ_COMP no standard page heading line-size 187 line-count 35.
    *&Tables
    Tables : ekko,
             ekpo,
             konp,
             a016.
    *&Data Decleration
    Data : v_pos type i value 19.
    Data : begin of it_rfq occurs 0,
            ebeln type ekko-ebeln,
            ekorg type ekko-ekorg,
            lifnr type ekko-lifnr,
            matnr type ekpo-matnr,
            WERKS type ekpo-WERKS,
           end of it_rfq.
    Data : begin of it_a016 occurs 0,
            ebeln type ekko-ebeln,
            knumh type knumh,
           end of it_a016.
    Data : begin of it_a363 occurs 0,
            werks type werks,
            lifnr type lifnr,
            matnr type matnr,
            knumh type knumh,
           end of it_a363.
    Data : begin of it_pr_details occurs 0,
            knumh type knumh,
            kschl type kschl,
            kbetr type kwert,
           end of it_pr_details.
    Data : begin of it_final occurs 0,
            ebeln type ebeln,
            lifnr type lifnr,
            name1 type lfa1-name1,
            pb00  type kbetr,
            zpac  type kbetr,
            zb00  type kbetr,
            ZIN1  type kbetr,
            JEC1  type kbetr,
            JHX1  type kbetr,
            JMOP  type kbetr,
            JMX1  type kbetr,
            JMX3  type kbetr,
            JSEP  TYPE KBETR,
            JVRD  type kbetr,
           end of it_final.
    Data : begin of it_vendorname occurs 0,
            lifnr type lifnr,
            name1 type lfa1-name1,
           end of it_vendorname.
    *&Selection Screen
    Selection-screen: begin of block blk1 with frame title text-001.
      parameters     : p_matnr like ekpo-matnr obligatory.
      select-options : s_ebeln for ekko-ebeln,
                       s_ekorg for ekko-ekorg,
                       s_lifnr for ekko-lifnr.
    Selection-screen: end of block blk1.
    *&Start-of-Selection.
    Start-of-selection.
      Select ekko~ebeln
             ekko~ekorg
             ekko~lifnr
             ekpo~matnr
             ekpo~werks
        into table it_rfq
        from ekko
       inner join ekpo
          on ekkoebeln eq ekpoebeln
        where ekko~ebeln in s_ebeln
          and ekko~ekorg in s_ekorg
          and ekko~lifnr in s_lifnr
          and ekpo~matnr eq p_matnr
          and ekko~bstyp eq 'A'.
      if sy-subrc eq 0.
    *--> Condition number from A tables.
      Perform get_connum.
    *--> Getting the Pricing Details from Konp Table.
      Perform get_prices.
    *--> Populate Vendor Name.
      Perform pop_vendor_name.
    *--> Populating the Final Internal table for Report.
      Perform pop_final_tab.
      else.
       message 'Purchase Document does not exist' type 'E'.
      endif.
    *&End-of-Selection.
    End-of-Selection.
    write :/ sy-vline,
           2 'Vendor Number',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 1.
      write at v_pos it_final-lifnr.
      v_pos = v_pos + 35.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Gross Price',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-pb00.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Packing & Forward',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zpac.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Surcharge',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zb00.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Installation',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zin1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Ed cess on BED%',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jec1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'A/P Secess set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jhx1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Basic Excise Duty',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zpac.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'A/P BED set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jmx1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Ecess % set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jmx3.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Sec ED Cess on BED',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jsep.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'VAT%',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jvrd.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    *&Top-of-Page.
    Top-of-Page.
    format color 1.
    Write: 'Material Number :' color 1, p_matnr color 1.
    loop at it_final.
      v_pos = v_pos + 1.
      v_pos = v_pos + 35.
    endloop.
    write at: /(v_pos) sy-uline,/ sy-vline,2 'Vendor Name'.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 1.
      write at v_pos it_final-name1.
      v_pos = v_pos + 35.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    *&      Form  get_connum
          Condition number from A tables
    form get_connum .
        Select EVRTN
               knumh
          from a016
          into table it_a016
           for all entries in it_rfq
         where EVRTN eq it_rfq-ebeln.
        Select werks
               lifnr
               matnr
               knumh
          from a363
          into table it_a363
           for all entries in it_rfq
         where werks eq it_rfq-werks
           and lifnr eq it_rfq-lifnr
           and matnr eq it_rfq-matnr.
    endform.                    " get_connum
    *&      Form  get_prices
          Getting the Pricing Details from Konp Table.
    form get_prices .
      if not it_a016[] is initial.
        select knumh
               kschl
               kbetr
          from konp
          into table it_pr_details
           for all entries in it_a016
         where knumh eq it_a016-knumh.
      endif.
      if not it_a363[] is initial.
        select knumh
               kschl
               kbetr
          from konp
    appending table it_pr_details
           for all entries in it_a016
         where knumh eq it_a016-knumh.
      endif.
    endform.                    " get_prices
    *&      Form  pop_final_tab
          Populating the Final Internal table for Report
    form pop_final_tab .
    data : l_subrc like sy-subrc.
      sort it_a016 by ebeln.
      loop at it_rfq.
        clear l_subrc.
        read table it_a016 with key ebeln = it_rfq-ebeln
        binary search.
        if sy-subrc eq 0.
          loop at it_pr_details where knumh eq it_a016-knumh.
            it_final-ebeln = it_rfq-ebeln.
            it_final-lifnr = it_rfq-lifnr.
            read table it_vendorname with
            key lifnr = it_rfq-lifnr.
            it_final-name1 = it_vendorname-name1.
            case it_pr_details-kschl.
            when 'PBOO'.
              it_final-pb00 = it_pr_details-kbetr.
              if it_pr_details-kbetr eq 0.
               clear it_final.
               continue.
              endif.
            when 'ZPAC'.
              it_final-zpac = it_pr_details-kbetr.
            when 'ZB00'.
              it_final-ZB00 = it_pr_details-kbetr.
            when 'ZIN1'.
              it_final-ZIN1 = it_pr_details-kbetr.
            endcase.
          endloop.
        else.
          l_subrc = sy-subrc.
        endif.
        read table it_a363 with key lifnr = it_rfq-lifnr
                                    werks = it_rfq-werks
                                    matnr = it_rfq-matnr.
        if sy-subrc eq 0.
          loop at it_pr_details where knumh eq it_a016-knumh.
            it_final-ebeln = it_rfq-ebeln.
            it_final-lifnr = it_rfq-lifnr.
            read table it_vendorname with
            key lifnr = it_rfq-lifnr.
            it_final-name1 = it_vendorname-name1.
            case it_pr_details-kschl.
            when 'JEC1'.
              it_final-JEC1 = it_pr_details-kbetr.
            when 'JHX1'.
              it_final-JHX1 = it_pr_details-kbetr.
            when 'JMOP'.
              it_final-JMOP = it_pr_details-kbetr.
            when 'JMX1'.
              it_final-JMX1 = it_pr_details-kbetr.
            when 'JMX3'.
              it_final-JMX3 = it_pr_details-kbetr.
            when 'JSEP'.
              it_final-JSEP = it_pr_details-kbetr.
            when 'JVRD'.
              it_final-JVRD = it_pr_details-kbetr.
            endcase.
          endloop.
        elseif l_subrc ne 0.
       continue.
        endif.
        append it_final.
        clear  it_final.
      endloop.
    endform.                    " pop_final_tab
    *&      Form  pop_vendor_name
          Populate Vendor Name
    form pop_vendor_name .
      if not it_rfq[] is initial.
      Select lifnr
             name1
        from lfa1
        into table it_vendorname
       where lifnr eq it_rfq-lifnr.
      endif.
    endform.                    " pop_vendor_name
    Reward points if useful
    Regards
    Anji

  • FI-CA events to improve performance

    Hello experts,
    Does anybody use the FI-CA events to improve the extraction performance for datasources 0FC_OP_01 and 0FC_CI_01 (open and cleared items)?
    It seems that this specific exits associated to BW events have been developped especially to improve performance.
    Any documentation, guide should be appreciate.
    Thanks.
    Thibaud.

    Thanks to all for the replies
    @Sybrand
    Please answer first whether the column is stored in a separate lobsegment.
    No. Table,Index,LOB,LOB index uses the same TS. I missed adding this point( moving to separate TS) as part of table modifications.
    @Hemant
    There's a famous paper / blog post about CLOBs and Database Flashback. If I find it, I'll post the URL.
    Is this the one you are referring to
    http://laimisnd.wordpress.com/2011/03/25/lobs-and-flashback-database-performance/
    By moving the CLOB column to different block size , I will test the performance improvement it gives and will share the results.
    We dont need any data from this table. XML file contains details about finger prints and once the application server completes the job , XML data is deleted from this table.
    So no need of backup/recovery operations for this table. Client will be able to replay the transactions if any problem occurs.
    @Billy
    We are not performing XML parsing on DB side. Gets the XML data from client -> insert into table -> client selects from table -> Upon successful completion of the Job from client ,XML data gets deleted.
    Regarding binding of LOB from client side, will check on that side also to reduce round trips.
    By changing the blocksize, I can keep db_32K_cache_size=2G and keep this table in CACHE. If I directly put my table to CACHE, it will age out all other operation from buffer which makes things worse for us.
    This insert is part of transaction( Registration of a finger print) and this is the only statement taking time as of now compared to other statements in the transaction.
    Thanks,
    Arun

  • Report performance is very slow

    Hi all,
    I have a table with 25 million rows. I create a report on this table in which i need to use the following expression
    ifnull(abc_accr_int_val,0)+ifnull(xyz_mar_val_lcy,0)
    and this experession is group by asset description but the report output time is very high.Further there is no index on these columns in the database.
    Please guide me that did my approach is right ??? if no what is the right approach
    Regards

    Hi,
    Thanks for such a beautiful and informative answers I really appriciated it.
    I catch the problem and now want to share with U. As u know my prompt is on Date Column but I dont want to show this coloumn in my report.I only want that a user give a date and two columns are shown in report 1) asset_desc 2) total sum (which is sum of 2 columns as i discussed in this thread).
    Now before...after creating the prompt on Date field I edit the report view and delete this coloumn (Date) because I only want above 2 colomns and not Date column in my report. But all sorting is performed on date bec it is in prompt (where clause). When I add Date column in my report (to show date col) the speed of the report is like sql and data fetching speed same like sql. Now tell me is there any way that I delete this col from my report but it exist in answer criteria table ??????
    I have 19 Asset Desc which return by sql and answers request.
    Regards

  • Report Performance is slow

    Hi
    In our production one report is running very slow, for one moth its taking 10 to 12 min earlier it was took only 2 min for month data, we are confused why itu2019s happening. Query is running on multiprovider. On cube we are using only one aggregate and in the query designer we are using Hierarchy(Active) & virtual key figure.
    We have not changed anything recently on the query, why this suddenly report running very slow.
    Please advice 
    Thanks,
    Manu.

    Hi,
    Check whether the Aggregate is up-to-date and whether it is being used by your query or not?
    Also check the number of records as well, if the output is huge then it is obvious that the queries can take more time to run. As you are using Virtual Keyfigure, this generally degrades the query performance.
    Regards,
    rik

  • Report  performance with Hierarchies

    Hi
    How to improve query performance with hierarchies. We have to do lot of navigation's in the query and the volume of data size very big.
    Thanks
    P G

    HI,
    chk this:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1955ba90-0201-0010-d3aa-8b2a4ef6bbb2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c0ab590-0201-0010-bd9a-8332d8b4f09c
    Query Performance – Is "Aggregates" the way out for me?
    /people/vikash.agrawal/blog/2006/04/17/query-performance-150-is-aggregates-the-way-out-for-me
    ° the OLAP cache is architected to store query result sets and to give all users access to those result sets.
    If a user executes a query, the result set for that query’s request can be stored in the OLAP cache; if that same query (or a derivative) is then executed by another user, the subsequent query request can be filled by accessing the result set already stored in the OLAP cache.
    In this way, a query request filled from the OLAP cache is significantly faster than queries that receive their result set from database access
    ° The indexes that are created in the fact table for each dimension allow you to easily find and select the data
    see http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    ° when you load data into the InfoCube, each request has its own request ID, which is included in the fact table in the packet dimension.
    This (besides giving the possibility to manage/delete single request) increases the volume of data, and reduces performance in reporting, as the system has to aggregate with the request ID every time you execute a query. Using compressing, you can eliminate these disadvantages, and bring data from different requests together into one single request (request ID 0).
    This function is critical, as the compressed data can no longer be deleted from the InfoCube using its request IDs and, logically, you must be absolutely certain that the data loaded into the InfoCube is correct.
    see http://help.sap.com/saphelp_nw04/helpdata/en/ca/aa6437e7a4080ee10000009b38f842/content.htm
    ° by using partitioning you can split up the whole dataset for an InfoCube into several, smaller, physically independent and redundancy-free units. Thanks to this separation, performance is increased when reporting, or also when deleting data from the InfoCube.
    see http://help.sap.com/saphelp_nw04/helpdata/en/33/dc2038aa3bcd23e10000009b38f8cf/content.htm
    Hope it helps!
    tHAK YOU,
    dst

Maybe you are looking for

  • Email icon on desktop always opens in webmail instead of email.

    When I click on email icon on desktop it goes to my internet provider's web page and the only way I can my emails is to sign into webmail. I am using Thunderbird. I have a second email on the desktop but it won't open at all. Any suggestions would be

  • Problem with selecting special distance

    This used to work on my old iPod. Now when I select special time I get a calories menu and can select 5,10,15 .ect. When I start workout the selected training is in minutes. The trouble is that I canot select other intervals as I used to, and that it

  • AnyConnect Mobile

    Hi, I just installed an AnyConnect Mobile license on an ASA 5510 but haven't had time to do much else. Does the ASA require any further configuration to support mobile clients, or will the existing AnyConnect setup suffice? Thanks.

  • Database Signon: Could not sign on to database PSH92DMO with user PS

    I am trying to instal peoplesoft HRMS 9.2 on Win2003(64bits) and Oracle 11g release 11.2.0.1.0 - 64bits. TUXEDO : 11.1.1.2.0 WITH VS2010 FRAMEWORK : V4.0 WEBLOGIC : 10.3.6.0 JAVA JDK 7 UPDATE 9 for Win x64 PEOPLETOOLS : 8.53 (directory c:PT8.53) vARI

  • Pic on external Drive !

    Well my question is that a the Moment i have a Folder Structre with my pics on a external drive and when i import them my harddrive on the macbook is too small. Is it possible to just import thumnails and the meta data. So that when the drive is not