Copy contents of a txt file into a transport request

I am implementing the steps of the 990534 note.
The note says "Create a new transport request (transaction SE09) in the source client of your Solution Manager system. Unpack file SOLMAN40_MOPZ_TTYP_SLMO_000.zip, which is attached to this note. Copy the contents of the SOLMAN40_MOPZ_TTYP_SLMO_000.txt file into the transport request."
can anyone tell me how can I copy the contents of a txt file into a transport request?

Hello,
I don't know the OSS note, but I think they mean, that you have to go into the object list of your transport (in transaction SE09), switch to change mode and insert the objects from the text file.
I guess the text file looks like:
R3TR PROG xyz
R3TR TABL abc
Best regards
Stephan

Similar Messages

  • Add .txt files into .zip file

    Hello friends,
    Any buddy knows how to add ".txt" files into ".zip" format through the ABAP code. 
    Thanks in advance.

    Hi Murali,
    You can use the method in the class CL_ABAP_GZIP to zip your file and then download it using GUI_DOWNLOAD.
    data: zip type ref to cl_abap_zip,
          result type xstring.
    create object zip.
    zip->add( name = some_file content = content ).
    result = zip->save( ).
    Also you can check this thread as well.
    How to Download data in Zip folder
    Re: UNZIP file from ABAP
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Problem reading .txt-file into JTable

    My problem is that I�m reading a .txt-file into a J-Table. It all goes okay, the FileChooser opens and the application reads the selected file (line). But then I get a Null Pointer Exception and the JTable does not get updated with the text from the file.
    Here�s my code (I kept it simple, and just want to read the text from the .txt-file to the first cell of the table.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.lang.*;
    import java.io.*;
    public class TeamTable extends JFrame implements ActionListener, ItemListener                {
    static JTable table;
         // constructor
    public TeamTable()                {
    super( "Invoermodule - Team Table" );
    setSize( 740, 365 );
              // setting the rownames
    ListModel listModel = new AbstractListModel()                     {
    String headers[] = {"Team 1", "Team 2", "Team 3", "Team 4", "Team 5", "Team 6", "Team 7", "Team 8", "Team 9",
    "Team 10", "Team 11", "Team 12", "Team 13", "Team 14", "Team 15", "Team 16", "Team 17", "Team 18"};
    public int getSize() { return headers.length; }
    public Object getElementAt(int index) { return headers[index]; }
              // add listModel & rownames to the table
              DefaultTableModel defaultModel = new DefaultTableModel(listModel.getSize(),3);
              JTable table = new JTable( defaultModel );
              // setting the columnnames and center alignment of table cells
              int width = 200;
              int[] vColIndex = {0,1,2};
              String[] ColumnName = {"Name Team", "Name Chairman", "Name Manager"};
              TableCellRenderer centerRenderer = new CenterRenderer();          
              for (int i=0; i < vColIndex.length;i++)          {
                             table.getColumnModel().getColumn(vColIndex).setHeaderValue(ColumnName[i]);
                             table.getColumnModel().getColumn(vColIndex[i]).setPreferredWidth(width);
                             table.getColumnModel().getColumn(vColIndex[i]).setCellRenderer(centerRenderer);
              table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
              // force the header to resize and repaint itself
              table.getTableHeader().resizeAndRepaint();
              // create single component to add to scrollpane (rowHeader is JList with argument listModel)
              JList rowHeader = new JList(listModel);
              rowHeader.setFixedCellWidth(100);
              rowHeader.setFixedCellHeight(table.getRowHeight());
              rowHeader.setCellRenderer(new RowHeaderRenderer(table));
              // add to scroll pane:
              JScrollPane scroll = new JScrollPane( table );
              scroll.setRowHeaderView(rowHeader); // Adds row-list left of the table
              getContentPane().add(scroll, BorderLayout.CENTER);
              // add menubar, menu, menuitems with evenlisteners to the frame.
              JMenuBar menubar = new JMenuBar();
              setJMenuBar (menubar);
              JMenu filemenu = new JMenu("File");
              menubar.add(filemenu);
              JMenuItem open = new JMenuItem("Open");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem exit = new JMenuItem("Exit");
              open.addActionListener(this);
              save.addActionListener(this);
              exit.addActionListener(this);
              filemenu.add(open);
              filemenu.add(save);
              filemenu.add(exit);
              filemenu.addItemListener(this);
    // ActionListener for ActionEvents on JMenuItems.
    public void actionPerformed(ActionEvent e) {       
         String open = "Open";
         String save = "Save";
         String exit = "Exit";
              if (e.getSource() instanceof JMenuItem)     {
                   JMenuItem source = (JMenuItem)(e.getSource());
                   String x = source.getText();
                        if (x == open)          {
                             System.out.println("open file");
                        // create JFileChooser.
                        String filename = File.separator+"tmp";
                        JFileChooser fc = new JFileChooser(new File(filename));
                        // set default directory.
                        File wrkDir = new File("C:/Documents and Settings/Erwin en G-M/Mijn documenten/Erwin/Match Day");
                        fc.setCurrentDirectory(wrkDir);
                        // show open dialog.
                        int returnVal =     fc.showOpenDialog(null);
                        File selFile = fc.getSelectedFile();
                        if(returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("You chose to open this file: " +
                   fc.getSelectedFile().getName());
                        try          {
                             BufferedReader invoer = new BufferedReader(new FileReader(selFile));
                             String line = invoer.readLine();
                             System.out.println(line);
                             // THIS IS WHERE IT GOES WRONG, I THINK
                             table.setValueAt(line, 1, 1);
                             table.fireTableDataChanged();
                        catch (IOException ioExc){
                        if (x == save)          {
                             System.out.println("save file");
                        if (x == exit)          {
                             System.out.println("exit file");
    // ItemListener for ItemEvents on JMenu.
    public void itemStateChanged(ItemEvent e) {       
              String s = "Item event detected. Event source: " + e.getSource();
              System.out.println(s);
         public static void main(String[] args)                {
              TeamTable frame = new TeamTable();
              frame.setUndecorated(true);
         frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
              frame.addWindowListener( new WindowAdapter()           {
                   public void windowClosing( WindowEvent e )                {
         System.exit(0);
    frame.setVisible(true);
    * Define the look/content for a cell in the row header
    * In this instance uses the JTables header properties
    class RowHeaderRenderer extends JLabel implements ListCellRenderer           {
    * Constructor creates all cells the same
    * To change look for individual cells put code in
    * getListCellRendererComponent method
    RowHeaderRenderer(JTable table)      {
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    setHorizontalAlignment(CENTER);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    * Returns the JLabel after setting the text of the cell
         public Component getListCellRendererComponent( JList list,
    Object value, int index, boolean isSelected, boolean cellHasFocus)      {
    setText((value == null) ? "" : value.toString());
    return this;

    My problem is that I�m reading a .txt-file into a J-Table. It all goes okay, the FileChooser opens and the application reads the selected file (line). But then I get a Null Pointer Exception and the JTable does not get updated with the text from the file.
    Here�s my code (I kept it simple, and just want to read the text from the .txt-file to the first cell of the table.
    A MORE READABLE VERSION !
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    import java.lang.*;
    import java.io.*;
    public class TeamTable extends JFrame implements ActionListener, ItemListener                {
    static JTable table;
         // constructor
        public TeamTable()                {
            super( "Invoermodule - Team Table" );
            setSize( 740, 365 );
              // setting the rownames
            ListModel listModel = new AbstractListModel()                     {
                String headers[] = {"Team 1", "Team 2", "Team 3", "Team 4", "Team 5", "Team 6", "Team 7", "Team 8", "Team 9",
                "Team 10", "Team 11", "Team 12", "Team 13", "Team 14", "Team 15", "Team 16", "Team 17", "Team 18"};
                public int getSize() { return headers.length; }
                public Object getElementAt(int index) { return headers[index]; }
              // add listModel & rownames to the table
              DefaultTableModel defaultModel = new DefaultTableModel(listModel.getSize(),3);
              JTable table = new JTable( defaultModel );
              // setting the columnnames and center alignment of table cells
              int width = 200;
              int[] vColIndex = {0,1,2};
              String[] ColumnName = {"Name Team", "Name Chairman", "Name Manager"};
              TableCellRenderer centerRenderer = new CenterRenderer();          
              for (int i=0; i < vColIndex.length;i++)          {
                             table.getColumnModel().getColumn(vColIndex).setHeaderValue(ColumnName[i]);
                             table.getColumnModel().getColumn(vColIndex[i]).setPreferredWidth(width);
                             table.getColumnModel().getColumn(vColIndex[i]).setCellRenderer(centerRenderer);
              table.setFont(new java.awt.Font("Dialog", Font.ITALIC, 12));
              // force the header to resize and repaint itself
              table.getTableHeader().resizeAndRepaint();
              // create single component to add to scrollpane (rowHeader is JList with argument listModel)
              JList rowHeader = new JList(listModel);
              rowHeader.setFixedCellWidth(100);
              rowHeader.setFixedCellHeight(table.getRowHeight());
              rowHeader.setCellRenderer(new RowHeaderRenderer(table));
              // add to scroll pane:
              JScrollPane scroll = new JScrollPane( table );
              scroll.setRowHeaderView(rowHeader); // Adds row-list left of the table
              getContentPane().add(scroll, BorderLayout.CENTER);
              // add menubar, menu, menuitems with evenlisteners to the frame.
              JMenuBar menubar = new JMenuBar();
              setJMenuBar (menubar);
              JMenu filemenu = new JMenu("File");
              menubar.add(filemenu);
              JMenuItem open = new JMenuItem("Open");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem exit = new JMenuItem("Exit");
              open.addActionListener(this);
              save.addActionListener(this);
              exit.addActionListener(this);
              filemenu.add(open);
              filemenu.add(save);
              filemenu.add(exit);
              filemenu.addItemListener(this);
    // ActionListener for ActionEvents on JMenuItems.
    public void actionPerformed(ActionEvent e) {       
         String open = "Open";
         String save = "Save";
         String exit = "Exit";
              if (e.getSource() instanceof JMenuItem)     {
                   JMenuItem source = (JMenuItem)(e.getSource());
                   String x = source.getText();
                        if (x == open)          {
                             System.out.println("open file");
                        // create JFileChooser.
                        String filename = File.separator+"tmp";
                        JFileChooser fc = new JFileChooser(new File(filename));
                        // set default directory.
                        File wrkDir = new File("C:/Documents and Settings/Erwin en G-M/Mijn documenten/Erwin/Match Day");
                        fc.setCurrentDirectory(wrkDir);
                        // show open dialog.
                        int returnVal =     fc.showOpenDialog(null);
                        File selFile = fc.getSelectedFile();
                        if(returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("You chose to open this file: " +
                   fc.getSelectedFile().getName());
                        try          {
                             BufferedReader invoer = new BufferedReader(new FileReader(selFile));
                             String line = invoer.readLine();
                             System.out.println(line);
                             // THIS IS WHERE IT GOES WRONG, I THINK
                             table.setValueAt(line, 1, 1);
                             table.fireTableDataChanged();
                        catch (IOException ioExc){
                        if (x == save)          {
                             System.out.println("save file");
                        if (x == exit)          {
                             System.out.println("exit file");
    // ItemListener for ItemEvents on JMenu.
    public void itemStateChanged(ItemEvent e) {       
              String s = "Item event detected. Event source: " + e.getSource();
              System.out.println(s);
         public static void main(String[] args)                {
              TeamTable frame = new TeamTable();
              frame.setUndecorated(true);
         frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
              frame.addWindowListener( new WindowAdapter()           {
                   public void windowClosing( WindowEvent e )                {
         System.exit(0);
    frame.setVisible(true);
    * Define the look/content for a cell in the row header
    * In this instance uses the JTables header properties
    class RowHeaderRenderer extends JLabel implements ListCellRenderer           {
    * Constructor creates all cells the same
    * To change look for individual cells put code in
    * getListCellRendererComponent method
    RowHeaderRenderer(JTable table)      {
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    setHorizontalAlignment(CENTER);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    * Returns the JLabel after setting the text of the cell
         public Component getListCellRendererComponent( JList list,
    Object value, int index, boolean isSelected, boolean cellHasFocus)      {
    setText((value == null) ? "" : value.toString());
    return this;

  • How can I load a .TXT file into a dynamic text box?

    I am sure that many people know how to load a .txt file into
    a dynamic text box. But I do not. I want to be able to reference a
    txt file from the server into the text box. So that when I change
    the text file it changes in the flash movie without even editing
    the flash file itself. Thank you.

    http://www.oman3d.com/tutorials/flash/loading_external_text_bc/
    I think this is the simplest way to go :)

  • Also problem read txt files into JTable

    hello,
    i used the following method to load a .txt file into JTable
    try{
                        FileInputStream fin = new FileInputStream(filename);
                        InputStreamReader isr = new InputStreamReader(fin);
                        BufferedReader br =  new BufferedReader(isr);
                        StringTokenizer st1 = new StringTokenizer(br.readLine(), "|");
                        while( st1.hasMoreTokens() )
                             columnNames.addElement(st1.nextToken());
                        while ((aLine = br.readLine()) != null)
                             StringTokenizer st2 = new StringTokenizer(aLine, "|");
                             Vector row = new Vector();
                             while(st2.hasMoreTokens())
                                  row.addElement(st2.nextToken());
                             data.addElement( row );
                        br.close();
                        }catch(Exception e){ e.printStackTrace(); }
                   //colNum = st1.countTokens();
                   model = new DefaultTableModel(data,columnNames);
                   table.setModel(model);but there is a problem : if cell A's location is (4,5),and its left neighbour,that is, cell(4,4) is blank (the value is ""), the the cell A's value will be displayed in cell(4,4).if cell(4,3) is also blank ,the cell A's value will be displayed in cell(4,3).that is,the non-blank value will be displayed in the first blank cell of the line.
    how can i solve it?Please give me some helps or links.
    Thank u very much!

    Or, use the String.split(..) method to tokenize the data
    Or, use my SimpleTokenizer class which you can find by using the search function.

  • Convert .txt file into .xml file

    Hello,
    How do i convert an .txt file into an .xml file using labVIEW function?.
    Also i do i extract the header from the text file.
    My file format is mentioned in attached .txt file.
    Also I need to extract the header from the converted .xml file.
    Anticipating reply
    Attachments:
    Example.txt ‏1 KB

    There is no automatic mechanism for converting a .txt file to XML in any language. You have to define the XML schema and then write the code to generate the XML file. You could also read in your text file into some form of structure and then use the Flatten to XML functions to use the NI XML schema. If you need to use your own XML schema then you would need to use the XML Parser VIs to generate your XML file. Alternatively, you could use LabXML or JKI's EasyXML Toolkit.

  • Import txt file into user dictionary

    How to import text file into user dictionary through javascript? I can manually import txt file into user dictionary thru "Edit=>Spelling=>User dictionary...". But I don't know how to do it using javascript. Please advise.

    Advice? See in some version of the object-model reference under userDictionary. There you'll find a method called addWord(), which looks promising.
    Peter

  • StringTokenizer, chopping up content of a txt file

    I'm working on a project here, making program(java) to read and run assembly. I have opened the file, but I'm having trouble extracting the content from the txt file.
    txt-file looks like this:
    IN 200
    IN 200
    LDA 200
    ADD 201
    HLT
    The file is bigger, but you see my point. I need to read the content and chop the content in to properly tokens. Splitting the lines by " " does not work for me, neither by "\b". Is it possible to split two times? Second part of the program is the assembly coder, where i have to convert IN to a function to receive input from user(ill use JOptionPane when i get there).
    For fun I'm posting my work so far: http://paste.dprogramming.com/dpqe83x3.php

    Okey, I got the splitter to work(yay!). but since this is a program "converting" assembly to java i need some way to reccon commands(like IN 200).
    I have no idea on how to do that(there a lot of things i dont know really). this my try/catch
    try
                             BufferedReader in = new BufferedReader(new FileReader(fileDir));
                             String input = in.readLine(); // reads first line, IN 200
                             StringTokenizer st = new StringTokenizer(input, " ");
                             while(st.hasMoreTokens())
                                  int x = 0;
                                  String[] array = new String[x];     
                                  for(x = 0; x <= 1; x++)
                                       array[x] = st.nextToken();
                        catch (IOException event)
                             event.printStackTrace();
                        }As you see(and how i think i could solve the problem) is that i run the program like this:
    get the file
    open and read the first line(that is IN 200) in our case.
    put each of the tokens inside an array, since i want to compare tokens to a assambly command libary(so if token = IN then get input from user and store input in 200(simple int mem1)).
    And yeah, the code above isn't working. but i hope you all see what I want to do and can guide me to the right thing to do. the code above does not read more than the first line since if i cant get it to work then i cant get the rest to work, its the concept.

  • How to store txt file into Oracle 7 Database using Pro*C

    Hi,
    I want to store a txt file into Oracle 7 database table using
    Pro*C application. But do not know what type of column to use.
    At first glance it appeared to me as LONG can serve the purpose
    but later I noticed that I can not do the sequential read/write
    in LONG type of column. That is, I have to use chunks of max of
    2GB (or file lenght) to read/write into such columns.
    I want something simiar to CLOB of Oracle 8.
    I would appreciate if you can provide me solution.
    Thanks,
    Anurag

    You store images in a BLOB column in the database.
    However, inserting image in that column and displaying data/image from that column are 2 very different tasks.
    If you are using Oracle forms, displaying is easy. Default block sitting on the table with BLOB column, can be easily mapped to image box (or similar control), which will display that image.
    Inserting images will be a different ball game. If your forms are web based (i.e. run from browser) and you want to insert images from client machine, some special arrangements are required.
    If images are on database server and you want to insert them in database, the stored procedure given in the earlier thread (posted above) will do the job.

  • Bcp txt file into Sybase

    I wonder how to bcp a txt file into sybase, what is the method I need and syntax. i know it is poss using dos commands but not sure what to do in java program. can anyone please help? many thanks

    Dave,thanks for the suggestion. I am having a lot of trouble , and if that code works for you, then it must be my connection string.
    I am trying
    import java.io.*;
    public class rabbit5{
    public static void main (String[] args) {
    String bcp_command ="bcp [maindatabase].[databaseowner].[table-to-populate] in [file - in] -I -Sserver -Uuser -Ppassword >stdout_ylogfile 2>std_error_file";
    try{
    String[]cmd = {"cmd.exe","/C",bcp_command };
    Process p = Runtime.getRuntime().exec(cmd);
    p.waitFor();
    catch(Exception i){   
    System.out.println("this has not bcp'd");
    But I get a variety of errors; from not being able to find my database, to not being able to find my server - in that order as well!! All to do with my bcp_command string
    You have been very helpful, but I think I need an example of a working string. please??
    many thanks
    Kevin

  • Unable to capture the Data Source into a Transport Request

    Hi All,
    We have a product hierarchy and we are using the data source :4R_PRODH_D_LGEN_HIER for the hierarchy.
    Now we need to transport this structure to the quality environment but we were not able to capture the datasource:4R_PRODH_D_LGEN_HIER into a transport request.
    When ever we activate the data source:4R_PRODH_D_LGEN_HIER it is asking for the Package and the Transport Request Number.If we give these details and save it, data source is not getting captured in the request, only the "bject Directory Entry" is getting captured.
    Can someone please guide me on how to capture the datasource under "Data Sources in BW" in a transport request.
    Regards,
    Sachin Dehey.

    Hi Sachin,
    Hierarachy datasource is not captured as Attributes and Text Datasource. So what ever you have done is correct.
    What ever is captured in Object Directory Entry is correct. So go ahead with your transports, once transport is done check the Hierarchy Infopackage with Available OLTP hierarchies and load the data.
    Most important thing first see that the all Master & Transactional Datasources are transported in R/3 Dev to QA to PRD
    In BW, datasources are not transported, only their replica is transported.
    Transportation of Datasource is done in R/3. Only their replica is transported in BW.
    So wht ever you have done till now is correct. So go ahead.
    While attaching Hierarchy Datasource it is captured only in "Object Directory Entry"
    Regards,
    Vishnu.

  • How to include an INCLUDE into a Transport Request

    Hi Experts
    Requirement is to add an INCLUDE program object (which is not part of any other request) into a Transport Request. I followed the below steps:
    SE01 -> Entered TR# -> Display -> Request/Task -> Object List -> Include Objects.
    In the selection screen of "freely selected objects",
    selected objects -> Program = LZ123T00 (which I need to include).
    Then, Execute!
    It shows: No objects were selected!
    How to fix this error?
    Regds

    Hi Varun
    thx for ur reply. I tried this. it seems the INCLUDE alone cannot be written into the TR.
    it says: "Cannot be added. The object is part of some system object"
    If we add the whole Function Group to the TR, will it help? Will the TR hold all the associated INCLUDEs declared in this Function Group?
    plz advise.

  • Upload .txt file into Database Table

    Hi,
    I was wondering if someone could please point me in the right direction. I've been looking around the forum but can't find anything to help me achieve the following.
    I would like to be able to upload a .txt file using a webpage. Then store the information inside this file into database tables.
    eg. contents of mytextfile.txt:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    joe
    9 somestreet, elsewhere
    999 888 777 666
    peter
    214 nearby lane, overhere
    555 555 555 555
    I would like to insert this data into a table.
    eg. table name = CONTACTS
    userid = primary key (using sequence)
    username = (line 1 - richard, joe, peter)
    address = (line 2)
    phone_no = (line 3)
    As you can see the records will appear 1 at a time and will have a blank line between records. Is there anyway for me to upload a file like this and have it placed into tables?
    I have seen http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html but this seems to be for uploading a whole file and downloading the same file, rather than extracting data from the file.
    I hope I have managed to explain my problem.
    Many thanks,
    Richard.

    Richard,
    HTML DB allows you to upload CSV files via the Data Workshop. That data would then be parsed and inserted into a specific table. Alternatively, if you have your data in an Excel spreadsheet, and it is less than 32k, you can copy & paste the data directly into HTML DB's Data Workshop, which will then parse and import it into the Oracle database.
    The one obstacle you may have to overcome is converting your data from the format you outlined to CSV format. Specifically, you would have to make this:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    Look something like this:
    "richard","10 anywhere street, anytown, somewhere","111 222 333 444"
    Hope this helps,
    - Scott -

  • Reading .txt file into char array, file not found error. (Basic IO)

    Iv been having some trouble with reading characters from a text file into a char array. I havnt been learning io for very long but i think im getting the hang of it. Reading and writing raw bytes
    and things like that. But i wanted to try using java.io.FileReader to read characters for a change and im having problems with file not found errors. here is the code.
    try
    File theFile = new File("Mr.DocumentReadMe.txt");
    String path = theFile.getCanonicalPath();
    FileReader readMe = new FileReader(path);
    char buffer[] = new char[(int)theFile.length()];
    int readData = 0;
    while(readData != -1)
    readData = readMe.read(buffer);
    jEditorPane1.setText(String.valueOf(buffer));
    catch(Exception e)
    JOptionPane.showMessageDialog(null, e,
    "Error!", JOptionPane.ERROR_MESSAGE);
    The error is: java.io.FileNotFoundException: C:\Users\Kaylan\Documents\NetBeansProjects\Mr.Document\dist\Mr.DocumentReadMe.txt (The system cannot find the file specified)
    The text file is saved in the projects dist folder. I have tried saving it elsewhere and get the same error with a different pathname.
    I can use JFileChooser to get a file and read it into a char array with no problem, why doesnt it work when i specify the path manually in the code?

    Well the file clearly isn't there. Maybe it has a .txt.txt extensionthat Windows is kindly hiding from you - check its Properties.
    But:
    String path = theFile.getCanonicalPath();
    FileReader readMe = new FileReader(path);You don't need all that. Just:
    FileReader readMe = new FileReader(theFile);And:
    char buffer[] = new char[(int)theFile.length()];You don't need a buffer the size of the file, this is bad practice. Use 8192 or whatever.
    while(readData != -1)
    readData = readMe.read(buffer);
    }That doesn't make sense. Read the data into the buffer and repeat until you get EOF? and do nothing with the contents of the buffer? The canonical read loop in Java goes like this:
    while ((count = in.read(buffer)) > 0)
      out.write(buffer, 0, count); // or do something else with buffer[0..count-1].
    jEditorPane1.setText(String.valueOf(buffer));Bzzt. That won't give you the content of 'buffer'. Use new String(buffer, 0, count) at least.

  • Import txt file into report

    I have an Arinc signal that I have decoded into each of its digital I/Os.  Since I have over 150 I/Os I needed a way to sort and do a quick report on them.
    I have three categories.
    1. Stayed =1 throughout test
    2. Stayed = 0 throughout test
    3. Changed either from 0 --> 1 or 1-->0 during the test.
    I want to just put a list of the signals for each of these categories into my report.
    I have created a txt file for these to go in, but how do I import that into my report?
    Or is there an easier way?
    Here is an example of my code...
    'HCM1
    'HCM1 Label 104 decode - Untitled 3
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_HSOV_A1_CLOSED"")= GetB (Ch(""[1]/Untitled 3""),0)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_HSOV_A2_CLOSED"")= GetB (Ch(""[1]/Untitled 3""),1)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_HPP_A_RUNNING"")= GetB (Ch(""[1]/Untitled 3""),2)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_SYS_A_HI_TEMP"")= GetB (Ch(""[1]/Untitled 3""),4)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_SYS_A_LO_PRS"")= GetB (Ch(""[1]/Untitled 3""),7)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_HPP_A_LO_PRS"")= GetB (Ch(""[1]/Untitled 3""),12)")
    Call Calculate ("Ch(""HCM1_104/HCM_1_CAS_HPP_A_HI_TEMP"")= GetB (Ch(""[1]/Untitled 3""),13)")
    'HCM1 Label 105 decode - Untitled 4
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_HSOV_A1_FAIL"")= GetB (Ch(""[1]/Untitled 4""),0)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_HSOV_A2_FAIL"")= GetB (Ch(""[1]/Untitled 4""),1)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_EDP_A1_FAIL"")= GetB (Ch(""[1]/Untitled 4""),2)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_EDP_A2_FAIL"")= GetB (Ch(""[1]/Untitled 4""),3)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_SYS_A_PRS_FLT_CLG"")= GetB (Ch(""[1]/Untitled 4""),6)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_SYS_A_RET_FLT_CLG"")= GetB (Ch(""[1]/Untitled 4""),7)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_EDP_A1_FLT_CLG"")= GetB (Ch(""[1]/Untitled 4""),8)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_EDP_A2_FLT_CLG"")= GetB (Ch(""[1]/Untitled 4""),9)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_HPP_A_LO_QTY"")= GetB (Ch(""[1]/Untitled 4""),11)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_HPP_A_FAIL"")= GetB (Ch(""[1]/Untitled 4""),12)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_HPP_A_CDF_FLT_CLG"")= GetB (Ch(""[1]/Untitled 4""),14)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_IV_A_FAIL"")= GetB (Ch(""[1]/Untitled 4""),15)")
    Call Calculate ("Ch(""HCM1_105/HCM_1_FLT_IV_A_FAIL_LOCAL"")= GetB (Ch(""[1]/Untitled 4""),16)")
    'HCM1 Label 106 decode - Untitled 5
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_SYS_A_PF_DPI_FAIL"")= GetB (Ch(""[1]/Untitled 5""),0)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_SYS_A_RF_DPI_FAIL"")= GetB (Ch(""[1]/Untitled 5""),1)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_EDP_A1_CDF_DPI_FAIL"")= GetB (Ch(""[1]/Untitled 5""),2)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_EDP_A2_CDF_DPI_FAIL"")= GetB (Ch(""[1]/Untitled 5""),3)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_EDP_A1_PS_FAIL"")= GetB (Ch(""[1]/Untitled 5""),4)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_EDP_A2_PS_FAIL"")= GetB (Ch(""[1]/Untitled 5""),5)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_SYS_A_PX_FAIL"")= GetB (Ch(""[1]/Untitled 5""),6)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_SYS_A_TX_FAIL"")= GetB (Ch(""[1]/Untitled 5""),7)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_SYS_A_QX_FAIL"")= GetB (Ch(""[1]/Untitled 5""),8)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_HSOV_A1_IND_FAIL"")= GetB (Ch(""[1]/Untitled 5""),10)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_HSOV_A2_IND_FAIL"")= GetB (Ch(""[1]/Untitled 5""),11)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_EDP_A1_FAIL"")= GetB (Ch(""[1]/Untitled 5""),12)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_EDP_A2_FAIL"")= GetB (Ch(""[1]/Untitled 5""),13)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_FLT_FV_A_FAIL"")= GetB (Ch(""[1]/Untitled 5""),14)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_HSOV_A1_RELAY_FAIL"")= GetB (Ch(""[1]/Untitled 5""),15)")
    Call Calculate ("Ch(""HCM1_106/HCM_1_HSOV_A2_RELAY_FAIL"")= GetB (Ch(""[1]/Untitled 5""),16)")
    Dim k, m, pMyChn, result, ArincTrue, intMyHandle01, intMyHandle02,intMyHandle03,intMyText, intMyError01, intMyError02, intMyError03
    intMyHandle01 = TextFileOpen("C:\ArincTrue.txt",tfCreate or tfWrite)
    intMyHandle02 = TextFileOpen("C:\ArincFalse.txt",tfCreate or tfWrite)
    intMyHandle03 = TextFileOpen("C:\ArincChange.txt",tfCreate or tfWrite)
    For k = 2 to 4
    For m = 1 to GroupChnCount(k)
    Set pMyChn = Data.Root.ChannelGroups(k).Channels(m)
    Result = ChnValMax(pMyChn)-ChnValMin(pMyChn)
    If Result = 0 and ChnValMax(pMyChn) > 0 then
    intMyText= TextfileWriteLn(intMyHandle01, pMyChn.Name)
    elseif result= 0 and ChnValMax(PMyChn) = 0 then
    intMyText= TextfileWriteLn(intMyHandle02, pMyChn.Name)
    else
    intMyText= TextfileWriteLn(intMyHandle03, pMyChn.Name)
    End If
    Next
    Next
    intMyError01 = TextFileClose(intMyHandle01)
    intMyError02 = TextFileClose(intMyHandle02)
    intMyError03 = TextFileClose(intMyHandle03)
    Solved!
    Go to Solution.

    Hi 2Pale4TX,
    You can't easily reference the content of an ASCII file.  Instead, I suggest you make a new Group of 3 text channels that you can drag onto a REPORT table.
    Dim k, m, z, ResultsGroup, TrueChannel, FalseChannel, ChangeChannel, Group, Channel, Result
    Set ResultsGroup = Data.Root.ChannelGroups.Add("Results")
    Set TrueChannel = ResultsGroup.Channels.Add("ArincTrue", DataTypeString)
    Set FalseChannel = ResultsGroup.Channels.Add("ArincFalse", DataTypeString)
    Set ChangeChannel = ResultsGroup.Channels.Add("ArincChange", DataTypeString)
    For k = 2 to 4
    Set Group = Data.Root.ChannelGroups(k)
    For m = 1 to Group.Channels.Count
    Set Channel = Group.Channels(m)
    ChMax = CMax(Channel)
    ChMin = CMin(Channel)
    Result = ChMax - ChMin
    If Result = 0 and ChMax > 0 Then
    z = TrueChannel.Size + 1
    TrueChannel(z) = Channel.Name
    Elseif Result = 0 and ChMax = 0 Then
    z = FalseChannel.Size + 1
    FalseChannel(z) = Channel.Name
    Else
    z = ChangeChannel.Size + 1
    ChangeChannel(z) = Channel.Name
    End If
    Next ' m
    Next ' k
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

Maybe you are looking for

  • What is new in BI 7.0

    I would appreciate if any of you could provide me with links  to relevant documents or information on what is new for BI 7.0.. One of  my main intentions is finding out information on the changes in Process Change Monitoring.  As you all know the iss

  • I want to delite all adresses in my iCloud. how to do this?

    i want to deliteall addresses in my icloud. how to do this???

  • How do I move iPhoto albums off of my computer?

    I have made some albums in iPhoto that I want to move to an external hard drive. Just the albums, not the whole LIBRARY. However, I cant drag them or do anything with them. I tried copying and pasting the pictures into a new folder on my hard drive.

  • Cannot load some components for the creative sound recor

    - This is the error message I get everytime I try to record with my sound blaster Audigy. I've done a full system restore and reloaded the drivers and software about fi've times. My guess is the card is bad, but I thought I would get a second opinion

  • Expected Canadian Release Date??

    Anyone have an idea when the expected Canadian release date is?? I know Steve Jobs said July in the keynote...but when in July?? Message was edited by: John Doe 69