Help with custom tables

Hello All,
I need some help with custom tables. I have created a custom table to maintain names and I also did table maintenance generation so that the user can maintain names in this table using SM30 transaction.
The question is, in my program on the selection screen when the user press F4 I need to display the values maintained in this custom table...
Can anyone help me with this.
Thanks
Pavan

If I understood you correctly, you have a program in which one or some of the selection screen fields refer to a custom database table field(s).
You want to implement a F4 functionality.
Fill an internal table with the values you want to show.
Call the function module 'F4IF_INT_TABLE_VALUE_REQUEST' in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR MYPARAM as follows.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = MYITAB-FIELD
            dynprofield = MYSELSCREENPARAM
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = my_f4_itab.
Srinivas

Similar Messages

  • Please I need some help with a table

    Hi All
    I need some help with a table.
    My table needs to hold prices that the user can update.
    Also has a total of the column.
    my question is if the user adds in a new price how can i pick up the value they have just entered and then add it to the total which will be the last row in the table?
    I have a loop that gets all the values of the column, so I can get the total but it is when the user adds in a new value that I need some help with.
    I have tried using but as I need to set the toal with something like total
        totalTable.setValueAt(total, totalTable.getRowCount()-1,1); I end up with an infinite loop.
    Can any one please advise on some way I can get this to work ?
    Thanks for reading
    Craig

    Hi there camickr
    thanks for the help the other day
    this is my full code....
    package printing;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.text.DecimalFormat;
    public class tablePanel
        extends JDialog  implements Printable {
      BorderLayout borderLayout1 = new BorderLayout();
      private boolean printing = false;
      private Dialog1 dialog;
      JPanel jPanel = new JPanel();
      JTable table;
      JScrollPane scrollPane1 = new JScrollPane();
      DefaultTableModel model;
      private String[] columnNames = {
      private Object[][] data;
      private String selectTotal;
      private double total;
      public tablePanel(Dialog1 dp) {
        dp = dialog;
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      public tablePanel() {
        try {
          jbInit();
        catch (Exception exception) {
          exception.printStackTrace();
      private void jbInit() throws Exception {
        jPanel.setLayout(borderLayout1);
        scrollPane1.setBounds(new Rectangle(260, 168, 0, 0));
        this.add(jPanel);
        jPanel.add(scrollPane1, java.awt.BorderLayout.CENTER);
        scrollPane1.getViewport().add(table);
        jPanel.setOpaque(true);
        newTable();
        addToModel();
        addRows();
        setTotal();
    public static void main(String[] args) {
      tablePanel tablePanel = new  tablePanel();
      tablePanel.pack();
      tablePanel.setVisible(true);
    public void setTotal() {
      total = 0;
      int i = table.getRowCount();
      for (i = 0; i < table.getRowCount(); i++) {
        String name = (String) table.getValueAt(i, 1);
        if (!"".equals(name)) {
          if (i != table.getRowCount() - 1) {
            double dt = Double.parseDouble(name);
            total = total + dt;
      String str = Double.toString(total);
      table.setValueAt(str, table.getRowCount() - 1, 1);
      super.repaint();
      public void newTable() {
        model = new DefaultTableModel(data, columnNames) {
        table = new JTable() {
          public Component prepareRenderer(TableCellRenderer renderer,
                                           int row, int col) {
            Component c = super.prepareRenderer(renderer, row, col);
            if (printing) {
              c.setBackground(getBackground());
            else {
              if (row % 2 == 1 && !isCellSelected(row, col)) {
                c.setBackground(getBackground());
              else {
                c.setBackground(new Color(227, 239, 250));
              if (isCellSelected(row, col)) {
                c.setBackground(new Color(190, 220, 250));
            return c;
        table.addMouseListener(new MouseAdapter() {
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() == 2) {
            if (e.getClickCount() == 1) {
              if (table.getSelectedColumn() == 1) {
       table.setTableHeader(null);
        table.setModel(model);
        scrollPane1.getViewport().add(table);
        table.getColumnModel().getColumn(1).setCellRenderer(new TableRenderDollar());
      public void addToModel() {
        Object[] data = {
            "Price", "5800"};
        model.addRow(data);
      public void addRows() {
        int rows = 20;
        for (int i = 0; i < rows; i++) {
          Object[] data = {
          model.addRow(data);
      public void printOut() {
        PrinterJob pj = PrinterJob.getPrinterJob();
        pj.setPrintable(tablePanel.this);
        pj.printDialog();
        try {
          pj.print();
        catch (Exception PrintException) {}
      public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
        Graphics2D g2 = (Graphics2D) g;
        g2.setColor(Color.black);
        int fontHeight = g2.getFontMetrics().getHeight();
        int fontDesent = g2.getFontMetrics().getDescent();
        //leave room for page number
        double pageHeight = pageFormat.getImageableHeight() - fontHeight;
        double pageWidth =  pageFormat.getImageableWidth();
        double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
        double scale = 1;
        if (tableWidth >= pageWidth) {
          scale = pageWidth / tableWidth;
        double headerHeightOnPage = 16.0;
        //double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
        //System.out.println("this is the hedder heigth   " + headerHeightOnPage);
        double tableWidthOnPage = tableWidth * scale;
        double oneRowHeight = (table.getRowHeight() +  table.getRowMargin()) * scale;
        int numRowsOnAPage = (int) ( (pageHeight - headerHeightOnPage) / oneRowHeight);
        double pageHeightForTable = oneRowHeight *numRowsOnAPage;
        int totalNumPages = (int) Math.ceil( ( (double) table.getRowCount()) / numRowsOnAPage);
        if (pageIndex >= totalNumPages) {
          return NO_SUCH_PAGE;
        g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    //bottom center
        g2.drawString("Page: " + (pageIndex + 1 + " of " + totalNumPages),  (int) pageWidth / 2 - 35, (int) (pageHeight + fontHeight - fontDesent));
        g2.translate(0f, headerHeightOnPage);
        g2.translate(0f, -pageIndex * pageHeightForTable);
        //If this piece of the table is smaller
        //than the size available,
        //clip to the appropriate bounds.
        if (pageIndex + 1 == totalNumPages) {
          int lastRowPrinted =
              numRowsOnAPage * pageIndex;
          int numRowsLeft =
              table.getRowCount()
              - lastRowPrinted;
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(oneRowHeight *
                                     numRowsLeft));
        //else clip to the entire area available.
        else {
          g2.setClip(0,
                     (int) (pageHeightForTable * pageIndex),
                     (int) Math.ceil(tableWidthOnPage),
                     (int) Math.ceil(pageHeightForTable));
        g2.scale(scale, scale);
        printing = true;
        try {
        table.paint(g2);
        finally {
          printing = false;
        //tableView.paint(g2);
        g2.scale(1 / scale, 1 / scale);
        g2.translate(0f, pageIndex * pageHeightForTable);
        g2.translate(0f, -headerHeightOnPage);
        g2.setClip(0, 0,
                   (int) Math.ceil(tableWidthOnPage),
                   (int) Math.ceil(headerHeightOnPage));
        g2.scale(scale, scale);
        //table.getTableHeader().paint(g2);
        //paint header at top
        return Printable.PAGE_EXISTS;
    class TableRenderDollar extends DefaultTableCellRenderer{
        public Component getTableCellRendererComponent(
          JTable table,
          Object value,
          boolean isSelected,
          boolean isFocused,
          int row, int column) {
            setHorizontalAlignment(SwingConstants.RIGHT);
          Component component = super.getTableCellRendererComponent(
            table,
            value,
            isSelected,
            isFocused,
            row,
            column);
            if( value == null || value .equals("")){
              ( (JLabel) component).setText("");
            }else{
              double number = 0.0;
              number = new Double(value.toString()).doubleValue();
              DecimalFormat df = new DecimalFormat(",##0.00");
              ( (JLabel) component).setText(df.format(number));
          return component;
    }

  • F4 Help with text table in WD abap

    Hi,
    i am using country related input help with check table T005 in one of table and i want to display the country text along with country id in my table, f4 for country is coming however if i select country from f4 it showing country id in the input field of table.
    i want to have country text also in one of my input fields in the table, i have seen f4 help works if we have explicit search help and using parameter assignment we can have id and text defaulted if we use same context for id and text fields,  however in this case country table t005 has check table t005 where texts are stored in text table t005t so web dynpro abap is't picking up the texts??
    please suggest how can i get the texts as soon as i select country in the f4??

    Hi Kranthi,
    You merely have to have an internal table storing list of countries, which you only need to do once, e.g. on load of application (method WDDOINIT of COMPONENTCONTROLLER). In your view, you have to declare a method for event onEnter of the input field, but this method doesn't have to have any code. Your code will be in method WDDOBEFOREACTION, where you read get country name from country key. Once you've got country name, transfer value to a context attribute to which you've already mapped as a source for attribute value of the UI element.
    Check out SAP Webdynpro component FITV_IMG_DEFHTLCATA -> view V_ITEM.

  • F4 help for custom table field - to be used when populating data thru SM30

    Hi,
    I have a custom table with 5 fields - say A, B, C, D and E. While populating data to the table through SM30, I need to create a F4 help for the field C. A  custom function module needs to be used.
    I have created a module for the same in the event PROCESS ON VALUE-REQUEST of the function group of the table.
    But the F4 for field C depends on the values put in fields A and B.
    I am not able to get the values of fields A and B from within the module PROCESS ON VALUE-REQUEST.
    Please help me to create the F4 help.

    hii,
    This is the piece of code i have used in one of my SM30 to get f4. mopdify according to ur need and use.
    revert back for further help.
    w_dynpread-fieldname = 'ZSITEDCDATA-SITE'.
      APPEND w_dynpread TO i_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = 'SAPLZSITEDCDATA'
          dynumb               = sy-dynnr
          translate_to_upper   = 'X'
        TABLES
          dynpfields           = i_dynpread
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE i_dynpread INTO w_dynpread INDEX 1.
      IF sy-subrc IS INITIAL.
        SELECT land1 FROM t001w
          INTO TABLE i_site
          WHERE werks EQ w_dynpread-fieldvalue.
        IF i_site[] IS NOT INITIAL.
          DATA: lv_line TYPE i.
          CLEAR lv_line.
          DESCRIBE TABLE i_site LINES lv_line.
          IF lv_line GT 1.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
              EXPORTING
                retfield        = 'ZSITEDCDATA-SITE_COUNTRY'
                dynpprog        = 'SAPLZSITEDCDATA'
                dynpnr          = sy-dynnr
                window_title    = 'Site Country'
                value_org       = 'S'
              TABLES
                value_tab       = i_site[]
                return_tab      = i_return
              EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
            IF sy-subrc <> 0.
              MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            ELSE.
              READ TABLE i_return INTO w_return INDEX 1.
              IF sy-subrc IS INITIAL.
                zsitedcdata-site_country = w_return-fieldval.
              ENDIF.
            ENDIF.
    Thanks ,
    Gaurav

  • Usage of formula variable with custom table for values

    Hi,
    I have the following scenario:
    a customer wants a report regarding payments of invoices with a formula in it to calculate interest results. In order to do so they want to be able to define a interest rate wich can be used to calculate te result by multiplying the rate by time and amount (for every line in the query the same rate should be used).
    As a solution I thought it would be easiest to give the key user access to a custom table via a custom transaction and then use the entered rate in the query by selecting it from this table using a formula variable (using an exit).
    I was wondering if anyone has ever used such a solution, or if one thinks this is possible.

    Hi Brock,
    Its possible, but I haven't tried as requirements didn't imply.
    More simpler idea is why don't you use a flat file loading through the IP to Info providers?
    Or even more better option is why don't you adapt to Virtual Info providers?
    For your suggested custom table using custom transaction, we can surely make it. Its possible in SE93. Try this transaction code. It must definitely help.
    Thanks,
    Arun Bala G
    Edited by: Arun Bala G on Jan 11, 2010 2:16 PM

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Need some help with the Table Function Operator

    I'm on OWB 10gR2 for Sun/Solaris 10 going against some 10gR2 DB's...
    I've been searching up and down trying to figure out how to make OWB use a Table Function (TF) which will JOIN with another table; allowing a column of the joined table to be a parameter in to the TF. I can't seem to get it to work. I'm able to get this to work in regular SQL, though. Here's the setup:
    -- Source Table:
    DROP TABLE "ZZZ_ROOM_MASTER_EX";
    CREATE TABLE "ZZZ_ROOM_MASTER_EX"
    ( "ID" NUMBER(8,0),
    "ROOM_NUMBER" VARCHAR2(200),
    "FEATURES" VARCHAR2(4000)
    -- Example Data:
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (1,'Room 1',null);
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (2,'Room 2',null);
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (3,'Room 3','1,1;2,3;');
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (4,'Room 4','5,2;5,4;');
    Insert into ZZZ_ROOM_MASTER_EX (ID,ROOM_NUMBER,FEATURES) values (5,'Room 5',' ');
    -- Destination Table:
    DROP TABLE "ZZZ_ROOM_FEATURES_EX";
    CREATE TABLE "ZZZ_ROOM_FEATURES_EX"
    ( "ROOM_NUMBER" VARCHAR2(200),
    "FEATUREID" NUMBER(8,0),
    "QUANTITY" NUMBER(8,0)
    -- Types for output table:
    CREATE OR REPLACE TYPE FK_Row_EX AS OBJECT
    ID NUMBER(8,0),
    QUANTITY NUMBER(8,0)
    CREATE OR REPLACE TYPE FK_Table_EX AS TABLE OF FK_Row_EX;
    -- Package Dec:
    CREATE OR REPLACE
    PACKAGE ZZZ_SANDBOX_EX IS
    FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX;
    END ZZZ_SANDBOX_EX;
    -- Package Body:
    CREATE OR REPLACE
    PACKAGE BODY ZZZ_SANDBOX_EX IS
    FUNCTION UNFK(inputString VARCHAR2) RETURN FK_Table_EX
    AS
    RETURN_VALUE FK_Table_EX := FK_Table_EX();
    i NUMBER(8,0) := 0;
    BEGIN
    -- TODO: Put some real code in here that will actually read the
    -- input string, parse it out, and put data in to RETURN_VALUE
    WHILE(i < 3) LOOP
    RETURN_VALUE.EXTEND;
    RETURN_VALUE(RETURN_VALUE.LAST) := FK_Row_EX(4, 5);
    i := i + 1;
    END LOOP;
    RETURN RETURN_VALUE;
    END UNFK;
    END ZZZ_SANDBOX_EX;
    I've got a source system built by lazy DBA's and app developers who decided to store foreign keys for many-to-many relationships as delimited structures in driving tables. I need to build a generic table function to parse this data and return it as an actual table. In my example code, I don't actually have the parsing part written yet (I need to see how many different formats the source system uses first) so I just threw in some stub code to generate a few rows of 4's and 5's to return.
    I can get the data from my source table to my destination table using the following SQL statement:
    -- from source table joined with table function
    INSERT INTO ZZZ_ROOM_FEATURES_EX(
    ROOM_NUMBER,
    FEATUREID,
    QUANTITY)
    SELECT
    ZZZ_ROOM_MASTER_EX.ROOM_NUMBER,
    UNFK.ID,
    UNFK.QUANTITY
    FROM
    ZZZ_ROOM_MASTER_EX,
    TABLE(ZZZ_SANDBOX_EX.UNFK(ZZZ_ROOM_MASTER_EX.FEATURES)) UNFK
    Now, the big question is--how do I do this from OWB? I've tried several different variations of my function and settings in OWB to see if I can build a single SELECT statement which joins a regular table with a table function--but none of them seem to work, I end up getting SQL generated that won't compile because it doesn't see the source table right:
    INSERT
    /*+ APPEND PARALLEL("ZZZ_ROOM_FEATURES_EX") */
    INTO
    "ZZZ_ROOM_FEATURES_EX"
    ("ROOM_NUMBER",
    "FEATUREID",
    "QUANTITY")
    (SELECT
    "ZZZ_ROOM_MASTER_EX"."ROOM_NUMBER" "ROOM_NUMBER",
    "INGRP2"."ID" "ID_1",
    "INGRP2"."QUANTITY" "QUANTITY"
    FROM
    (SELECT
    "UNFK"."ID" "ID",
    "UNFK"."QUANTITY" "QUANTITY"
    FROM
    TABLE ( "ZZZ_SANDBOX_EX"."UNFK2" ("ZZZ_ROOM_MASTER_EX"."FEATURES")) "UNFK") "INGRP2",
    "ZZZ_ROOM_MASTER_EX" "ZZZ_ROOM_MASTER_EX"
    As you can see, it's trying to create a sub-query in the FROM clause--causing it to just ask for "ZZZ_ROOM_MASTER_EX"."FEATURES" as an input--which isn't available because it's outside of the sub-query!
    Is this some kind of bug with the code generator or am I doing something seriously wrong here? Any help will be greatly appreciated!

    Hello Everybody!
    Thank you for all your response!
    I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table 
    select vkorg abgru from ZADS into it_rej.
    Earlier :
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    Now :
    DATA : BEGIN OF IT_REJ occurs 0,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    I guess this will fix the issue correct?
    PLease suggest!
    Regards,
    Developer.

  • Small issue with custom table cell editor and unwanted table row selection

    I'm using a custom table cell editor to display a JTree. Thing i notice is that when i select a value in the tree pop-up, the pop-up closes (as it should) but then every table row, from the editing row to the row behind the pop-up when i selected the value becomes highlighted. I'm thinking this is a focus issue, but it thought i took care of that. To clairfy, look at this: Before . Notice how the "Straightening" tree item is roughly above the "Stock Thickness" table row? When i select Straightening, this is what happens to my table: After .
    My TreeComboBox component:
    public class TreeComboBox extends JPanel implements MouseListener {
        private JTextField itemField;
        private TreeModel treeModel;
        private ArrayList<ActionListener> actionListeners = new ArrayList<ActionListener>();
        private Object selectedItem;
         * Creates a new <code>TreeComboBox</code> instance.
         * @param treeModel the tree model to be used in the drop-down selector.
        public TreeComboBox(TreeModel treeModel) {
            this(treeModel, null);
         * Creates a new <code>TreeComboBox</code> instance.
         * @param treeModel the tree model to be used in the drop-down selector.
         * @param selectedItem tree will expand and highlight this item.
        public TreeComboBox(TreeModel treeModel, Object selectedItem) {
            this.treeModel = treeModel;
            this.selectedItem = selectedItem;
            initComponents();
         * Returns the current drop-down tree model.
         * @return the current <code>TreeModel</code> instance.
        public TreeModel getTreeModel() {
            return treeModel;
         * Sets the tree model.
         * @param treeModel a <code>TreeModel</code> instance.
        public void setTreeModel(TreeModel treeModel) {
            this.treeModel = treeModel;
         * Returns the selected item from the drop-down selector.
         * @return the selected tree object.
        public Object getSelectedItem() {
            return selectedItem;
         * Sets the selected item in the drop-down selector.
         * @param selectedItem tree will expand and highlight this item.
        public void setSelectedItem(Object selectedItem) {
            this.selectedItem = selectedItem;
            String text = selectedItem != null ? selectedItem.toString() : "";
            itemField.setText(text);
            setToolTipText(text);
         * Overridden to enable/disable all child components.
         * @param enabled flat to enable or disable this component.
        public void setEnabled(boolean enabled) {
            itemField.setEnabled(enabled);
            super.setEnabled(enabled);
        public void addActionListener(ActionListener listener) {
            actionListeners.add(listener);
        public void removeActionListener(ActionListener listener) {
            actionListeners.remove(listener);
        // MouseListener implementation
        public void mouseClicked(MouseEvent e) {
        public void mouseEntered(MouseEvent e) {
        public void mouseExited(MouseEvent e) {
        public void mousePressed(MouseEvent e) {
        public void mouseReleased(MouseEvent e) {
            showPopup();
        private void initComponents() {
            setLayout(new GridBagLayout());
            itemField = new JTextField();
            itemField.setEditable(false);
            itemField.setText(selectedItem != null ? selectedItem.toString() : "");
            itemField.addMouseListener(this);
            add(itemField, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0,
                    GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
        private void showPopup() {
            final TreePopup popup = new TreePopup();
            final TreeComboBox tcb = this;
            final int x = itemField.getX();
            final int y = itemField.getY() + itemField.getHeight();
            int width = itemField.getWidth() + popupButton.getWidth();
            Dimension prefSize = popup.getPreferredSize();
            prefSize.width = width;
            popup.setPreferredSize(prefSize);
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    popup.show(tcb, x, y);
                    popup.requestFocusInWindow();
        private void fireActionPerformed() {
            ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "TreeComboBoxSelection");
            for (ActionListener listener : actionListeners) {
                listener.actionPerformed(e);
        private class TreePopup extends JPopupMenu {
            private JTree tree;
            private JScrollPane scrollPane;
            public TreePopup() {
                initComponents();
                initData();
            private void initData() {
                if (treeModel != null) {
                    tree.setModel(treeModel);
            private void initComponents() {
                setFocusable(true);
                setFocusCycleRoot(true);
                tree = new JTree();
                tree.setRootVisible(false);
                tree.setShowsRootHandles(true);
                tree.setFocusable(true);
                tree.setFocusCycleRoot(true);
                tree.addTreeSelectionListener(new TreeSelectionListener() {
                    public void valueChanged(TreeSelectionEvent e) {
                        tree_valueChanged(e);
                scrollPane = new JScrollPane(tree);
                add(scrollPane);
            private void tree_valueChanged(TreeSelectionEvent e) {
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
                setSelectedItem(node.getUserObject());
                fireActionPerformed();
                this.setVisible(false);
    }My TreeComboBoxTableCellEditor:
    public class TreeComboBoxTableCellEditor extends AbstractCellEditor implements TableCellEditor, ActionListener {
        protected TreeComboBox treeComboBox;
        protected ArrayList<CellEditorListener> cellEditorListeners = new ArrayList<CellEditorListener>();
        public TreeComboBoxTableCellEditor(TreeComboBox treeComboBox) {
            this.treeComboBox = treeComboBox;
            treeComboBox.addActionListener(this);
        public Object getCellEditorValue() {
            return treeComboBox.getSelectedItem();
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
            treeComboBox.setSelectedItem(value);
            return treeComboBox;
        public void actionPerformed(ActionEvent e) {
            stopCellEditing();
    }Any thoughts?
    Edited by: MiseryMachine on Apr 3, 2008 1:21 PM
    Edited by: MiseryMachine on Apr 3, 2008 1:27 PM

    As I said, you have to have empty context elements before additional rows will be open for input.
    For instance if you want to start with 5 rows available for input do the following to your internal table that you will bind:
    data itab type standard table of sflight.
    do 5 times.
      append initial line to itab.
    enddo.
    context_node->bind_table( itab ).
    The other option if you need n number of rows is to add a button to the table toolbar for adding more rows. When this button is pressed, you add a new context element to the node - thereby creating a new empty row in the table.

  • Help with pivot tables in excel

    Hello,
    I need some help with a very specific issue I am getting in excel.
    So, I have this pivot table that gets data from an external source (a huge database) and everything is working fine.
    The problem comes with some lines in our database that are written in asian letters (the thai alphabet). Every thai entry that we import appears like ????????.
    I can look into the DB (via MySQL Workbench) and everything is alright in there. I can also just copy some of the content into excel and the letters shows up normally.
    Is there something I can do to fix it?
    Thank you very much
    Daniel Ayres

    I can see it is working fine for roman/latin characteres, and it is not working for thai or japanese characteres. Since I dont have data written using the russian or the arabic alphabet, there is no way I can tell you if it would or not work..

  • JButton in JTable with custom table model

    Hi!
    I want to include a JButton into a field of a JTable. I do not know why Java does not provide a standard renderer for JButton like it does for JCheckBox, JComboBox and JTextField. I found some previous postings on how to implement custom CellRenderer and CellEditor in order to be able to integrate a button into the table. In my case I am also using a custom table model and I was not able to create a clickable button with any of the resources that I have found. The most comprehensive resource that I have found is this one: http://www.java2s.com/Code/Java/Swing-Components/ButtonTableExample.htm.
    It works fine (rendering and clicking) when I start it. However, as soon as I incorporate it into my code, the clicking does not work anymore (but the buttons are displayed). If I then use a DefaultTableModel instead of my custom one, rendering and clicking works again. Does anyone know how to deal with this issue? Or does anyone have a good pointer to a resource for including buttons into tables? Or does anyone have a pointer to a resource that explains how CellRenderer and CellEditor work and which methods have to be overwritten in order to trigger certain actions (like a button click)?
    thanks

    Yes, you were right, the TableModel was causing the trouble, everything else worked fine. Somehow I had this code (probably copy and pasted from a tutorial - damn copy and pasting) in my TableModel:
            public boolean isCellEditable(int row, int col) {
                //Note that the data/cell address is constant,
                //no matter where the cell appears onscreen.
                if (col < 3) {
                    return false;
                } else {
                    return true;
    }A pretty stupid thing when you want to edit the 3rd column...

  • [SOLVED :)] Need help with adf table row selection

    Hi,
    In my application I am displaying results in a table. The DisplayRow property of table is set to Selected
    There are Next and Back buttons which help user to view details associated to the next/previous rows.
    I am using ADF 11g
    When user clicks Next or Previous button, then the selection of the row should also gets updated
    To achieve this i wrote below piece of code:
    this.tblS.getSelectedRowKeys().clear();+
    this.tblS.setRowIndex(count);+
    RowKeySet rks =  tblS.getSelectedRowKeys();+
    rks.add(tblS.getRowKey());+
    rks =  tblS.getSelectedRowKeys();+
    ISSUE:_
    When i run application and click Next/Previous Button, all functionalities do take place properly, but a null pointer exception is also thrown._+
    If i remove DisplayRow property of table from Selected to Default, every thing works good and no Exception is thrown_+       
    But as records in my table are going to be around 50-60 everytime, i need to set DisplayRow property of table to Selected.
    Is there any way to achieve this? Solve this problem?
    Some more details:_
    I am using a POJO class to create DataController. This DataController is having a view Object which is used to create results table.
    I have defined Primary key for my POJO Data Controller.
    Here is code of xml file:*
    +<?xml version="1.0" encoding="UTF-8" ?>+
    +<JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.52.5"+
    id="ProductListBean" Package="xxadf.mm.resources"
    BeanClass="xxadf.mm.resources.ProductListBean"
    isJavaBased="true">
    +<Attribute Name="Product" Type="java.lang.String" PrimaryKey="true"/>+
    +<Attribute Name="Stock" Type="java.lang.String"/>+
    +<Attribute Name="Rate" Type="java.lang.String"/>+
    +<Attribute Name="Accuracy" Type="java.lang.String"/>+
    +<Attribute Name="Details" Type="java.lang.String"/>+
    +<ConstructorMethod IsCollection="true"+
    Type="xxadf.mm.resources.ProductListBean"
    BeanClass="xxadf.mm.resources.ProductListBean"
    id="ProductListBean"/>
    +</JavaBean>+
    Error Log:*
    SEVERE: Server Exception during PPR, #1
    java.lang.NullPointerException
    at oracle.adfinternal.view.faces.model.binding.RowDataManager.getRowIndex(RowDataManager.java:200)
    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.getRowIndex(FacesCtrlHierBinding.java:506)
    at org.apache.myfaces.trinidad.component.UIXIterator._fixupFirst(UIXIterator.java:414)
    at org.apache.myfaces.trinidad.component.UIXIterator.__encodeBegin(UIXIterator.java:392)
    at org.apache.myfaces.trinidad.component.UIXTable.__encodeBegin(UIXTable.java:168)
    at org.apache.myfaces.trinidad.component.UIXCollection.encodeBegin(UIXCollection.java:517)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:458)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:618)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:392)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:641)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:560)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:317)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.access$100(ShowDetailItemRenderer.java:31)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:491)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer$ChildEncoderCallback.processComponent(ShowDetailItemRenderer.java:464)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer._encodeChildren(ShowDetailItemRenderer.java:406)
    at oracle.adfinternal.view.faces.renderkit.rich.ShowDetailItemRenderer.encodeAll(ShowDetailItemRenderer.java:114)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:1523)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.access$500(PanelTabbedRenderer.java:38)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:969)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer$BodyEncoderCallback.processComponent(PanelTabbedRenderer.java:920)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:125)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:201)
    at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:167)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer._renderTabBody(PanelTabbedRenderer.java:519)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelTabbedRenderer.encodeAll(PanelTabbedRenderer.java:233)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:221)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:415)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:432)
    at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:820)
    at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1187)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1494)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:202)
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:685)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:261)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:193)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
    at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
    at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Please Help I have been struggling with this issue for long.
    Thanks and Regards
    Manav Ratra
    Edited by: user11255144 on Feb 8, 2010 5:33 AM

    Hi Arun,
    Thanks for replying.
    Actually in my application there is one result table and a section that is displaying complete details of the product selectd in result table.
    The next/previous buttons are not binded with result table.
    What I am doing is, I am puuliing data from VO and displaying it on form, whenever any of these buttons is clicked.
    As soon as these buttons are clicked data is coming up, but selection state of table is not getting updated.
    So to update selection state i wrote piece of code described in my previous post.
    Everything works fine if displayRow property of table is not set to selected.
    If i set display row property of table to selected, then i get a null pointer exception with message log defined in previous post.
    Although NPE is thrown, yet all data is properly fetched and table selection is also updated. But am not able to get how this NPE is coming and hpw to fix it .
    (I need to keep displayRow = selected, for all other cases NPE is not thrown)
    Please help..
    Thanks and Regards
    Manav Ratra

  • Help with custom page size support for non standard paper

    Firstly, we appreciate any support you may be able to provide, we have already thrown considerable effort at this and it has been very time consuming and frustrating.
    To support a number of business functions need to print to (non standard) continuous and mulitpart paper on a dot matrix printer. The (test) Mac is a 10.4.11 G4 laptop, the printer is an Oki Microline 520 (9 pin 80 column, IBM Proprinter, Microline or Epson FX personalities with a parallel interface) which has been networked via a HP JetDirext Ex Plus print server. That part appears to be operating correctly.
    We have tried a number of drivers / printer personalities with varying levels of success:
    ESP / EPSON 9-Pin Series CUPS v1.1 / Epson FX personality
    ESP / OKIDATA 9-Pin Series CUPS v1.1 / Oki Microline personality
    Ghostscript / epsonc / Epson Dot Matrix Foomatic PPD / Epson FX personality
    Ghostscript / ibmpro / IBM ProPrinterII Foomatic PPD / IBM Proprinter personality
    Ghostscript / okiibm / Oki Microline IBM compatible 9 pin Foomatic PPD / IBM Proprinter personality
    There were no appropriate drivers in Gutenprint (5.2.3 version) The most successful is the okiibm / Oki Microline IBM compatible 9 pin settings, it can print A4 and honors the Printer Features Resolution settings in the print dialogue.
    Q1: Should we see anything in the Printer Info / Installable Option, it is always blank ?
    The issue is custom page sizes, we can manage / add Custom Pages Sizes via the Page Setup / Paper Size interface and they draw on the screen OK but they do not work at the printer (various issue at the printer such error messages, junk printing and wrong orientation):
    Q2: Are we heading in the right direction or is there a better way to handle this ?
    Q3: Would 10.5 solve all our problems, are the print drivers any better ?
    Q4: Is this the correct way to specify custom page sizes, is this all we need to do ?
    Q5: Is so how do we get the driver to respect the size, do we need another filter or something ?
    Q6: Is it possible to add (by hand) custom page sizes to the ESP drivers or Foomatic PPD files so they they appear as a "standard" offering in the Page Setup / Paper Size interface ?
    Sorry for the long / complicated post and thanks in advance for any advice / assistance.

    Matt Broughton wrote:
    Testing on 10.5.7, Tried both Oki 9-Pin Series 1.3 / Microline personality (no joy) and Epson 9-Pin Series 1.3 (this is a much better driver than 1.1) / Epson FX personality but not much joy with custom page sizes,
    The Oki 9-pin Series 1.3 and the Epson 9-Pin Series 1.3 should produce the same results. The only difference in the PPDs is the printer model name.
    After some testing, I find that the output is not the same despite the two PPDs being virtually identical. I did spot in the CUPS source code for the rastertoepson filter that there is some model name matching for Epson printers. Thus I can see where the output using the Oki 9-pin PPD could be different than when using the Epson 9-pin PPD.
    but again once I imbedded the page size into the ppd some (but frustrating) luck. I can get it to respect the paper orientation and it prints well but I could not get the form length to work properly. At best over a print run of 7 labels it would creep up the label by about 0.1 inches / 2 mm.
    Just for the fun of it, I made some additions to the Epson 9-pin 1.3 PPD. All I can say is that I could print a job to file. I have no way to know what it would look like on paper.
    I did find that using a custom paper size did add some unwanted margins to the output bounding box. Putting the custom page size into the PPD seemed to get around that issue.
    I added the following lines to the Epson 9-pin PPD 1.3--
    <pre style="overflow: auto;font-size:small; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #ddd; padding: .3em .8em .3em .8em; font-size: 9px;">*PageSize Label1/Label1: "<</PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *PageRegion Label1/Label1: "<<PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *ImageableArea Label1/Label1: "0 0 288.00 107.80"
    *PaperDimension Label1/Label1: "288.00 107.80"</pre>
    This adds a paper size with the 4 inch (288pt) width and 1.5 inch (107.8pt) height. That represents the 1.4 inch label and the 0.1 inch gap between labels. I set 0pt margins except for the bottom where is set the 0.1 inch (7pt) gap as the bottom margin.
    The full diff in context is--
    <pre style="overflow: auto;font-size:small; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #ddd; padding: .3em .8em .3em .8em; font-size: 9px;">loki:~ matt$ diff -u /usr/share/cups/model/epson9.ppd ~/Desktop/epson9.ppd
    --- /usr/share/cups/model/epson9.ppd 2009-02-20 20:16:53.000000000 -0600
    +++ /Users/matt/Desktop/epson9.ppd 2009-06-06 20:37:06.000000000 -0500
    @@ -42,6 +42,7 @@
    *PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
    *PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
    *PageSize FanFoldUS/US Fanfold: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
    +*PageSize Label1/Label1: "<</PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *CloseUI: *PageSize
    *OpenUI *PageRegion/Media Size: PickOne
    *OrderDependency: 10 AnySetup *PageRegion
    @@ -50,17 +51,20 @@
    *PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
    *PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
    *PageRegion FanFoldUS/US Fanfold: "<</PageSize[1071 792]/ImagingBBox null>>setpagedevice"
    +*PageRegion Label1/Label1: "<<PageSize[288 107.8]/ImagingBBox null>>setpagedevice"
    *CloseUI: *PageRegion
    *DefaultImageableArea: Letter
    *ImageableArea Letter/US Letter: "18.00 18.00 594.00 774.00"
    *ImageableArea Legal/US Legal: "18.00 18.00 594.00 990.00"
    *ImageableArea A4/A4: "18.00 18.00 577.00 824.00"
    *ImageableArea FanFoldUS/US Fanfold: "18.00 18.00 1053.00 774.00"
    +*ImageableArea Label1/Label1: "0 0 288.00 107.80"
    *DefaultPaperDimension: Letter
    *PaperDimension Letter/US Letter: "612.00 792.00"
    *PaperDimension Legal/US Legal: "612.00 1008.00"
    *PaperDimension A4/A4: "595.00 842.00"
    *PaperDimension FanFoldUS/US Fanfold: "1071.00 792.00"
    +*PaperDimension Label1/Label1: "288.00 107.80"
    *MaxMediaWidth: "1080.00"
    *MaxMediaHeight: "86400.00"
    *HWMargins: 18.00 18.00 18.00 18.00</pre>
    I don't know if that will help you or not. Let us know what sort of progress you make.
    Matt

  • Please help with customizing price calculation in CRM 7 !!!

    Hi, Experts!
    I have a problem with customizing price calculation for product. Product is a bank's credit. I want to fill credit's data (percentage rate, pay term, monthly comission and other conditions) in condition record and after pricing procedure done i could saw results in WebUI (monthly fee, total rpice of product and etc.). 1) How to do that? Can i change or insert some fields (i mean columns) in product area (for example when i want to create opportunity)? 2) How can i change or insert calculation rule? 3) Can i insert formula in calsulation? Help me please step by step.
    Thank for your help.
    Regards,
    faraviper.

    Hello Faraviper
    I think you have not installed PME component correctly. Please use the following path to see the help documentation for that.
    http://service.sap.com/crm-inst
    or
    http://service.sap.com/instguides
    Also check out this OSS note, though it is for an older release it may throw some important pointers.
    857969 - Installing PME for CRM 5.0
    Hope this helps.

  • Help with Oracle Table Audit Trigger

    Hi Guys,
    Need some help with the design of a trigger please. I have created one standard audit table where all sensitive data will be audited/inserted. The idea is to insert the column name and the old and new values here, dont want to maintain an audit table for each and every table there is, reporting would be a nightmare.
    Trying to fetch all the column names from sys objects then looping through each and inserting the new and old values for them into the audit table. Everything else is fine apart from the actual :old and :new value inserts. The column name is coming from a variable in a cursor and this is where I seem to be failing.
    Can anyone help please? What is the correct syntax to use?
    CREATE OR REPLACE TRIGGER commission_update
        AFTER UPDATE
            ON commission
            FOR EACH ROW
    DECLARE
            v_username varchar2(10);
              v_column varchar2(20);
              -- Get Table Columns
              cursor table_column is
                      select c.name
                      from  sys.col$ c, sys.obj$ t
                      where t.obj# = c.obj#
                      and   t.type# in (2, 3, 4) 
                      and   bitand(c.property, 32) = 0 /* not hidden column */
                      and t.name = 'COMMISSION';
        BEGIN
            -- Find username of person performing UPDATE into table
            SELECT user
         INTO v_username
            FROM dual;
              open table_column;
                    loop
                          fetch table_column
                         into v_column;                    
                         EXIT WHEN table_column%NOTFOUND;
                                 -- Insert record into audit_record
                             INSERT INTO audit_record
                                  ( aud_code,
                                      aud_ban_code,
                                      aud_user,
                                      aud_table,
                                  aud_column,
                                   aud_old_val,
                                   aud_new_val,
                                   aud_date )
                                VALUES
                                  ( xaudit_record.nextval,
                                      :old.com_ban_code,
                                      v_username,
                                      'COMMISSION',
                                   v_column,
                                   :old.v_column, /* problem here!!!!!!! */
                                   :new.v_column, /* problem here!!!!!!! */
                                   sysdate );
                    end loop;
              close table_column;
        END;
    /

    What does auditing mean in the financial environment? "An audit is a professional, independent examination of a company's financial statements and accounting documents according to generally accepted accounting principles."
    What does it mean in database terms? Surely, the basic definition would be the same, ito of a proper independent examination of changes in the database according to accepted principles?
    And just how does a trigger live up to that? When it is fully dependent on being enabled for that transaction in order to examine it? It is trivial to disable a trigger, make changes, and re-enable it.
    So what happens to your "auditing" then?
    Do you really think that a trigger suffices as a means to audit changes in a table? And if so, what logic and reasoning do you use to discard Oracle's auditing features that are built into the core of the database?

  • Help with Times Table GUI applet

    Hello,
    I need help with an applet which inputs an integer from the user and displays the appropiate times table up to times 10 eg; user input 5 - display shows
    5 time 1 is 5
    5 times 2 is 10
    5 times 10 is 50.
    I have only managedt o get the display to show one statement eg 5 times 1 - I have tried using a for loop to show the whole table - but unlike a print statement each time the loop goes round it overwrites the data in the display box with the new data - any help would be much appreciated.
    Note: it is for a programming course year 1 exercise - so I can only use basic constructs or loops to achieve this. Thanks in advance! Heres what I have so far:
    import java.applet.* ;
    import java.awt.* ;
    import java.awt.event.* ;
    public class TimesTableApplet extends Applet implements ActionListener
         // Declare the GUI components globally
         Label titleLabel, whichTableLabel ;
         TextField whichTableBox, resultBox ;
         Button showTableButton, clearButton ;
         // Declare integer variables for holdind the number input by the user,
         // the times number, and the result number
         int whichTable, times=1, result ;
         // Declare variables to hold string versions of the three integer variables
         // above, for placing in the TextFields
         String whichTableString, timesString, resultString ;
         public void init ()
              // Create the Labels
              titleLabel = new Label ( "Times Table" ) ;
              whichTableLabel = new Label ( "Which Table?" ) ;
              // Create the TextFields
              whichTableBox = new TextField ( 5 ) ;
              resultBox = new TextField ( 30 ) ;
              // Create the Buttons
              showTableButton = new Button ( "Show Table" ) ;
              clearButton = new Button ( "Clear" ) ;
              // Add the components to the applet window
              add ( titleLabel ) ;
              add ( whichTableLabel ) ;
              add ( whichTableBox ) ;
              whichTableBox.addActionListener ( this ) ;
              add ( resultBox ) ;
              resultBox.setEditable ( false ) ;
              add ( showTableButton ) ;
              showTableButton.addActionListener ( this ) ;
              add ( clearButton ) ;
              clearButton.addActionListener ( this ) ;
         } // End of init method
         public void actionPerformed ( ActionEvent event )
              // Find out which button generated the event
              String arg = event.getActionCommand () ;
              // If the user clicks the clear button, clear the whichTableBox and
              // resultBox
              if ( arg.equals ( "Clear" ) )
                   whichTableBox.setText ( "" ) ;
                   resultBox.setText ( "" ) ;
              else
                   try
                        // Try extracting a string from the whichTableBox ( the users input )
                        // and converting it to an integer
                        whichTableString = whichTableBox.getText () ;
                        whichTable = Integer.parseInt ( whichTableString ) ;
                        // Clear status box
                        showStatus ( "" ) ;
                        // If the user clicks the showTableButton, display the appropiate
                        // times table up to times 10
                        if ( arg.equals ( "Show Table" ) ) ;
                             result = whichTable * times ;
                             timesString = Integer.toString ( times ) ;
                             resultString = Integer.toString ( result ) ;
                             resultBox.setText ( whichTableString + " times " + timesString + " is " + resultString ) ;
                   } // End of try block
                   catch ( NumberFormatException entry )
                        // Display error message and clear whichTableBox
                        showStatus ( "Error: Invalid Input - not an integer!" ) ;
                        whichTableBox.setText ( "" ) ;
                   } // End of catch block
              } // End of else statement
         } // End of actionPerformed method
    } // End of class

    use this code, please arrange your User interface correctly.
    * TimesTableApplet.java
    * Created on March 12, 2007, 12:08 PM
    * @author cc.woon
    import java.applet.* ;
    import java.awt.* ;
    import java.awt.event.* ;
    public class TimesTableApplet extends Applet implements ActionListener
    // Declare the GUI components globally
    Label titleLabel, whichTableLabel ;
    TextField whichTableBox ;
    TextArea resultBox;
    Button showTableButton, clearButton ;
    // Declare integer variables for holdind the number input by the user,
    // the times number, and the result number
    int whichTable, times=1, result ;
    // Declare variables to hold string versions of the three integer variables
    // above, for placing in the TextFields
    String whichTableString, timesString, resultString ;
    public void init ()
    // Create the Labels
    titleLabel = new Label ( "Times Table" ) ;
    whichTableLabel = new Label ( "Which Table?" ) ;
    // Create the TextFields
    whichTableBox = new TextField ( 5 ) ;
    resultBox = new TextArea() ;
    // Create the Buttons
    showTableButton = new Button ( "Show Table" ) ;
    clearButton = new Button ( "Clear" ) ;
    // Add the components to the applet window
    add ( titleLabel ) ;
    add ( whichTableLabel ) ;
    add ( whichTableBox ) ;
    whichTableBox.addActionListener ( this ) ;
    add ( resultBox ) ;
    resultBox.setEditable ( false ) ;
    add ( showTableButton ) ;
    showTableButton.addActionListener ( this ) ;
    add ( clearButton ) ;
    clearButton.addActionListener ( this ) ;
    } // End of init method
    public void actionPerformed ( ActionEvent event )
    // Find out which button generated the event
    String arg = event.getActionCommand () ;
    // If the user clicks the clear button, clear the whichTableBox and
    // resultBox
    if ( arg.equals ( "Clear" ) )
    whichTableBox.setText ( "" ) ;
    resultBox.setText ( "" ) ;
    else
    try
    // Try extracting a string from the whichTableBox ( the users input )
    // and converting it to an integer
    whichTableString = whichTableBox.getText () ;
    whichTable = Integer.parseInt ( whichTableString ) ;
    // Clear status box
    showStatus ( "" ) ;
    // If the user clicks the showTableButton, display the appropiate
    // times table up to times 10
    if ( arg.equals ( "Show Table" ) ) ;
    result = whichTable * times ;
    timesString = Integer.toString ( times ) ;
    String output = "";
    for(int i =1;i<=10;i++){
    output += whichTable +" times "+i + ": "+(i*whichTable)+"\n";
    resultString = Integer.toString ( result ) ;
    //resultBox.setText ( whichTableString + " times " + timesString + " is " + resultString ) ;
    resultBox.setText ( output) ;
    } // End of try block
    catch ( NumberFormatException entry )
    // Display error message and clear whichTableBox
    showStatus ( "Error: Invalid Input - not an integer!" ) ;
    whichTableBox.setText ( "" ) ;
    } // End of catch block
    } // End of else statement
    } // End of actionPerformed method
    } // End of class

Maybe you are looking for

  • Can I use a NETGEAR WRG614v6 as a wireless extender for my AE?

    My modem is connected up to my AExpress but the signal is weak around some parts of the house. I have an old NETGEAR WRG614v6 router and was wondering wether i could use this as a wireless extender or repeater and have it just plugged into the power,

  • W530 wake-up issues

    Often times when I close my laptop lid for a while (20-30 min or more) and I open it back up, the light around my power button flashes on and off and I see the hard drive indicator light flashing as though its working but it doesn't come back on. I'm

  • Ipod Sync. Will I LOSE MY MUSIC??

    Hey everone. I'm just wondering, does anyone know about synchronizing your music through itunes? My concern is that if I do this on my home computer and then take my ipod say, to my friend's house, I might lose all of my music on my ipod until I go b

  • ORA-01017: invalid username/password when using TNS Alias

    Friends, I am experiencing this strange issue in 11G R2. When I use tnsalias and connect using sqlplus username/password@TNS it shows ORA-01017: invalid username/password . But the same works with ORACLE_SID. See below. -bash-3.00$ uname -a SunOS ibs

  • Triggering BO from Change document object..

    Hi Experts, I had a problem triggering custom Business object from custom Changed document object.. The scenario is like this...   ' I had created a simple business object with key field as MATNR..   and a changed document in SCDO transaction.. I had