Adding a table in allowed reference tables in COPA

Hi SAPians,
I want to create a characteristics in COPA that is batch number. This batch number is stored in billing document item (table is VBRP and field name is CHARG). I want to have this field updated in COPA at the time of billing.
When I am going for the characteristics creation, I have two options: either create it on with reference to a SAP table or create it from scratch.
When I go for the first option, I don't have the table VBRP in the list of allowed reference tables. Instead of that, table VBAP is available that is for sales document (sales order). I cannot use this table because batch number is not known untill the step of billing. So I have to use the table VBRP that is for billing documents.
Can I somehow add a particular table in the allowed refernce tables list for characteristics creation in COPA.
Shirazi

Apple has removed over 90 features from Pages 5.
http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
Pages '09 should still be in your Applications/iWork folder.
Archive/trash Pages 5 and rate/review it in the App Store, then get back to work.
Peter

Similar Messages

  • Adding additional tables to the extractor configuration

    Hi Experts,
    Can you please help me adding additional tables to the SAP extractor and to configure the field data in the orgstructure to show a flag against the position.
    Luke - I have tried using the option said by you from Application-wide Settings-->Data Centre --> Read SAP Table, it has properly save the added table, but not able to see it from SAP extractor configruation and not able to extract any data. Also, can you please guide me how to use the fields from this table (HRP1010) to write a small piece of logic to show a flag for a particualr position based on data.
    Thanks in advance,
    Purandhar

    Hi Purandhar,
    I have tried using the option said by you from Application-wide Settings-->Data Centre
    --> Read SAP Table, it has properly save the added table, but not able to see it from
    SAP extractor configruation and not able to extract any data.
    This has probably added a data element - I would check in the dataelementconfiguration folder in your build's .delta folder. IF so then you have the first step completed. Now you need to add the necessary configurations to use the data that comes through this data element.
    Go to your orgchart/hierarchy and navigate to Views. Here select your view (or your first view if this needs to be done for more than one view - if so you'll need to repeate these steps but not the step you already did in the Data Centre), and then click the + icon next to Design Details. Here you can add a new linked detail to your view detail. Simply give it a name, select the detail to link it to (usually the top level detail which is in blue), select a link field and then select your data element that was created in the Data Centre.
    Now if you try to add a section to your view inside the Design Details view designer you will see your new detail added. You can then select it and add fields from this detail.
    Also, can you please guide me how to use the fields from this table (HRP1010) to write
    a small piece of logic to show a flag for a particualr position based on data.
    Once you have been able to add the data in the views designer you will probably need to do some XML and XSL editing because you cannot edit XSL files in the AdminConsole and you will need to do this to get your icon/flag to show.
    First of all you need to create a new XSL file and put it into a folder in your .delta\root folder. For example, My_XSL_files. Here you need to write the code to render your flag based on your variable. You can find plenty of examples in all of the pre-existing XSL files. Then you need to copy PresentationResources.xml to .delta\root\XML and add the reference to your new XSL file.
    Go to your build's .delta folder and go to detailconfiguration. Find the detail you just created and open it. You'll find a section in their that you just added with a reference to an XSL file (e.g. if you added a Simple Caption section it will probably be something like SimpleCaptionXSL). Change this to the reference in the PresentationResources.xml.
    Load your build in the AdminConsole and hit Publish. Once done you should see your icon. Sometimes if your XSL is invalid or the code doesn't work you won't see anything. This is not unusual as the whole process can be quite tricky - even for us with lots of experience!
    Good luck!
    Luke

  • Adding a table to an existing table results in wrong link

    This is the code being used to add a table to a report:
    private ISCRTable AddLinkTable(ILinkTable linkTable, string sourceTableAlias, ConnectionInfo connectionInfo)
    { // construct a new Table from its name
    ISCRTable newTable = new Table();
    newTable.ConnectionInfo = connectionInfo.Clone();
    newTable.Name = linkTable.LinkTableName;
    newTable.Alias = linkTable.LinkTableName + "_ThisIsTheLinkTable" + LinkTableId++;
    if (_dataServiceSettings.DataProvider == DataProvider.Oracle11G)
    newTable.QualifiedName = _dataServiceSettings.DatabaseUserName.ToUpper() + "." + newTable.Name.ToUpper();
    else
    newTable.QualifiedName = "dba." + newTable.Name;
    // add a field to this new Table
    newTable.DataFields.Add(AddDbField(linkTable.DataField, newTable.Alias));
    // join this table to another one named sourceTableAlias, using linkFields TableLink
    tableLink = new TableLink();
    tableLink.SourceTableAlias = sourceTableAlias;
    tableLink.TargetTableAlias = newTable.Alias;
    tableLink.JoinType = CrTableJoinTypeEnum.crTableJoinTypeEqualJoin;
    Strings sourceFields = new Strings();
    Strings targetFields = new Strings();
    for (int i = 0; i + 1 < linkTable.LinkFields.Length; i += 2)
    sourceFields.Add(linkTable.LinkFields[i]); targetFields.Add(linkTable.LinkFields[i + 1]);
    tableLink.SourceFieldNames = sourceFields;
    tableLink.TargetFieldNames = targetFields;
    TableLinks tableLinks = new TableLinks();
    tableLinks.Add(tableLink); _report.ReportClientDocument.DatabaseController.AddTable(newTable, tableLinks);
    _report.ReportClientDocument.DatabaseController.VerifyTableConnectivity(newTable);
    //AddFieldToReport("{" + newTable.Alias + "." + linkTable.DataField + "}");
    return newTable;
    This is the resulting query SELECT "Article"."ArtId", "Article"."ArtDescr", "ArticleGroup"."AgDescr1", "Article"."ArtPurchLevel", "Article"."ArtMaximum", "Article"."ArtAbc", "Article"."ArtContext", "Article"."ArtPurchPrice", "Article"."ArtServOutUnt", "ArticleSite"."ArtsSitId", "Article"."ArtRecStatus"
    FROM  (dba.Article "Article" LEFT OUTER JOIN dba.ArticleGroup "ArticleGroup" ON "Article"."ArtAgId"="ArticleGroup"."AgId")
    INNER JOIN "10_78_00"."dba"."ArticleSite" "ArticleSite" ON "Article"."ArtId"="ArticleSite"."ArtsPurch" WHERE  "Article"."ArtContext"=1 AND ("ArticleSite"."ArtsSitId"='63'
    OR "ArticleSite"."ArtsSitId"='64') AND "Article"."ArtRecStatus">=0 ORDER BY "Article"."ArtId"
    the link field artspurch is not the field I declared . It happens to be the first column of the table ArticleSite. This seems to be a bug. has anyone ever experienced anything like this?
    ( Fixed the formatting )
    Message was edited by: Don Williams

    Hi Henk,
    What was the SQL before you added the table?
    I reformatted your code but you may want to confirms it correct or simply copy it into Notepad and then paste into this post.
    I find the easiest way to confirm is ad the table and joins in CR Designer first and then look at what Debug mode returns using this:
    btnReportObjects.Text = "";
    string crJoinOperator = "";
    foreach (CrystalDecisions.ReportAppServer.DataDefModel.TableLink rasTableLink in rptClientDoc.DataDefController.Database.TableLinks)
        //get the link properties
        btnCount.Text = "";
        int y = rptClientDoc.DataDefController.Database.TableLinks.Count;
        btnCount.Text = y.ToString();
        string crJoinType = "";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeAdvance)
            crJoinType = "-> Advanced ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeEqualJoin)
            crJoinType = "-> = ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeGreaterOrEqualJoin)
            crJoinType = "-> >= ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeGreaterThanJoin)
            crJoinType = "-> > ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeLeftOuterJoin)
            crJoinType = "-> LOJ ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeLessOrEqualJoin)
            crJoinType = "-> <= ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeLessThanJoin)
            crJoinType = "-> < ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeNotEqualJoin)
            crJoinType = "-> != ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeOuterJoin)
            crJoinType = "-> OJ ->";
        if (rasTableLink.JoinType == CrTableJoinTypeEnum.crTableJoinTypeRightOuterJoin)
            crJoinType = "-> ROJ ->";
        textBox1 = "Only gets Link type:" + rasTableLink.SourceTableAlias.ToString() + "." + rasTableLink.SourceFieldNames[0].ToString() +
            crJoinOperator + "." + crJoinType + rasTableLink.TargetTableAlias.ToString() + "." + rasTableLink.TargetFieldNames[0].ToString() + "\n";
        btnReportObjects.Text += textBox1;
        btnReportObjects.AppendText(" 'End' \n");
    There are some join types RAS is not capable of.
    Attach the report before and after you manually add the join and I'll see if I can get it to work also.
    Don
    ( PS - use the Advanced option to attach files and rename the reports to *.txt. )

  • Added 3 tables in Entity framework

    I added 3 tables to my EF: 2 tables for data and the third for connection between them (= 3 columns in this table, first ID as
    the primary key, and the second and the third are FK to the other two tables).
    But the problem is that the third table was added with just the first column (= ID).
    Why is that?

    Hello shirley111,
    >>But the problem is that the third table was added with just the first column (= ID).
    Could you please tell which approach you are using, code first, model first or database first? And how do you define these three tables? Please also share them with us. Currently, we cannot understand what exactly happens on your side.
    Here are some information about many to many relationship in Entity Framework which might be helpful(from your description, it seems that you are trying to make a * to * relationship):
    Configure Many-to-Many relationship using Code First Approach
    Entity Relationships
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Steps to Increase / adding New Table Space using BR TOOLS

    Hi
    Can Anyone Tell me the Step by Step Process for Increasing / Adding New Table Space using BRTOOLS.
    Any Demos/Blogs will be appreciated.
    Thanks in Advance.
    Rg
    Dan

    Hi Dan,
    <u><b>Adding a datafile using BRTOOLS</b></u>
    1) su – <b>ora<sid></b>
    2) start <b>brtools</b>
    3) Select option <b>2 -- Space management</b>
    4) Select option <b>1 -- Extend tablespace</b>
    5) Select option <b>3 --Tablespace name (specify tablespace name) and say continue(c- cont)</b>
    6) Select option <b>3 – New data file to be added and return</b>
    7) Select option <b>5 -- Size of the new file in MB (specify the size of the file) and say continue</b>
    regards,
    kanthi

  • StackOverflowError after adding a table to a TopLink Map

    Hello,
    I am really puzzled by the next problem. After adding a table (Customer) to an existing TopLink Map, I get the same kind of error for every query in the project that I use.
    ERROR J2EE EJB8006 [CustomerToplinkTestPublicFacade:public java.util.List com.companyname.toplinktest.model.CustomerToplinkTestPublicFacadeBean.findCustomersByCompany(java.lang.String,java.lang.String)] exception occurred during method invocation: javax.ejb.EJBException: java.lang.StackOverflowError
    I get this with every page and every query, just change the name “findCustomersByCompany” to the name of the named query. Otherwise all pages seems to have the correct behaviour Removing the Customer-table from the application solved all problems, and they reoccurred after adding the table again.
    I have no clue why this happens, the only thing that might be useful is the fact that the Customer-table is also a part of a database view which I already use.
    … but why would that cause errors on queries it has absolutely no relation to…
    Kind regards,
    Nemata

    hello,
    another update on my testcases. I have used the following procedure to narrow down the source of the problem.
    First I create one or more TopLink pojo's based on my database tables and views, add them to a session bean and create the data controls. I'm always working with the default named queries (selectAll).
    Then I create a .jspx file, drag and drop a data control from the data control palette to create an ADF table with the defaults...
    and run... with one of two outcomes.
    I either get all the data from the table (correct) or I get a message "no rows yet" and an error message in the log window "2006-05-04 12:37:40.214 ERROR J2EE EJB8006 [testCustomerSession:public java.util.List model.testCustomerSessionBean.findAllCompany()] exception occurred during method invocation: javax.ejb.EJBException: java.lang.StackOverflowError"
    This is an overview of the testing I have done:
    Objects created | ADF table | Error
    Customer | Customer | Yes
    Company | Company | No
    Customer and Company | Company | Yes
    Company and ViewOfCustomer | Company | No
    Company and ViewOfCustomer | ViewOfCustomer | No
    Company and Person | Company | No
    ViewOfCustomer is a database view with the same data as the Customer. So the table Customer seems to cause the problem.
    Does anybody have an idea why a database table might cause such distinct problems ?
    Kind regards,
    Nemata

  • Adding nested table to object table

    if I alter an object type and add a nested table to it, there seem to be no syntax to add "STORE AS" clause for that nested table in the object table containing the altered object type. E.G.:
    ALTER TYPE fd_dao ADD ATTRIBUTE Own_Name Own_Name_ntt;
    where Own_Name_ntt is a nested table type, then
    ALTER TABLE FD_DOT NESTED TABLE Own_Name STORE AS Own_Name_ntab;
    does not work but the table FD_DOT can not be used since it lacks the storage for the newly added nested table.

    Check your syntax.
    CREATE TYPE Own_Name_ntt AS TABLE OF VARCHAR2(25);
    CREATE TYPE fd_dao AS OBJECT
    (col1        date
    ,col2        number);
    CREATE TABLE fd_dot(cola varchar2(10)
                       ,colb date);
    ALTER TYPE fd_dao ADD ATTRIBUTE Own_Name Own_Name_ntt;
    ALTER TABLE FD_DOT ADD (Own_Name Own_Name_ntt)
        NESTED TABLE Own_Name STORE AS Own_Name_ntab;
    SQL> CREATE TYPE Own_Name_ntt AS TABLE OF VARCHAR2(25);
      2  /
    Type created.
    SQL>
    SQL> CREATE TYPE fd_dao AS OBJECT
      2   (col1        date
      3   ,col2        number);
      4  /
    Type created.
    SQL>
    SQL> CREATE TABLE fd_dot(cola varchar2(10)
      2                     ,colb date);
    Table created.
    SQL>
    SQL> ALTER TYPE fd_dao ADD ATTRIBUTE Own_Name Own_Name_ntt;
    Type altered.
    SQL>
    SQL> ALTER TABLE FD_DOT ADD (Own_Name Own_Name_ntt)
      2      NESTED TABLE Own_Name STORE AS Own_Name_ntab;
    Table altered.
    SQL> desc fd_dot
    Name                                                                          Null?    Type
    COLA                                                                                   VARCHAR2(10)
    COLB                                                                                   DATE
    OWN_NAME                                                                               OWN_NAME_NTT
    SQL> desc fd_dao
    Name                                                                          Null?    Type
    COL1                                                                                   DATE
    COL2                                                                                   NUMBER
    OWN_NAME                                                                               OWN_NAME_NTT
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, Oracle Label Security, OLAP and Data Mining options
    SQL> CREATE TYPE Own_Name_ntt AS TABLE OF VARCHAR2(25);
      2  /
    Type created.
    SQL>
    SQL> CREATE TYPE fd_dao AS OBJECT
      2   (col1        date
      3   ,col2        number);
      4  /
    Type created.
    SQL>
    SQL> CREATE TABLE fd_dot(cola varchar2(10)
      2                     ,colb date);
    Table created.
    SQL>
    SQL> ALTER TYPE fd_dao ADD ATTRIBUTE Own_Name Own_Name_ntt;
    Type altered.
    SQL>
    SQL> ALTER TABLE FD_DOT ADD (Own_Name Own_Name_ntt)
      2      NESTED TABLE Own_Name STORE AS Own_Name_ntab;
    Table altered.
    SQL> desc fd_dao
    Name                                                                          Null?    Type
    COL1                                                                                   DATE
    COL2                                                                                   NUMBER
    OWN_NAME                                                                               OWN_NAME_NTT
    SQL> desc fd_dot
    Name                                                                          Null?    Type
    COLA                                                                                   VARCHAR2(10)
    COLB                                                                                   DATE
    OWN_NAME                                                                               OWN_NAME_NTT
    SQL> disconnect
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.3.0 - Production

  • Adding condition table into pricing report-reg

    Hi,
    We have a requirement to add additional  condition tables in an existing pricing report. Is there a way to include the condition tables  through V/LB or we have to delete the existing pricing report and create the new one with the required tables. Please suggest..
    Thanks in advance
    Tajudeen S.

    Hi Tajuddin,
    Unfortunately, there is no other way except to delete the report and create a new one by adding the table.
    Regards
    Nikhilesh

  • Adding Alias Tables

    2 Questions:
    I want to combine my member names and alias table (default) into a new alias table such that the new alias table would be (Member Name - Alias Default). Is there a way to do this through a script ?
    Also currently we only have 1 alias table, default, will there be any considerable performance impacts to adding an addition alias table ?

    If this is a planning application, alias tables have to be created with in the planning web and upon refresh it will be pushed to essbase. I dont think you can do this using a script for planning. Even if you create these tables directly in essbase, those will be dropped during the application refresh.
    If it was an " Essbase-only " application you can import/export tables using maxl/esscmd.
    Adding alias table will not shown a significant impact on performance. You can have upto 9 additional alias tables.
    Hope this helps!
    Nra

  • Adding to Tables in CS4

    I'm having some issues with adding to tables in my files. These are pre-existing files i'm being asked to edit, and there are no table or cell styles set up. I feel dumb asking this, as i'm sure it's a simple answer, but tables are one area of Indesign I haven't explored all that much.
    I have tables that look like this- here's a working and preview view sample:
    My issue is i'm having to insert new locations/dates into the tables- you can see where i've tried- but I can't get the formatting the same, with the two column setup with "Event Date" and then the course name. I can't just copy and paste a section of table- or at least any method I try doesn't work, I just end up pasting into a cell. There are no styles set up, and i'm not sure how to replicate exactly what's there. I'm not an Indesign newbie, but I am a newbie to using tables- my work just hasn't called for it much in the past. Help!? There's got to be a simple solution...

    When I'm doing tables like that
    I'll insert new rows, then I'll Right Click (cmd click on mac) and then choose "Unmerge Cells"
    I can then highlight a range of other cells (as long as it's the same row count) If I select two rows to  copy then I make sure i have 2 unmerged rows to paste into.
    Then I copy into those by highlighting the empting cells and pasting.
    Usually works for me.

  • Very urjent (What is the procedure for adding a table documentation to IMG)

    Hi abapers,
    It was very urjent,
    What is the procedure for adding a table documentation to IMG entries. 
    (It does not have "deletion" information, but there is a section on making changes to Z tables and then updating the IMG, which presumably could be expanded for deletion of objects.)
    I having the procedure, But that is not clear.
    Can any body tell me step by step.
    With regards.

    Hi,
    Assign IMG Documentation
    Prerequisites
    You have opened the IMG structure in change mode and created an IMG activity.
    Procedure
    Choose the Document tab in the Assigned objects group box.
    If you want to create a new document for the IMG activity, enter a name for the document and choose Create.
    The name can contain alphanumeric characters and the special character "_".
    You go to the text editor. Specify a package class when you save the text. You return to the previous initial screen with Back.
    To use an existing document, choose the Assign other document pushbutton to the right of the document name. Choose an existing document and choose Copy.
    Save the changes with IMG activity  Save.
    Regards,
    Renjith Michael.

  • Creating Tables for COPA ( Non standard)

    Dear SAP Gurus,
    Pls adivse what is the easiest way to create non-standard tables for COPA ??
    In addition to CE1XXXX; CE2XXXX; CE3XXXX; CE4XXXX & also COEP; COEJ; COSS; COSP;  We need to create additional tables to store the data and then perform certain calcuations before taking forward to COPA reports.
    Appreciate early response.
    Regards
    AJA

    I don't think that CO-PA allows you to create non-SAP CO-PA tables. Not sure what you are trying to do. The tables used by CO-PA are standard and they will be automatically generated based on the configuration of the operating concern. I guess, you could create non-SAP tables but not aware of any functionality that will populate those tables unless you create some program code to fill them with data. You can add deriviation rules to derive charateristics from other charateristic but that is standard functionality that can be configured within standard CO-PA.

  • Codition Tables in COPA

    Hello,
             I need to know what are condition tables in copa and how they are tied up with condition types.
    Nettem

    Hi
    The following T.codes may be of use
    KE41 - Create condition
    KE42 - Change condition
    KE43 - Display condition
    KE49 - Change condition tables
    KE4A - Change condition table
    <b>KE4B - Display condition table</b>
    KE4C - Copy condition
    Assign points if useful
    Regards
    Aravind

  • Problem adding a table to scrollpane

    Hi:
    I have created a JTable that I want to be in a scrollpane. When I tried to add this JTable to a scrollpane I get a null pointer error at execution time. But when I add this table directly to the frame I get no error at execution time.
    Here is my code:
    import java.awt.*;
    import java.awt.event .*;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.io.*;
    import javax.swing.table.*;
    import javax.swing.BorderFactory;
    import javax.swing.border.Border;
    import java.net.*;
    import java.util.regex.*;
    // METHODS
    // =======
    // private String returnSelectedString( int col ))
    public class DialogFrame extends JFrame
    {     //===================
    //MEMBER VARIABLES
    //===================
    public JLabel topClassifiedLabel, bottomClassifiedLabel,printerCountLabel,defaultPrinterLabel ;
    public JPanel panelForLabel,topClassificationPanel , bottomClassificationPanel, SecBotPanel, ClassificationPanel,Classification_botPanel,firstTopPanel, titlePanel,titlePanel2,displayPanel,labelPanel,buttonPanel;
    public DefaultListModel listModel;
    public final String screenTitle = "Printer Configuration "
    + " CSS - 105";
    public JLabel localDisplay = new JLabel("Local: Printer directly connected to this computer");
    public JLabel remoteDisplay = new JLabel("Remote: Printer connected to another computer");
    public JLabel networkDisplay = new JLabel("Network: Printer connected to the LAN");
    public char hotKeys[] = { 'A', 'D', 'Q','T','R','I','Q','H' };
    public JPanel ConnectTypePanel = null, printCountPanel;
    public JScrollPane tabScrollPane;
    public JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,TitleLabel;
    public JButton addPrinterButton,setDefaultButton,restartPrintSystemButton, deletePrinterButton, displayQueueButton,
    ToggleBannerButton, RestartPrintSystemButton, InstallOpenPrintButton, QuitButton, continueButton,CancelButton,HelpButton;
    public Vector columnNames;
    public String line2 = "";
    public addPrinterDialog aPDialog;
    public printQueueDialog dQDialog;
    public String nextElement,name,Type,Interface,Description,Status,Queue,BannerPage;
    public JRadioButton networkButton, localButton, remoteButton;
    public JLabel nameLabel, descriptionLabel, modelLabel,ClassificationLabel,ClassificationLabel_bot,setL,defaultL;
    public JTextField nameTextField, descriptionTextField, modelTextField;
    private int printerCount = 0;
    static DefaultTableModel model;
    public JTable table;
    //=======================//
    //**Constructor
    //=========================//
    public DialogFrame()
    createTable();
    public void createTable()
    defaultPrinterLabel = new JLabel();
    printerCountLabel = new JLabel();
    //COLUMN FOR TABLE
    columnNames = new Vector();
    columnNames.add("Name");
    columnNames.add("Type");
    columnNames.add("Interface");
    columnNames.add("Description");
    columnNames.add("Status");
    columnNames.add("Queue");
    columnNames.add("BannerPage");
    Vector tableRow = new Vector();
    //tableRow = executeScript("perl garb.pl");
    // tableRow = executeScript("perl c:\\textx.pl");
    model = new DefaultTableModel( tableRow, columnNames ){
    public boolean isCellEditable(int row,int col) {
    return false;
    public Dimension getPreferredScrollableViewportSize() {
    return getPreferredSize();
    table = new JTable(model);
    JTableHeader header = table.getTableHeader();
    TableColumnModel colmod = table.getColumnModel();
    for (int i=0; i < table.getColumnCount(); i++)
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setHorizontalAlignment(SwingConstants.CENTER);
    colmod.getColumn(i).setCellRenderer(renderer);
    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    table.setShowGrid( false );
    table.getTableHeader().setReorderingAllowed( false );
    table.setIntercellSpacing(new Dimension(0,0) );
    table.addMouseListener( new MouseAdapter () {
    public void mouseClicked( MouseEvent e) {
    if ((e.getModifiers() & InputEvent.BUTTON1_MASK) !=0)
    printSelectCell(table);
    this.setSize(900,900);
    //========================================//
    // Technique for centering a frame on the screen
    //===========================================//
    Dimension frameSize = this.getSize();
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    this.setLocation((screenSize.width - frameSize.width)/2,
    (screenSize.height - frameSize.height)/2);
    setResizable(false);
    // CREATE A FEW PANELS
    firstTopPanel = new JPanel();
    BoxLayout box = new BoxLayout(firstTopPanel, BoxLayout.Y_AXIS);
    firstTopPanel.setLayout(box);
    topClassificationPanel = new JPanel();
    topClassificationPanel.setBackground(new Color(45,145,71));
    bottomClassificationPanel = new JPanel();
    bottomClassificationPanel.setBackground(new Color(45,145,71));
    SecBotPanel = new JPanel();
    SecBotPanel.setLayout(new BorderLayout());
    buttonPanel = new JPanel();
    buttonPanel.setLayout(new GridLayout(1,8));
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
    buttonPanel.setBackground(new Color(170,187,119));
    panelForLabel = new JPanel();
    // panelForLabel.setBackground( Color.white );
    //Border etchedBorder = BorderFactory.createEtchedBorder();
    printerCountLabel.setHorizontalAlignment(SwingConstants.LEFT);
    printerCountLabel.setPreferredSize(new Dimension(700, 20));
    //printerCountLabel.setBorder(etchedBorder);
    printerCountLabel.setForeground(Color.black);
    defaultPrinterLabel.setHorizontalAlignment(SwingConstants.RIGHT);
    defaultPrinterLabel.setText("Default Printer: " + name);
    defaultPrinterLabel.setForeground(Color.black);
    panelForLabel.add(printerCountLabel);
    panelForLabel.add(defaultPrinterLabel);
    titlePanel = new JPanel( );
    titlePanel.setBackground( Color.white );
    ConnectTypePanel = new JPanel();
    ConnectTypePanel.setBackground(new Color(219,223,224));
    ConnectTypePanel.setLayout( new GridLayout(3,1) );
    //CREATE A FEW LABELS
    topClassifiedLabel = new JLabel("UNCLASSIFIED", SwingConstants.CENTER );
    topClassifiedLabel.setForeground(Color.white);
    bottomClassifiedLabel = new JLabel("UNCLASSIFIED", SwingConstants.CENTER );
    bottomClassifiedLabel.setForeground(Color.white);
    TitleLabel = new JLabel( screenTitle, SwingConstants.CENTER );
    //ADD LABELS TO PANELS
    topClassificationPanel.add( topClassifiedLabel );
    bottomClassificationPanel.add( bottomClassifiedLabel );
    titlePanel.add( TitleLabel, BorderLayout.CENTER );
    ConnectTypePanel.add(localDisplay );
    ConnectTypePanel.add(remoteDisplay );
    ConnectTypePanel.add(networkDisplay );
    //Create the scrollpane and add the table to it.
    tabScrollPane = new JScrollPane(table);
    JPanel ps = new JPanel();
    ps.add(tabScrollPane);
    getContentPane().setLayout(
    new BoxLayout( getContentPane(), BoxLayout.Y_AXIS ) );
    getContentPane().add(firstTopPanel);
    getContentPane().add(panelForLabel);
    getContentPane().add(header);
    getContentPane().add(ps);//contain table
    getContentPane().add(SecBotPanel);
    WindowListener w = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    DialogFrame.this.dispose();
    System.exit(0);
    this.addWindowListener(w);
    //==================================//
    // AddPrinterButton
    //==================================//
    addPrinterButton = new JButton();
    addPrinterButton.setLayout(new GridLayout(2, 1));
    l1 = new JLabel("Add", JLabel.CENTER);
    l1.setForeground(Color.black);
    l2 = new JLabel("Printer", JLabel.CENTER);
    l2.setForeground(Color.black);
    addPrinterButton.add(l1);
    addPrinterButton.add(l2);
    addPrinterButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    //(aPDialog == null) // first time
    aPDialog = new addPrinterDialog(DialogFrame.this);
    aPDialog.setLocationRelativeTo(null);
    aPDialog.pack();
    aPDialog.show(); // pop up dialog
    //======================================
    // DeletePrinterButton
    //=====================================
    deletePrinterButton = new JButton();
    deletePrinterButton.setLayout(new GridLayout(2, 1));
    l1 = new JLabel("Delete", JLabel.CENTER);
    l1.setForeground(Color.black);
    l2 = new JLabel("Printer", JLabel.CENTER);
    l2.setForeground(Color.black);
    deletePrinterButton.add(l1);
    deletePrinterButton.add(l2);
    deletePrinterButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    int sr = table.getSelectedRow();
    if (sr == -1)
    JOptionPane.showMessageDialog(null, "You have not selected a printer for this operation","NOSELECT",JOptionPane.INFORMATION_MESSAGE);
    else
    name = returnSelectedString(0);
    int ans = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete printer " + name + "?","Delete",JOptionPane.YES_NO_OPTION);
    switch(ans) {
    case JOptionPane.NO_OPTION:
    return;
    case JOptionPane.YES_OPTION:
    // String machineName = returnSelectedString(0);
    int rowNumber = table.getSelectedRow();
    model.removeRow(rowNumber);
    //TiCutil.exe("/usr/lib/lpadmin -x " + machineName);
    decreasePrinterCount();
    JOptionPane.showMessageDialog(null, "Printer " + name + " have been successfully deleted","SUCCEED",JOptionPane.INFORMATION_MESSAGE);
    return;
    //==============================//
    //DisplayQueuePrinter //
    //================================//
    displayQueueButton = new JButton();
    displayQueueButton.setLayout(new GridLayout(2, 1));
    l5 = new JLabel("Display", JLabel.CENTER);
    l5.setForeground(Color.black);
    l6 = new JLabel("Queue", JLabel.CENTER);
    l6.setForeground(Color.black);
    displayQueueButton.add(l5);
    displayQueueButton.add(l6);
    displayQueueButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    Vector tab = new Vector();
    int sr = table.getSelectedRow();
    if (sr == -1)
    JOptionPane.showMessageDialog(null, "You have not selected a printer for this" +
    "operation","NOSELECT",JOptionPane.INFORMATION_MESSAGE);
    else
    name = returnSelectedString(0);
    //PASS TABLE HERE
    /*tab = executeScript("lpstat -o " + name + " | sed \'s/ on$//\'");
    System.out.println("lpstat -o " + name + " | sed \'s/ on$//\'");
    dQDialog = new printQueueDialog(DialogFrame.this, name, tab);
    dQDialog.setLocationRelativeTo(null);
    dQDialog.pack();
    dQDialog.show(); // pop up dialog */
    //===================================
    // SetDefaultButton
    //================================//
    setDefaultButton = new JButton();
    setDefaultButton.setLayout(new GridLayout(2, 1));
    setL = new JLabel("Set", JLabel.CENTER);
    setL.setForeground(Color.black);
    defaultL = new JLabel("Default", JLabel.CENTER);
    defaultL.setForeground(Color.black);
    setDefaultButton.add(setL);
    setDefaultButton.add(defaultL);
    setDefaultButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    int sr = table.getSelectedRow();
    if (sr == -1)
    JOptionPane.showMessageDialog(null, "You have not selected a printer for this operation","NOSELECT",JOptionPane.INFORMATION_MESSAGE);
    else
    name = returnSelectedString(0);
    JOptionPane.showMessageDialog(null, "printer " + name + " is now the default.","Succeed",JOptionPane.INFORMATION_MESSAGE);
    defaultPrinterLabel.setText("Default Printer: " + name);
    //==============================//
    // ToggleBannerButton
    //==============================//
    ToggleBannerButton = new JButton();
    ToggleBannerButton.setLayout(new GridLayout(2, 1));
    l7 = new JLabel("Toggle", JLabel.CENTER);
    l7.setForeground(Color.black);
    l8 = new JLabel("Banner", JLabel.CENTER);
    l8.setForeground(Color.black);
    ToggleBannerButton.add(l7);
    ToggleBannerButton.add(l8);
    ToggleBannerButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    int sr = table.getSelectedRow();
    System.out.println("sr :" + sr);
    if (sr == -1)
    JOptionPane.showMessageDialog(null, "You have not selected a printer for this operation","NOSELECT",JOptionPane.INFORMATION_MESSAGE);
    else
    String banner = returnSelectedString(6);
    name = returnSelectedString(0);
    String machineName = returnSelectedString(0);
    Type = returnSelectedString(1);
    if ( !(Type.equals("Remote")) )
    if( banner.equals("Yes") )
    JOptionPane.showMessageDialog(null,"Banner page will NOT be printed for printer "+ name ,"Succeed",JOptionPane.INFORMATION_MESSAGE);
    //TiCutil.exe("sed -e 's/^BANNER=\"yes\"/BANNER=\"\"/' /etc/lp/interfaces/" + machineName + " > /tmp/delete.txt" );
    //TiCutil.exe("mv /tmp/delete.txt /etc/lp/interfaces/" + machineName);
    table.setValueAt("No",sr,6);
    DefaultTableModel model = (DefaultTableModel)table.getModel();
    model.fireTableCellUpdated(sr,6);
    table.requestFocus();
    else
    JOptionPane.showMessageDialog(null,"Banner page WILL be printed for printer "+ name ,"Succeed",JOptionPane.INFORMATION_MESSAGE);
    //TiCutil.exe("sed -e 's/^BANNER=\"\"/BANNER=\"yes\"/' /etc/lp/interfaces/" + machineName + " > /tmp/delete.txt");
    //TiCutil.exe("mv /tmp/delete.txt /etc/lp/interfaces/" + machineName);
    table.setValueAt("Yes",sr,6);
    DefaultTableModel model = (DefaultTableModel)table.getModel();
    model.fireTableCellUpdated(sr,6);
    table.requestFocus();
    else
    JOptionPane.showMessageDialog(null,"Operation failed system respond \n" + "was:\n" + "cannot toggle the banner page for a\n" + "REMOTE printer." ,"OPFAIL",JOptionPane.INFORMATION_MESSAGE);
    //==================================//
    // RestartPrintSystemButton
    //==================================//
    restartPrintSystemButton = new JButton();
    restartPrintSystemButton.setLayout(new GridLayout(2, 1));
    l3 = new JLabel("Restart Print", JLabel.CENTER);
    l3.setForeground(Color.black);
    l4 = new JLabel("System", JLabel.CENTER);
    l4.setForeground(Color.black);
    restartPrintSystemButton.add(l3);
    restartPrintSystemButton.add(l4);
    restartPrintSystemButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    //==============================
    // InstallOpenPrint
    //================================
    InstallOpenPrintButton = new JButton();
    InstallOpenPrintButton.setLayout(new GridLayout(2, 1));
    l11 = new JLabel("Install Open", JLabel.CENTER);
    l11.setForeground(Color.black);
    l12 = new JLabel("Print", JLabel.CENTER);
    l12.setForeground(Color.black);
    InstallOpenPrintButton.add(l11);
    InstallOpenPrintButton.add(l12);
    InstallOpenPrintButton.addActionListener(new ActionListener(){
    public void actionPerformed(ActionEvent event)
    int ans = JOptionPane.showConfirmDialog(null,"Are you sure you want to install OPENPrint?","Delete",JOptionPane.YES_NO_OPTION);
    switch(ans) {
    case JOptionPane.NO_OPTION:
    return;
    case JOptionPane.YES_OPTION:
    int cd,opinstall,banner_var,pwd;
    opinstall = runIt("open_print.ksh");
    banner_var = runIt("banner_var.ksh");
    System.out.println("opinstall: " + opinstall );
    System.out.println("banner_var: " + banner_var);
    if ( opinstall == 0 && banner_var == 0)
    JOptionPane.showMessageDialog(null, "OPENprint successfully added"
    ,"SUCCEED",JOptionPane.INFORMATION_MESSAGE);
    return;
    //==========================
    //QuitButton
    //============================
    QuitButton = new JButton("Quit");
    QuitButton.addActionListener (new ActionListener ()
    { public void actionPerformed (ActionEvent e){
    System.exit (0); }
    HelpButton = new JButton("Help");
    //ADD BUTTONS TO PANEL
    buttonPanel.add( addPrinterButton );
    buttonPanel.add( deletePrinterButton );
    buttonPanel.add( displayQueueButton );
    buttonPanel.add( setDefaultButton);
    buttonPanel.add( ToggleBannerButton );
    buttonPanel.add( restartPrintSystemButton );
    buttonPanel.add( InstallOpenPrintButton );
    buttonPanel.add( QuitButton );
    //buttonPanel.add( HelpButton );
    //END OF BUTTONS CREATION
    //ADD PANEL ON TO PANEL
    SecBotPanel.add(ConnectTypePanel, BorderLayout.CENTER);
    SecBotPanel.add(bottomClassificationPanel, BorderLayout.SOUTH);
    firstTopPanel.add(topClassificationPanel);
    firstTopPanel.add(titlePanel);
    firstTopPanel.add(buttonPanel);
    //===========================================================
    // METHODS
    //==========================================================
    public int runIt(String targetCode)
    int result = -1;
    try{
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec( targetCode );
    // Thread.sleep(20000);
    p.waitFor();
    result = p.exitValue();
    catch( IOException ioe )
    ioe.printStackTrace();
    catch( InterruptedException ie )
    ie.printStackTrace();
    return result;
    //====================================================
    public void increasePrinterCount()
    printerCount++;
    printerCountLabel.setText("Printer: " + printerCount);
    //===========================================================
    public void decreasePrinterCount()
    printerCount--;
    printerCountLabel.setText("Printer: " + printerCount);
    private String returnSelectedString( int col )
    int row = table.getSelectedRow();
    String word;
    //javax.swing.table.TableModel model = table.getModel();
    word =(String)model.getValueAt(row, col);
    return word; //return string
    //==============================================================================
    private Vector executeScript(String str)
    Vector tableOfVectors = new Vector();
    try{          
    String line;
    Process ls_proc = Runtime.getRuntime().exec(str);
    //get its output (your input) stream
    BufferedReader in = new BufferedReader( new InputStreamReader( ls_proc.getInputStream() ));
    //readLine reads in one line of text
    int k = 1, i = 0;
    //LOOK FOR THE "|"
    Pattern p = Pattern.compile(" ");
    while (( line = in.readLine()) != null)
    Vector data = new Vector();
    Matcher m = p.matcher(line);
    if(m.find() == true)//find " "
    line = line.replaceAll(" {2,}?", "|");
    //creates a new vector for each new line read in
    StringTokenizer t = new StringTokenizer(line,"|");
    while ( t.hasMoreTokens() )
    try
    nextElement = t.nextToken().trim();
    //add a string to a vector
    data.add(nextElement.trim());
    catch(java.util.NoSuchElementException nsx)
    System.out.println(nsx);
    tableOfVectors.add(data);
    //COUNT THE NUMBER OF PRINTER
    printerCount = k;
    printerCountLabel.setText("Printer: " + printerCount);
    k++;
    }//END OF WHILE
    in.close();
    }//END OF TRY
    catch (IOException e1) {
    System.err.println(e1);
    System.exit(1);
    return tableOfVectors;
    //==========================================================================================================
    private String getDefaultPrinter(String str)
    String groupStr = null;
    try{          
    String lin;
    Process ls_proc = Runtime.getRuntime().exec(str);
    BufferedReader in = new BufferedReader( new InputStreamReader( ls_proc.getInputStream() ));
    Pattern p2 = Pattern.compile("system default destination: (\\S+)");
    while (( lin = in.readLine()) != null)
    Matcher m2 = p2.matcher(lin);
    m2.reset(lin);
    if (m2.find() == true )
    groupStr = m2.group(1);
    in.close();
    catch (IOException e1) {
    System.err.println(e1);
    System.exit(1);
    return groupStr;
    //================================================================================
    public synchronized void clearTable()
    int numrows = model.getRowCount();
    for ( int i = numrows -1 ; i >= 0 ; i--)
    model.removeRow(i);
    //=======================================================================================================
    private void printSelectCell(JTable table )
    int numCols = table.getColumnCount();
    int row = table.getSelectedRow();
    System.out.println(row);
    javax.swing.table.TableModel model = table.getModel();
    for(int j=0;j < numCols; j++)
    System.out.println(" " + model.getValueAt(row,j));
    System.out.println();
    System.out.println("-----------------------------------------------");
    //CREATE ADD PRINTER DIALOG
    class addPrinterDialog extends JDialog
    public addPrinterDialog(JFrame owner)
    super(owner, "ap1", true);
    final ButtonGroup rbg = new ButtonGroup();
    JPane

    Ok  I have the table  on the page  I created a css with a background image called .search  How to I link that to the table so It shows the image
    I am only used to doing certain css items   Never didi this before
    THXS STeve

  • Error while setting up connection and adding database Tables

    Error 1
    The name 'My' does not exist in the current context
    C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    53 37
    DBCustomAction
    Error 2
    The name 'Interaction' does not exist in the current context
    C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    75 5
    DBCustomAction
    Error 3
    'System.Collections.Specialized.StringDictionary' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Collections.Specialized.StringDictionary' could be found (are you missing a using directive
    or an assembly reference?) C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    84 36
    DBCustomAction
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Configuration.Install;
    using System.Linq;
    using System.IO;
    using System.Reflection;
    using System.Data.SqlClient;
    namespace DBCustomAction
        [RunInstaller(true)]
        public partial class VbDeployInstaller : System.Configuration.Install.Installer
           System.Data.SqlClient.SqlConnection masterConnection = new System.Data.SqlClient.SqlConnection();
    public VbDeployInstaller() : base()
    //This call is required by the Component Designer.
    InitializeComponent();
    //Add initialization code after the call to InitializeComponent
    private string GetSql(string Name)
    try {
    // Gets the current assembly.
    Assembly Asm = Assembly.GetExecutingAssembly();
    // Resources are named using a fully qualified name.
    Stream strm = Asm.GetManifestResourceStream(Asm.GetName().Name + "." + Name);
    // Reads the contents of the embedded file.
    StreamReader reader = new StreamReader(strm);
    return reader.ReadToEnd();
    } catch (Exception ex) {
    throw ex;
    private void ExecuteSql(string DatabaseName, string Sql)
    System.Data.SqlClient.SqlCommand Command = new System.Data.SqlClient.SqlCommand(Sql, masterConnection);
    // Initialize the connection, open it, and set it to the "master" database
    masterConnection.ConnectionString = My.Settings.masterConnectionString;
    Command.Connection.Open();
    Command.Connection.ChangeDatabase(DatabaseName);
    try {
    Command.ExecuteNonQuery();
    } finally {
    // Closing the connection should be done in a Finally block
    Command.Connection.Close();
    protected void AddDBTable(string strDBName)
    try {
    // Creates the database.
    ExecuteSql("master", "CREATE DATABASE " + strDBName);
    // Creates the tables.
    ExecuteSql(strDBName, GetSql("sql.txt"));
    } catch (Exception ex) {
    // Reports any errors and abort.
        Interaction.MsgBox("In exception handler: " + ex.Message);
    throw ex;
    public override void Install(System.Collections.IDictionary stateSaver)
    base.Install(stateSaver);
    AddDBTable(this.Context.Parameters.Item("dbname"));

    Hi osmniv,
    I tested the code, it has three error when compiling.
    Error 1 The name 'My' does not exist in the current context C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs 53 37 DBCustomAction
    In C#, there is no "My" key word, you need to use this method to use the settings.
    http://msdn.microsoft.com/en-us/library/aa730869(v=vs.80).aspx
    masterConnection.ConnectionString = Properties.Settings.Default.masterConnectionString;
    Error 2 The name 'Interaction' does not exist in the current context C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs 75 5 DBCustomAction
    You need to add these references to the project, Microsoft.VisualBasic,
    Microsoft.Expression.Interactions AND System.Windows.Interactivity.  Right click on the project, choose the add -> reference -> choose the references.
    then, add the using statement:
    using Microsoft.VisualBasic;
    Error 3
    'System.Collections.Specialized.StringDictionary' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'System.Collections.Specialized.StringDictionary' could be found (are you missing a using directive
    or an assembly reference?) C:\Users\levent 1\documents\visual studio 2010\Projects\DBCustomAction\DBCustomAction\VbDeployInstaller.cs
    84 36
    DBCustomAction
    In C#, you could use the Parameters["dbname"] to get the indexer of element directly.
    AddDBTable(this.Context.Parameters["dbname"]);
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • JDBC Sync - RFC Sync Scenario without BPM

    Hi Experts, I am using JDBC - RFC - JDBC Scnario. The concept is JDBC is reading data from tables and send data to RFC, after updating RFC is giving response to JDBC to update its tables. JDBC - RFC - JDBC. Is it possible to do this scnario without u

  • Validations on the screen fields in a module pool program

    Hi all i am creating a sales order against a purchase order ,i am selecting a PO click on a button to call another screen which has all the mandatory fields of the SO i want validations on the screen fields or the input fields as when i enter the hea

  • BEA with Apache

    Can the BEA web service engine be uses with Apache web server?

  • Link bug- LATEST_VENDOR_XML not found

    The Link software is trying to download the following file. https://cs.websl.blackberry.com/cs/cs/LATEST_VENDOR_XML Results in 404 HTTP Status 404 - type Status report message description The requested resource () is not available.

  • Ora-1555 while taking export

    Hi Guys, I am getting the below error while taking the export: EXP-00008: ORACLE error 1555 encountered ORA-01555: snapshot too old: rollback segment number 3 with name "_SYSSMU3$" too small EXP-00056: ORACLE error 1555 encountered ORA-01555: snapsho