Scenario to read from txt-file and create a sales order

Hi,
i have started creating a scenario to read from an txt-file and to create a sales order.
When i activate my scenario, i get the following message :
    no scenario step (vBIU) associated for this step for the incoming system (SysId)
When i look into the detailed xml-file i see that all the records are read from the file, but there is no next step to be treated.
Has somebody any idea how this come ?
-<Msg MessageLog="true" msglogexcl="false" logmsg="0009" recording="true" BeginTimeStamp="20111202095144" MessageId="11120209514499820828C0A801674F24" xmlns="urn:com.sap.b1i.vplatform:entity">-<Header><msglog b1ifactive="true" always="false" step="Default message log"/>-<Resumption><starter ipo="/vP.0010000138.in_FEAN/com.sap.b1i.vplatform.runtime/INB_FI_EXST_ASYN_NAM/INB_FI_EXST_ASYN_NAM.ipo/proc"/></Resumption><IPO tid="11120205535899820808C0A801678C54" Id="INB_FI_EXST_ASYN_NAM"/><Sender Id="0010000138"/><Inbound file="ORDERS_TEST" ext="csv" path="C:\TEMP\In" pltype="txt" wrap="" deli=";"/></Header>-<Body><Payload Type="File exist" Role="T"/>-<Payload Role="S">-<io xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="txt">
-<row>
<col>OH</col>
<col>0000087077</col>
<col>201110041205</col>
<col>220</col>
<col>9</col>
<col>201110191702</col>
<col>8710624300012</col>
<col>8714252008609</col>
<col>8710624300012</col>
<col>8714252008609</col>
<col>8710624300012</col>
<col>N</col>
<col>N</col>
<col>N</col>
</row>
-<row>
<col>OL</col>
<col>1</col>
<col>8711715844378</col>
<col>20</col>
</row>-<row>
<col>OL</col>
<col>2</col>
<col>8711715844392</col>
<col>60</col>
</rowrow>
<col>OL</col>
<col>16</col>
<col>8710251791092</col>
<col>280</col>
</row>
</io>
</Payload>
</Body>
</Msg>
This is my final atom :
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:utils2="com.sap.b1i.bpc_tools.Utilities" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="" utils2:force=""><xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output><xsl:param name="atom"></xsl:param><xsl:param name="sessionid"></xsl:param><xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"></xsl:variable><xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable><xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable><xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"></xsl:variable><xsl:template match="/">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
<Body>
<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
<Payload Role="R" id="{$atom}">
<xsl:call-template name="transform"></xsl:call-template>
</Payload>
</Body>
</Msg>
</xsl:template><xsl:template name="transform">
<FinalAtomResult xmlns="">
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
     <Documents>
     <row>
     <DocDate>
          <xsl:copy-of select="$msg/io/row[0]/col[2]/text()"></xsl:copy-of>
     </DocDate>
     <DocDueDate>
          <xsl:copy-of select="$msg/io/row[0]/col[5]/text()"></xsl:copy-of>
     </DocDueDate>
     <CardCode>KD10251</CardCode>
     <NumAtCard>
          <xsl:copy-of select="$msg/io/row[0]/col[1]/text()"></xsl:copy-of>
     </NumAtCard>
     <U_PMX_JD_COMP>32</U_PMX_JD_COMP>
     </row>
                      </Documents>
     <Document_Lines>
     <xsl:for-each select="$msg/io/row">
     <row>
     <BarCode>
          <xsl:copy-of select="$msg/io/row[*]/col[2]/text()"></xsl:copy-of>
     </BarCode>
     <Quantity>
          <xsl:copy-of select="$msg/io/row[*]/col[3]/text()"></xsl:copy-of>
     </Quantity>
     </row>
     </xsl:for-each>
     </Document_Lines>

Mike,
you were right, you may not specify the extension of a file.
Another thing i detected is that the loop of my data start with the index 1 instead of 0 !!!
In this scenario, i have to read all the lines of the file and each time i should do a SQL-query,
so that i can use the result to build my sales document.
Do you know if it this is possible or have you any idea how to do this ?
thx,
Mario

Similar Messages

  • Read from .txt file and output the content as two arrays

    I am using the contoured move to control the x-y stage. The trajectory datas for x and y axis are generated using my interpolation program and it is stored in a .txt file as two columns. What I want to do is read .txt file and output the content of this file as two arrays. Is there anyone has any ideas? Thanks, the .txt file is attached.
    Attachments:
    R.75.txt ‏172 KB

    Hi Awen,
    This is quite easy to do, you can merely use the "read from spreadsheet file" function to get a 2D array (2 columns and n rows) and then use the index array function to get whatever row/colums you want..
    Hope the attached VI helps you
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    read sprdsheet file.vi ‏27 KB

  • Read from txt file and analyse data

    hi,
    i am having a problem for reading data from a text file and checking whether it is a integer or not.
    basically if i have a txt file with the following content:
    12 45 345 500 45.67684 33
    my output should be:
    12 45 345 500 invalid 33
    that means if there is a integer number in the file, the integer number will be printed on the screen BUT if there is anything else like a string or a double number, then "invalid" will be printed.
    how can i check what kind of datatype it is??
    i have the following code to start with:
    try
                BufferedReader in = new BufferedReader(new FileReader(FileName));
                String l = in.readLine();
                in.close();
            catch(IOException e)
                System.out.println("IO error");
                System.exit(0);
            }

    ok i have tried the following code:
            int index = 0;
            String[] arr = null;
            int nb = 0;
            try
                BufferedReader in = new BufferedReader(new FileReader(nameFile));
                String line = in.readLine();
                arr = line.split(" ");
                for(int i=0; i<arr.length; i++)
                    index = i;
                    nb = Integer.parseInt(arr);
    System.out.print(nb+" ");
    in.close();
    catch(IOException e)
    System.out.println("IO error");
    System.exit(0);
    catch(NumberFormatException e)
    System.out.print("invalid ");
    for(int j=index+1; j<arr.length; j++)
    nb = Integer.parseInt(arr[j]);
    System.out.print(nb+" ");
    which works perfectly fine for the following scenario:
    txt-file:
    12 45 345 500 45.67684 33
    output:
    12 45 345 500 invalid 33
    but what, if I have the following data in my txt file:
    12 45 345 500 45.67684 33 23.234 21
    then the output should be:
    12 45 345 500 invalid 33 invalid 21
    how can i solve this???

  • What is the best, most efficient way to read a .xls File and create a pipe-delimited .csv File?

    What is the best and most efficient way to read a .xls File and create a pipe-delimited .csv File?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85

    You should have no trouble doing this in SSIS. Simply add a data flow with connection managers to an existing .xls file (excel connection manager) and a new .csv file (flat file). Add a source to the xls and destination to the csv, and set the destination
    csv parameter "delay validation" to true. Use an expression to define the name of the new .csv file.
    In the flat file connection manager, set the column delimiter to the pipe character.

  • How to  read from excel file and write it using implicit jsp out object

    our code is as below:Please give us proper solution.
    we are reading from Excel file and writing in dynamicaly generated Excel file.it is writing but not as original excel sheet.we are using response.setContentType and response.setHeader for generating pop up for saveing the original file in to dynamically generated Excel file.
    <%@ page contentType="application/vnd.ms-excel" %>
    <%     
         //String dLoadFile = (String)request.getParameter("jspname1");
         String dLoadFile = "c:/purge_trns_nav.xls" ;
         File f = new File(dLoadFile);
         //set the content type(can be excel/word/powerpoint etc..)
         response.setContentType ("application/msexcel");
         //get the file name
         String name = f.getName().substring(f.getName().lastIndexOf("/") + 1,f.getName().length());
         //set the header and also the Name by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;     filename="+name);
         //OPen an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
              FileInputStream in = new FileInputStream(f);
              //ServletOutputStream outs = response.getOutputStream();
              int bit = 10;
              int i = 0;
              try {
                        while (bit >= 0) {
                        bit = in.read();
                        out.write(bit) ;
    } catch (IOException ioe) { ioe.printStackTrace(System.out); }
              out.flush();
    out.close();
    in.close();     
    %>

    If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
    import java.nio.*;
    import java.nio.channels.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    class Kopy {
         * @param args [0] = source filename
         *        args [1] = destination filename
        public static void main(String[] args) throws Exception {
            if (args.length != 2) {
                System.err.println ("Syntax: java -cp . Kopy source destination");
                System.exit(1);
            File in = new File(args[0]);
            long fileLength = in.length();
            long t = System.currentTimeMillis();
            FileInputStream fis = new FileInputStream (in);
            FileOutputStream fos = new FileOutputStream (args[1]);
            FileChannel fci = fis.getChannel();
            FileChannel fco = fos.getChannel();
            fco.transferFrom(fci, 0, fileLength);
            fis.close();
            fos.close();
            t = System.currentTimeMillis() - t;
            NumberFormat nf = new DecimalFormat("#,##0.00");
            System.out.print (nf.format(fileLength/1024.0) + "kB copied");
            if (t > 0) {
                System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
    }

  • How can i read only .txt file and skip other files in Mail Sender Adapter ?

    Hi Friends ,
                       <b> I am working on scenario like , I have to read an mail attachement and send the data to R3.</b>
                        It is working fine if only the .txt file comes.
                      <b>Some times ,html files also coming along with that .txt files. That time my Mail adapter fails to read the .txt file.</b>
                       I am using PayLoadSwap Bean and MessageTransformBean to swap and send the attachment as payload .
                         <b>Michal as told to write the Adapter module to skip the files .But i am not ware of the adapter moduel . If any blogs is there for this kind of scenarios please give me the link.</b>
                           Otherwise , please tell me how to write adapter module for Mail  Sender Adapter?
                      How to download the following
                        newest patch of XI ADAPTER FRAMEWORK CORE 3.0
    from SAP Service Marketplace. Open the file with WinZip and extract the following
    SDAs:
    &#61589;&#61472;aii_af_lib.sda, aii_af_svc.sda
    &#61589;&#61472;aii_af_cpa_svc.sda
                        I have searche in servive market place .But i couldn't find that . Can you please provide me the link to download the above .
                      If any other suggestions other than this please let me know.
    Regards.,
    V.Rangarajan

    =P
    Dude, netiquette. Messages like "i need this now! Do it!" are really offensive and no one here is being payed to answer anyone's questions. We're here because we like to contribute to the community.
    Anyway, in your case, just perform some search on how you could filter the files that are attached to the message. The sample module is just an example, you'll have to implement your own. Tips would be to query the filename of the attachments (or maybe content type) and for the ones which are not text, remove them.
    Regards,
    Henrique.

  • Need a VB-Script that read a txt-file and only the lines that are new since last time

    Hi,
    I need help to write a VB script that read all new lines since the last time.
    For example:  The script reads the textfile at specific time, then 10 minutes later the script read the file again, and it should now only read the lines that are new since last time. Anyone that has such a script in your scriptingbox?
    cheers!
    DocHo
    Doc

    Based on the excellent idea by Pegasus, where is a VBScript solution. I use a separate file to save the last line count read from the file, then each time the file is read I update the line count. Only lines after the last count are output by the program:
    Option Explicit
    Dim strFile, objFSO, objFile, strCountFile, objCountFile, strLine, lngCount, lngLine
    Const ForReading = 1
    Const ForWriting = 2
    Const OpenAsASCII = 0
    Const CreateIfNotExist = True
    ' Specify input file to be read.
    strFile = "c:\Scripts\Example.log"
    ' Specify file with most recent line count.
    strCountFile = "c:\Scripts\Count.txt"
    ' Open the input file for reading.
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile(strFile, ForReading)
    ' Check if the line count file exists.
    If (objFSO.FileExists(strCountFile) = False) Then
        ' Initial count is 0, so all lines are read.
        lngCount = 0
    Else
        ' Open the line count file.
        Set objCountFile = objFSO.OpenTextFile(strCountFile, ForReading)
        ' Read the most recent line count.
        Do Until objCountFile.AtEndOfStream
            lngCount = CLng(objCountFile.ReadLine)
        Loop
    End If
    ' Read the input file.
    lngLine = 0
    Do Until objFile.AtEndOfStream
        ' Count lines.
        lngLine = lngLine + 1
        strLine = objFile.ReadLine
        If (lngLine >= lngCount) Then
            ' Output the line.
            Wscript.Echo strLine
        End If
    Loop
    ' Close all files.
    objFile.Close
    If (lngCount > 0) Then
        objCountFile.Close
    End If
    ' Ignore last line of the file if it is blank.
    If (strLine = "") Then
        lngLine = lngLine - 1
    End If
    ' Save the new line count.
    Set objCountFile = objFSO.OpenTextFile(strCountFile, _
        ForWriting, CreateIfNotExist, OpenAsASCII)
    objCountFile.WriteLine CStr(lngLine + 1)
    objCountFile.Close
    Richard Mueller - MVP Directory Services

  • "Read from Binary File" and efficiency

    For the first time I have tried using Read from Binary File on sizable data files, and I'm seeing some real performance problems. To prevent possible data loss, I write data as I receive them from DAQ, 10 times per second. What I write is a 2-D array of double, 1000 data points x 2-4 channels. When reading in the file, I wish I could read it as a 3-D array, all at once. That doesn't seem supported, so I repeatedly do reads of 2-D array, and use a shift register with Build Array to assemble the 3-D array that I really need. But it's incredibly slow! It seems that I can only read a few hundred of these 2-D items per second.
    It also occurred to me that the Build Array being used in a shift register to keep adding on to the array, could be a quadratic-time operation depending on how it is implemented. Continually and repeatedly allocating bigger and bigger chunks of memory, and copying the growing array at every step.
    So I'm looking for suggestions on how to efficiently store, efficiently read, and efficiently reassemble my data into the 3-D array that I need. Perhaps I could simplify life if I had  "write raw data" and "read raw data" operations that write and read only the numbers and no metadata.then I could write the file and read it back in any size chunks I please -- and read it with other programs besides. But I don't see them in the menus.
    Suggestions?
    Ken
    Solved!
    Go to Solution.

    I quote the detailed help from Read from Binary File:
    data type sets the type of data the function uses to read from
    the binary file. The function interprets the data starting at the current file
    position to be count instances of data type.
    If the type is an array, string, or cluster containing an array or string, the
    function assumes that each instance of that data type contains size information.
    If an instance does not include size information, the function misinterprets the
    data. If LabVIEW determines that the data does not match the type, it sets data
    to the default for the specified type and returns an error.
    So I see how I could write data without any array metadata by turning off "prepend array or string size information", but I don't see any way to read it back in such bare form. If I did, I'd have to tell it how long an array to read, and I don't see where to do that. If I could overcome this, I could indeed read in much larger chunks.
    I'll try the auto-indexing tunnel anyway. I didn't tell you the whole truth, the 3-D array is actually further sliced up based on metadata that I carry, and ends up as a 4-D array of "runs". But I can do that after the fact instead of trying to do it with shift registers as I'm reading.
    Thanks,
    Ken

  • Upload file and link to sales order in SAP via rfc (C#)

    Hello all,
    In my company we have the possibility to attach files to sales orders, e.g. pdf files with the printing details.
    These files are added by the GUI user, this works fine.
    Now we have an extra order creation stream in which a pdf file has to be added to the SO without user interaction.
    In a previous question I had a little question about the linking, that has been solved, I will post the test program later.
    I now can link front end files (pdf's in this case) to the sales orders and it works fine.
    Now we are developing a frontend in C# (build by a third party) which creates a sales order via a RFC. We also want that RFC to include the PDF file and link it to the created order.
    In the interface of the RFC I included a table with 255 char lines. That is the same as in the example program. the problem is that our partner is yet unable to fill the interface in exact the same way as the example program does, so the linked pdf file is corrupted.
    Does anyone have hints how C# should fill the interface table, or how I can change the interface?
    code snippid table declaration for pdf table:
    IT_PDF     LIKE     ZETEX_TAB_PDF
    and
    structure ZETEX_TAB_PDF consists of
    LINE     CHAR255
    the sample program (see other topic on where I got it)
    REPORT  zzfb_brc LINE-SIZE 260.
    * Report  Z_RMTIWARI_ATTACH_DOC_TO_BO
    * Written By : Ram Manohar Tiwari
    * Function   : We need to maintain links between Business Object and
    *              the attachment.Attachment document is basiclally a
    *              business object of type 'MESSAGE'.In order to maintain
    *              links, first the attachment will be crated as Business
    *              Object of type 'MESSAGE' using Message.Create method.
    *              Need to check if we can also use FM
    *              'SO_DOC_INSERT_WITH_ORIG_API1' or SO_OBJECT_INSERT rather
    *              than using Message.Create method.
    * I took this program and removed all the parts for adding URL's and
    * notes.
    * Include for BO macros
    INCLUDE : <cntn01>.
    * Load class.
    CLASS cl_binary_relation DEFINITION LOAD.
    CLASS cl_obl_object      DEFINITION LOAD.
    PARAMETERS:
    *  Object_a
       p_botype LIKE obl_s_pbor-typeid DEFAULT 'BUS2032',    "SO
       p_bo_id  LIKE obl_s_pbor-instid DEFAULT '0000757830', "example number
    *  Object_b
       p_docty  LIKE obl_s_pbor-typeid DEFAULT 'MESSAGE' NO-DISPLAY,
       p_msgtyp LIKE sofm-doctp        DEFAULT 'EXT'     NO-DISPLAY,
    *  Relationship
       p_reltyp  LIKE mdoblrel-reltype DEFAULT 'ATTA'.
    TYPES: BEGIN OF ty_message_key,
            foltp     TYPE so_fol_tp,
            folyr     TYPE so_fol_yr,
            folno     TYPE so_fol_no,
            doctp     TYPE so_doc_tp,
            docyr     TYPE so_doc_yr,
            docno     TYPE so_doc_no,
            fortp     TYPE so_for_tp,
            foryr     TYPE so_for_yr,
            forno     TYPE so_for_no,
           END OF ty_message_key.
    DATA : lv_message_key TYPE ty_message_key.
    DATA : lo_message TYPE swc_object.
    DATA : lt_doc_content TYPE STANDARD TABLE OF soli-line,
           ls_doc_content TYPE soli-line.
    * Create an initial instance of BO 'MESSAGE' - to call the
    * instance-independent method 'Create'.
    swc_create_object lo_message 'MESSAGE' lv_message_key.
    * Upload the pdf file, for now from the frontend, in the future from
    * the server.
    DATA:
    *  dsn(40) TYPE C VALUE '/usr/sap/trans/convert/1.pdf', "server location
    l_lines TYPE i. "filelenght
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename   = 'c:tsimple.pdf'
        filetype   = 'BIN'
      IMPORTING
        filelength = l_lines
      TABLES
        data_tab   = lt_doc_content.
    * no exceptions, the file is there in this example
    clear l_lines.
    loop at lt_doc_content into ls_doc_content.
    l_lines = l_lines + 255.
    endloop.
    compute l_lines =   l_lines
                      + STRLEN( ls_doc_content ).
    ** the coding for the server input, for later
    *OPEN DATASET dsn FOR INPUT IN BINARY MODE.
    *IF sy-subrc <> 0.
    *  EXIT.
    *ENDIF.
    *READ DATASET dsn INTO ls_doc_content.
    *WHILE sy-subrc EQ 0.
    *  APPEND ls_doc_content TO lt_doc_content.
    *  READ DATASET dsn INTO ls_doc_content.
    *ENDWHILE.
    *CLEAR ls_doc_content.
    *CLOSE DATASET dsn.
    * define container to pass the parameter values to the method call
    * in next step.
    swc_container lt_message_container.
    * Populate container with parameters for method
    swc_set_element lt_message_container 'DOCUMENTTITLE' 'Some title'.
    swc_set_element lt_message_container 'DOCUMENTLANGU' 'E'.
    swc_set_element lt_message_container 'NO_DIALOG'     'X'.
    swc_set_element lt_message_container 'DOCUMENTNAME' p_docty.
    swc_set_element lt_message_container 'DOCUMENTTYPE' 'PDF'.
    swc_set_element lt_message_container 'DocumentSize'    l_lines.
    swc_set_element lt_message_container 'DocumentContent' lt_doc_content.
    swc_call_method lo_message 'CREATE' lt_message_container.
    * Refresh to get the reference of create 'MESSAGE' object for attachment
    swc_refresh_object lo_message.
    * Get Key of new object
    swc_get_object_key lo_message lv_message_key.
    * Now we have attachment as a business object instance. We can now
    * attach it to our main business object instance.
    * Create main BO object_a
    DATA: lo_is_object_a TYPE sibflporb.
    lo_is_object_a-instid = p_bo_id.
    lo_is_object_a-typeid = p_botype.
    lo_is_object_a-catid  = 'BO'.
    * Create attachment BO object_b
    DATA: lo_is_object_b TYPE sibflporb.
    lo_is_object_b-instid = lv_message_key.
    lo_is_object_b-typeid = p_docty.
    lo_is_object_b-catid  = 'BO'.
    *TRY.
    CALL METHOD cl_binary_relation=>create_link
      EXPORTING
        is_object_a = lo_is_object_a
        is_object_b = lo_is_object_b
        ip_reltype  = p_reltyp.
    * Check if everything OK...who cares!!
    COMMIT WORK.

    I woudl suggest you check ORDERS05 IDOC type (ORDCHG message type).
    FM - idoc_input_ordchg

  • How i can to create a vi, which read from configuration file and i could modify this indicator and save the config data??

    Hi guys,
    I have in my application a subvi which i use to save the configuration of application. I create one file with the last saved configuration, and i would like to open this values and that i could to modify this indicator value, but i cant since to modify i need 'numeric control' and to read the data from file i need 'numeric indicator '...
    I thought, use a numeric control and use the values from file to the default values, but i didnt get to find the property node to adjust it. is it possible? or any different way to get it....??
    Also, i attached the capture file.. i would like the program DOESNT SHOW the question of
    replace the file!!. i would like directly replace the file when i push save.
    Thanks, i attached the vi.
    Attachments:
    options.vi ‏43 KB
    config.cnf ‏1 KB
    capture.GIF ‏43 KB

    Hi Dennis,
    Your 'write to sreadshhet mod' suprime the dialog of replace file or not!, i want when i push save, it show the dialog input name of file and show the default sim000 but when i push this sim000 and this file already exist, then show the dialog to replace or not, if i replace Ok not problem, but when i push cancel replace it shows error eof!!!.
    Your file, only remove this dialog and only replace the file directly.
    i put the capture, when i choose the file to save and the program say to me this file exist and it give me the option of replace or not,i want when i push cancel replace it continues running without get error.
    is it possible?.
    Thanks.
    Regards, Fonsi.
    Attachments:
    capture.GIF ‏71 KB
    example.vi ‏40 KB

  • Dynamically create variables when read from txt file

    hi,
    need a little help on this one.
    im reading in the name of user defined classes from a text file into a string array. once i have them all read in i want to be able to declare instances of each class, but how?
    i have the string array with the names and i know that il have to use a loop with a counter to give each instance a unique name but im stomped on how to do the rest.
    anyone have any ideas?
    many thanks in advance.

    im getting it in the following line:
    Class cls = Class.forNames(behList[ i ]);
    behList is a list of names, im trying to loop through
    it and create an instance of each object in the list
    using
    Object x = cls.newInstance();
    but it never gets to this line cos of the top one.
    any ideas?stupid bb codes...
    now are you sure you got that error by java and not Eclipse(or another IDE)
    cause afaik, if the VM cant find the class, it will throw a ClassNotFoundException...

  • Urgent Help:read from text file and write to table

    Hi,
    I'm a super beginner looking for a vi to read this data from a text file and insert it into a table:
       #19
    Date: 05-01-2015
    ID= 12345678
    Sample_Rate= 01:00:00
    Total_Records= 2
    Unit: F
       1 03-23-2015 10:45:46   70.1   3.6
       2 03-23-2015 11:45:46   67.7   2.7
    Output table
    #     date                 time                 x          y        Sample rate    Total Records
    1          03-23-2015     10:45:46        76.8     2.8      01:00:00           2
    2          03-23-2015     10:45:46        48.7     2.1      01:00:00           2
    Thanks for your help in advance.
    Attachments:
    sample.txt ‏1 KB

    jcarmody wrote:
    Will there always be the same number of rows of noise header information?
    Show us how you've read the data and what you've tried to do to parse it.  Once you've got the last rows, you can loop over them using Spreadsheet String to Array (after cleaning up a few messy spaces).
    Jim,
    I didn't know you're that active on here.
    Yes, There will always be the same number of noise header information.
    I'll show you in person
    Regards,

  • Read from text file and seperate column

    hello,
    I have a problem reading my text file. This text file is downloaded from weather link. All data will be changed upon the selection of user. my problem is I can read the data column by column but i cannot retrive the right column header for each data. I also attached the test file. Can somebody help me? Thanks in advance..
    Attachments:
    download.txt ‏8 KB
    read text file.JPG ‏11 KB
    read data.JPG ‏43 KB

    Hi
    Sorry, I missed that one. The file formatting is strange though. It uses spaces to separate columns but also within columns. I attached a modified VI that tries to take care of that, but it fails at the columns "Solar Energy" and "Hi Solar Rad.". This is very difficult to read programmatically as there's one space each between "Solar", "Hi", and "Solar" again. So how do we distinguish between column separator and space within column?
    Is download.txt the original file? Or was it probably modified by an editor that would replace tabs by space characters?
    Attachments:
    test-mod-2.vi ‏11 KB

  • How do I read a txt file and keep only IP addresses based on the first 2 or 3 octets of the IP?

    Hello,
    I have a text file and each line contains random text followed by an IP address as follows.
    some text....172.30.25.30
    some text.....172.30.85.10
    some text..172.30.25.35
    some text.......172.30.85.11
    some text....172.30.15.1
    some text...172.30.15.2
    some text.......172.10.1.1
    some text...172.20.4.2
    some text..172.10.1.2
    some text.....172.20.5.1
    I'd like to create an output file which has only one entry for each unique entry in the file where either the first 2 or 3 octets are unique as follows:
    Output File
    172.30.25
    172.30.85
    172.30.15
    172.10.1
    172.20
    Any suggestions are appreciated!
    Thanks for your help! SdeDot

    Thanks mjolinor.  Works great!
    Two questions.
    1. Could you plz suggest how this could be modified so this code would read the file in or accept it from the pipeline instead of wrapping the (@' around the data?
    2. Could you plz briefly describe some of the details of the code so I can further research and understand.
    Thanks for your help.
    Thanks for your help! SdeDot
    1. It already reads in the file.  The (@' .. '@) bits are just there to create a file using your test data to demonstrate that it works.
    2.  Not user what kind of "details" you want.  There really isn't much there, and get-help on the cmdlets used should provide information on what's going on with them in that script.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Read from text file and plot in real time

    Hello to everybody,
    I recently started using labview and so I know very few features, I apologize for any crap I'm about to write.
    My problem is as follows:
    _ A wireless node is sampling, with a known frequency, the voltage and the current of an electronic device
    _ These data are sent to a coordinator connected to the PC
    _ Each packet sent includes a single column with: Letter V followed by voltage samples, Letter I followed by current samples (all in a single column as in the attached example)
    _ The coordinator saves it in a .txt file
    I want to do a labview application that:
    _ Reads that file (continuosly update by the coordinator)
    _ Plots on two different graphs the values (over the time) of current and voltage
    Thanks for your help
    Danilo
    Attachments:
    TextData.txt ‏1 KB

    There are File IO examples that ship with LV which show you how to write to red from a file . A more fundamental question though is why have the file at all? Is it serving strictly as a data communication channel, or will it be used for something else?
    The "coordinator" that you mention, can it be accessed directly? Serial IO? TCP/IP? Telnet? ActiveX? .NET? Anything?
    If so, that would be the preferred way to handle this situation.
    Mike...
    PS: Sorry for the next bit, but I used to be a magazine editor and my grandmother was a school teacher so I am just a tiny bit anal retentive about word usage: In English "data" is a funny word in that while it is a singular form, it is (depending upon context) often understood to referring to multiple things and so can be sort of plural. Consequently, it is proper to say: "This data is sent.. " or "The data indicates...", but not, "The data are showing..". Likewise it is always incorrect to try to make it plural by saying "datas".
    PPS: The same goes for the word "code" when used as a noun. It can also be a verb, but that's a whole different rant...
    PPPS: Also be aware that many of the people who know me well would object to the "tiny bit" part...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Maybe you are looking for

  • Link not opening in Mainframe

    Good Morning (Well on my side its morning :P ) I am a newbie to web design and the company I work for wants me to design our floor intranet site. So after much experimenting we settled on Dreamweaver as being the most friendly package to develop this

  • MAX( , ) function in BEx formula

    Hello Experts! Does anyone know, how the mathematical function MAX( , ) in BEx-formulas work? Which are the two parameters if i want to have the maximum of the values in one colum? Or does this function work another way? Best Regards, Peter

  • Cube 0SD_C03 Development

    Hello Experts, We are installing the BI content cube 0SD_C03 which contains the sales, delivery and billing in a single cube. Now the user wants the report on sales order amount in which he requires the actual delivery date also. Here the actual deli

  • Account assignment category for services with ME21N

    Hello friends, I have created a purchase order with account assignment category K(cost centre) and material xxxxx with material type UNBW non valuated materials. But while doing GRN getting error, "ACCOUNT DETERMINATION FOR ENTRY xxxx KBS 0001 NOT PO

  • Can CS6 exploit the GPU on my desktop when accessed from my laptop with RDP?

    Just to clarify further: both machines running windows 7 professional or better (so the full version of RDP is available), and CS6 runiing on the desktop, accessed from my laptop. As the GPU is being used as a compute resource, will CS use the deskto