Empty file

Hi Guys,
I have idoc to file scenario.
The mapping is good and tested. The file is getting created in target directory but there are no payload values in it. Only a special character [] is present in text file. Please suggest
Thanks,

Hi,
1. Check in the file receiver in communication channel whether you are seeing x no of bytes transfered. (you can do this by clicking on the particular receiver file  channel)
2. check whether you have got write permissions to the target FTP. also check whether you are using any other credentials like SFTP or Proxy for connecting.
3. if using file content conversion then the error seems to be there. file is not getting converted as expected.
Regards,
Pavan

Similar Messages

  • File does not exist, or file is empty; you cannot upload empty files

    Hello,
    I've a problem when trying to upload any file to KM Repository (Content Administrator-KM Content-Root-documents). It shows the following error: File does not exist, or file is empty; you cannot upload empty files.
    I have applied SAP note 898637 but is still not working. We're using SAP EP 7.0 SP11.
    Please, what could be the problem?
    Thanks in advance,
    Belé

    We've put the Java paremeters in Configtool.bat :
    -Djava.io.tmpdir=c:/EP_TEMP
    -Dcm.tmpdir=c:/EP_TEMP     
    In Server/Instance. Folders: Message Server&BootStrap and in Servers General and in Instances/Server.
    I hope this helps you,
    Regards

  • How to generate a empty file in AL11 using ABAP and unix command

    Hi Experts,
    when load infopackage triggers it will search file from AL11 if file is available it will get loaded successfully.  When there is no file in AL11 error while opening file (orgin A) and the load will fail.  At this level i have to write a abap code using unix command to generate a empty file.
    Is there any way to achieve the above requirement.
    Thanks
    Vara

    Hi,
    If i get your requirement properly then you want to create a blank file if there is no file on the application server so that your infopackage does not fail, am i correct.
    If this is your requirement then this can be easily done if you use process chain to load the file via infopackage. Follow the following steps:
    1. Add a ABAP program before the infopackage and check if the file is present on the server or not. Use a simple ABAP statement OPEN DATASET <FNAME>. Check the SY-SUBRC after this statement if it is not 0 then it means that the file does not exist on the application server.
    2. Once you have established that the file is not present create a flat file using a code similar to the below one
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                          MESSAGE D_MSG_TEXT.
    IF SY-SUBRC NE 0.
      WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
      EXIT.
    ENDIF.
    * Transferring Data
    LOOP AT INT_table.
      TRANSFER INT_table-field1 TO FILENAME.
    ENDLOOP.
    * Closing the File
    CLOSE DATASET FILENAME.
    3. Add your infopackage step after this ABAP program in your process chain.
    I hope this helps.
    Best Regards,
    Kush Kashyap

  • Problem about Handling of Empty Files in File Adapter

    Hello everyone,
    NetWeaver 2004s --- XI
    In Sender i have a File Adapter.
    Now i meet a problem about Handling of Empty Files. When i send empty file, but don't cerate a leer message.
    I have seen following text in help document. But in adapter configuration i can not find the correspond parameter.
    can you give me some tips?
    Thx in advance
    best regards
    Yaning
    SAP Help Document über File Adapter
    +Handling of Empty Files
    Specify how empty files (length 0 bytes) are to be handled.
    &#9675;       Do Not Create Message
    No XI messages are created from empty files.
    The files are processed according to the selected Processing Mode.
    For example, if the processing mode is Delete, empty files are deleted in the source directory.
    &#9675;       Process Empty Files
    XI messages are created with an empty main payload.
    The files are processed according to the selected Processing Mode.
    &#9675;       Skip Empty Files
    No XI messages are created from empty files.
    Empty files are skipped and remain in the source directory.+
    Help Docu

    hi,
    it's available since Sp19 for XI 3.0
    and the corresponding SPS fpr XI 7.0
    http://help.sap.com/saphelp_nw04/helpdata/en/44/f565854b7341e6e10000000a1553f6/frameset.htm
    so probably you need to install the new SP
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Empty file handling in Receiver File adapter (FCC - Premature end of file)

    Hi
    My interface is Flat file to Flat File interface with file content conversion which is working fine in SAP PI 7.1 EHP1.
    If I want to process the empty file from sender system, PI should place the same empty file in the receiver FTP Location as per my requirement.
    I am facing the below error message when PI tries to place the empty file.
    Message processing failed. Cause: org.xml.sax.SAXParseException: Premature end of file.
    But if I am not using FCC, I am able to get the empty file at the receiver end.
    Please suggest on this, If I am using FCC in the receiver side.
    Thanks
    Gabriel

    Hi Gabriel,
                       You can write a simple script to copy a file from source folder to target in case the fiel size is ZERO bytes. The script will not copy the file if the filesize is more than zero bytes, This will be processed normally by PI server. You can call the script from sender communication channel parameter : "RUN OS command before message processing". Could you please specify the Operating System (OS) you are using in your PI server.
    Regards
    Anupam

  • Empty file receiver - file adapter

    Hello,
    Scenario: File->XI->File.
    In my scenerio, I am using Java mapping to name the target filename and creating text file that is later sent to FTP, in that way I don't have to use content conversation, to save performance...
    I am on PI7.1 version so I have checked the options (Processing Parameters) for empty file handling in Sender/Receiver file communication channels.
    Issue:- Though the target file is created but it always contain 1 byte(NULL character). Any ideas??
    Thanks
    Anshul

    > In my scenerio, I am using Java mapping to name the target filename and creating text file that is later sent to FTP, in that way I don't have to use content conversation, to save performance...
    >
    The java mapping is genarating output as text file,right??have you tested your java mapping in NWDS or eclipse,because when you test in Operation mapping you will get error for text file,because it is not well formed.
    if your java mapping genarating text files perfectly then file content conversion not required at all,just give file name in Communication channel.
    > I am on PI7.1 version so I have checked the options (Processing Parameters) for empty file handling in Sender/Receiver file communication channels.
    >
    Why you have selected  empty file handling??it is not required.
    > Issue:- Though the target file is created but it always contain 1 byte(NULL character). Any ideas??
    >
    >
    unselct empty file handling test your interface with real data.
    let me know your issue.
    Regards,
    Raj

  • Receiver file adapter creates empty files, Empty-Message Handling SP19

    Hello,
    We have just upgraded the system to SP19.
    One of the new features is that it should be possible to determine how XI messages with an empty main payload are to be handled in the receiver file adapter.
    If the parameter Empty-Message Handling is set to 'Ignore' no file should be created if the main payload is empty. In our case an empty file (size 0 kb) is still created even though the main payload is empty and the flag is set to 'Ignore'.
    Has anybody experienced the same problem?
    //  Best regards  Hans

    This should work:
    Use your own adapter module that parses incoming message and checks if it has any record sets in the document. If it does not have any record sets, then set the message to empty and then give this modified message to File receiver.
    For example, see the example code below:
    Module imports..
    Audit log import..
    DOM imports/SAX imports..
    public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException {
              try {
                   // get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.INBOUND);
                   Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"RemoveRootTag: Module called");
                   XMLPayload payLoad = msg.getDocument();
                   Document doc = parseXmlFile(payLoad.getInputStream());
                   if(doc != null){
                        if(!doc.getDocumentElement().hasChildNodes()){
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS, "Document is empty!!");
                             payLoad.setContent("".getBytes());
                             msg.setDocument(payLoad);
                   // provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
                   } catch (Exception e) {
                   // raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
                   // return XI message
              return inputModuleData;
         private Document parseXmlFile(InputStream xmlpayload) {
              try {
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   factory.setValidating(false);
                   //        Create the builder and parse the file
                   Document doc = factory.newDocumentBuilder().parse(xmlpayload);
                   return doc;
              } catch (SAXException e) {
              } catch (ParserConfigurationException e) {
              } catch(IOException e){
              return null;

  • Empty file getting generated

    Hi Experts,
    We are testing a newly migrated scenario from XI 3.0 to PI 7.1.
    The Interface mapping consists of Message mapping followed by a ABAP Mapping.This scenario works fine in XI 3.0
    whereas when i try to test the same scenario in 7.1 it creates an empty file.
    I have tried to test the scenario using the first with message mapping alone and then with  abap mapping alone.
    Both work fine generating the expected results.But when i try to run them together it creates an empty file.
    I have maintained the values in exchange profile
    IntegrationBuilder ->IntegrationBuilder.Repository -> com.sap.aii.repository.mapping.additionaltypes
    R3_ABAP|Abap-class;R3_XSLT|XSL (ABAP Engine)
    We are testing an apap mapping for the first time in 7.1.Please let me know if i am missing any specific setting.
    Thanks,
    Sudhansu

    Hi,
    I assume that the abap mapping does not gets called from the ABAP Stack. 
    Try entering the abap mapping name again and save and activate.  Sometimes this might work.
    Check the class in abap stack and try to regenerate it.
    In the worst case scenario, modify something in the abap mapping and regenerate it.
    Regards
    Krish

  • Handling empty files Using SFTP adapter

    Hi folks,
    Can any please let me know how to handle empty file handling in SFTP adapter as a sender.
    I getting error in sxmb_moni while empty file coming in sftp adapter. Please help me on this issue.
    Thanks,
    Enivass

    Hi,
    please select option "Empty file Handling-*do not create Message*" in sender comm channel as per your requirement.
    Try this.
    Reg

  • Empty file to process in customer J2EE adapter module

    Hi All,
    if i give an empty text file to a sender communication channel, then no message is generated by XI.
    i want to generate a dummy XML if empty file is given.
    so is it possible to make a customer-specific J2EE adapter module - then deploy it - then if in sender comm channel this adapter module is written before SAPAdapter module, then should XI generate a dummy XML for this empty file.
    i am asking this because i developed a J2EE adapter module, then deployed it, then tried to invoke it  from sender comm channel but this J2EE adapter module is not getting invoked - this i can tell because i have written the following lines only in Java class process method:
    <i>Message msg_audit = (Message)inputModuleData.getPrincipalData();
    AuditMessageKey amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
    Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                                 return inputModuleData;</i>
    but still in the audit log only 3 messages of entire file content converted to XML format, empty doc so no sending of message and deleting of empty file are coming.
    <b>Can anybody suggest whether is it possible to process an empty text file to generate a dummy XML in sender communication channel in XI.</b>
    Thanks,
    Rajeev Gupta

    Hi All,
    When i write this code:
    try
                                                                obj = inputModuleData.getPrincipalData();                                                  
                                                                msg_audit = (Message)obj;
                                                                amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
                                                                Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                       <i>File f = new File("/components/XITEMP/sample/PWC/check.txt");                                                            
                                                                          if (f.canWrite())
                                                                                         PrintStream ps;
                                                                                         FileOutputStream fos =new FileOutputStream(f);
                                                                                         File f1 = new File("/components/XITEMP/sample/PWC/check1.txt");
                                                                                         ps = new PrintStream(fos);
                                                                                         if (f1.exists()==false)
                                                                                              f1.createNewFile();                                                                    
                                                                                         ps.println("Testing");
                                                                                         ps.close();
                                                                                         fos.close();                                                            
                                                                               else
                                                                                    File f2 = new File("/components/XITEMP/sample/PWC/check2.txt");          
                                                                                    if (f2.exists()==false)
                                                                                              f2.createNewFile();                                                                    
                                                                               }               </i>                                        
    it works fine......it creates the file check1.txt
    but when i place the italiced code in this format:
         try
                                                                obj = inputModuleData.getPrincipalData();                                                  
                                                                msg_audit = (Message)obj;
                                                                amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
                                                                Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
                                                           catch (Exception e)
                                                                     try
                                                                          File f = new File("/components/XITEMP/sample/PWC/check.txt");                                                            
                                                                          if (f.canWrite())
                                                                                         PrintStream ps;
                                                                                         FileOutputStream fos =new FileOutputStream(f);
                                                                                         File f1 = new File("/components/XITEMP/sample/PWC/check1.txt");
                                                                                         ps = new PrintStream(fos);
                                                                                         if (f1.exists()==false)
                                                                                              f1.createNewFile();                                                                    
                                                                                         ps.println("Testing");
                                                                                         ps.close();
                                                                                         fos.close();                                                            
                                                                               else
                                                                                    File f2 = new File("/components/XITEMP/sample/PWC/check2.txt");          
                                                                                    if (f2.exists()==false)
                                                                                              f2.createNewFile();                                                                    
                                                                     catch(Exception ex)
    it doesnot create the file check1.txt......
    Can anybody suggest why in the exception block this italiced code is not working........means it is working in try block of try{}catch{} block.......but it is not working in catch block of try{}catch{try{}catch{}}
    Thanks,
    Rajeev Gupta

  • Empty file in sender comm channel

    i have issue with the empty files coming from the sender which are getting processed and getting saved in given file location.
    Now the problem is,these files donot contain data and rather just gets outputted with header and trailer with some dummy data usually spaces,some zeros,-- like this...,this makes the file size of some 444 bytes or 834 bytes but as it is not having any data,we need to goto SXMB_MONI everyday,check for files,if its empty,needs to  cancel them manually because it appears in red flag.
    To avoid this,i was thinking of setting the empty file option in processing of communication channel to SKIp messages or delete messages.
    Am i right in this approach?
    From other thread:
    "Currently when a process fails in PI due to an empty file the process needs to be manually set to u201Ccancelledu201D,where to locate in PI,what could be the problem and how it is to be solved.i have asked a similar question and hope that this error will help."
    please reply and show me right way of resolving this.
    thanks!
    cheers!
    Edited by: Prateek Raj Srivastava on Aug 19, 2010 10:54 AM

    Hi,
    As per ur req, its nt possible in this way.
    The empty file handling means the whole file is empty, the size is 0k.
    So in ur req, empty file means Header and Trailer present, but no data Records.
    we can achive this in following ways also,
    1.write an adapter module, to check if at all there is atleast there is 1 Data record, if not throw exception there itself.
    2.In the mapping check if at all there is any Data Record. If no Data Records raise exception and also the Alerts.
    Babu

  • Problem with „Empty-File Handling" in PI 7.11

    Hi,
    Iu2019m working in PI 7.11 with file adapter, Sender CC, option: Empty-File Handling: Process Empty Files.
    What I want to do is giving target file the system-date, if the source file is empty.
    But I always get a mapping error in RTWB: Premature end of file.
    It seems that the payload is empty.
    Any idea?
    Thanks a lot in advance!
    Rene Dong
    Edited by: Rene Dong on Aug 31, 2010 4:20 PM

    What I want to do is giving target file the system-date, if the source file is empty.
    The error you are getting makes sense. You should do a check in the mapping, if the payload is empty then use brute force to pass the system date.

  • File adapter with empty files!

    Hi guys,
    My scenario is: File -> XI (BPM) -> JDBC
    Under BPM I have a fork with two parallel receivers correlated and two sender file adapters for that. Those senders also have file conversion (.seq file to XML).
    My problem is: in case of files coming empty, is it possible that senders file adapter generates error during file conversion? And/or generates errors during correlations?
    If so, "I wouldn’t like", because after receive these two files I have a switch to check if the file(s) coming empty and a control step to terminate the process in case of true. But this only works if no errors have occurred on the earlier steps!
    At this moment I can’t test it, so I’m asking If anyone has faced an issue like this one?
    Thanks in advance,
    Ricardo.

    Hi,
    Which SP are you on?
    Before Sp19 on XI 3.0 and SP10 on Pi, Empty Files are ignored by XI. The file adapter picks the file and if it is a empty file ( a zero byets file ) the file does not create a message at all for the file.
    From Sp19, the file adapter has options that allow you to decide how to process the empty file. You can create an error message etc.
    Regards
    Bhavesh

  • Empty file not cleaned out by the cleaner

    Another day, another post about cleaner. Let me describe a problem on this sample dataset I have.
    I have a small BDB with the following 4 files
    -rw-rw-r-- 1 apps apps 34M Jul 18 21:58 00000061.jdb
    -rw-rw-r-- 1 apps apps 53K Jul 18 22:00 00000062.jdb
    -rw-rw-r-- 1 apps apps 34M Jul 18 22:00 00000063.jdb
    -rw-rw-r-- 1 apps apps 664K Aug 1 00:22 00000064.jdb
    When I run DBSpace on it, it reports this
    File 0x61: <summary totalCount="1" totalSize="35022741" totalINCount="0" totalINSize="0" totalLNCount="1" totalLNSize="35022741" obsoleteINCount="0" obsoleteLNCount="1" obsoleteLNSize="35022741" obsoleteLNSizeCounted="1"/>
    Recalculated File 0x61: <summary totalCount="1" totalSize="35022741" totalINCount="0" totalINSize="0" totalLNCount="1" totalLNSize="35022741" obsoleteINCount="0" obsoleteLNCount="1" obsoleteLNSize="0" obsoleteLNSizeCounted="0"/><extended-info recalcObosleteINSize="0" recalcObosletedLNSize="35022741"/>
    File 0x62: <summary totalCount="52" totalSize="53253" totalINCount="9" totalINSize="1493" totalLNCount="27" totalLNSize="50211" obsoleteINCount="9" obsoleteLNCount="23" obsoleteLNSize="1556" obsoleteLNSizeCounted="23"/>
    Recalculated File 0x62: <summary totalCount="52" totalSize="53253" totalINCount="9" totalINSize="1493" totalLNCount="27" totalLNSize="50211" obsoleteINCount="9" obsoleteLNCount="23" obsoleteLNSize="0" obsoleteLNSizeCounted="0"/><extended-info recalcObosleteINSize="1493" recalcObosletedLNSize="1556"/>
    File 0x63: <summary totalCount="1" totalSize="35603241" totalINCount="0" totalINSize="0" totalLNCount="1" totalLNSize="35603241" obsoleteINCount="0" obsoleteLNCount="0" obsoleteLNSize="0" obsoleteLNSizeCounted="0"/>
    Recalculated File 0x63: <summary totalCount="1" totalSize="35603241" totalINCount="0" totalINSize="0" totalLNCount="1" totalLNSize="35603241" obsoleteINCount="0" obsoleteLNCount="0" obsoleteLNSize="0" obsoleteLNSizeCounted="0"/><extended-info recalcObosleteINSize="0" recalcObosletedLNSize="0"/>
    File 0x64: <summary totalCount="521" totalSize="689233" totalINCount="115" totalINSize="24425" totalLNCount="165" totalLNSize="646260" obsoleteINCount="107" obsoleteLNCount="79" obsoleteLNSize="5132" obsoleteLNSizeCounted="79"/>
    Recalculated File 0x64: <summary totalCount="521" totalSize="689233" totalINCount="115" totalINSize="24425" totalLNCount="165" totalLNSize="646260" obsoleteINCount="107" obsoleteLNCount="79" obsoleteLNSize="0" obsoleteLNSizeCounted="0"/><extended-info recalcObosleteINSize="22468" recalcObosletedLNSize="5132"/>
    File Size (KB) % Used % Used (recalculated)
    00000061 34201 0 0
    00000062 52 91 91
    00000064 673 93 93
    00000063 34768 100 100
    TOTALS 69695 50 50
    To me this looks like file 61 could be compacted out.
    In a separate program, I try to clean/compact it.
                   props.put("je.log.fileMax", "1000000");
                   props.put("je.cleaner.minUtilization", "90");
                   props.put("je.cleaner.minFileUtilization", "5");
                   props.put("je.cleaner.minAge", "1");
                   props.put("je.cleaner.readSize", "64000000");
                   props.put("je.cleaner.lookAheadCacheSize", "64000");
                   props.put("je.maxMemory", "64000000");
    followed by open and do something like this
    boolean anyCleaned = false;
    while (bdbEnv.cleanLog() > 0) {
    anyCleaned = true;
    if (anyCleaned) {
    CheckpointConfig force = new CheckpointConfig();
    force.setForce(true);
    bdbEnv.checkpoint(force);
    cleanLog() does not indicate that anything can be cleaned.
    If I force it with this property (bad practice), it does clean up and create 2 nicely compacted 30M files.
    props.put("je.cleaner.forceCleanFiles", "0-1000");
    I have the following questions
    1) How can I get it to clean without forcing it? I am okay with extra resources to be used in cleaning it, because we have a set of files produced every hour that we never write to again, so once they are produced, I can spend some time on compacting/cleaning them for good. I can see that we are using 50% more space here, and that would be fine, but I did specify je.cleaner.minFileUtilization to be 5% so empty files should be removed.
    2) I also thought that setting je.log.fileMax would create files that are no more than 10M, but I am getting files that are 33M for some reason. The BDBs were created using same set of parameters.
    We are using 3.3.75 version. There is a newer version, but release notes do not make me think that this is going to be affected.
    P.S. We actually have a support contract, but I thought I'd post here first. We use BDB quite a lot in our large scale distributed system.
    -Emile

    Emile and I resolved this over email and I'd like to let everyone else know what happened, for the record and in case you run into it.
    This is a case where there is only one JE log file that has low utilization and needs cleaning -- all other log files have high utilization. A separate program is run that calls Environment.cleanLog and checkpoint in order to force the cleaning to occur. It closes the environment immediately after performing the cleaning.
    Here's what happened. File 61 is the file that needs cleaning.
    1. When the environment is opened, the built-in log cleaner daemon thread starts. It determines that log cleaning is needed, so it selects file 61 and starts cleaning it.
    2. Then the app calls cleanLog, which returns 0 because there are no files to be cleaned. File 61 is already being cleaned by the daemon thread.
    3. The app very quickly finishes and closes the environment, which aborts any log cleaning that is in progress. The cleaning of file 61 in the daemon thread is aborted.
    This is solved by disabling the cleaner daemon thread during the batch cleaning process. This is done by setting
    je.env.runCleaner=false
    in je.properties. You can also use EnviornmentConfig.ENV_RUN_CLEANER with EnvironmentConfig.setConfigParam.
    We'll add a note to the documentation of the cleanLog method about this.
    Emile, thanks for reporting this and working with me on it.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Empty file handling

    Hi All,
    I have a scenario, in which there is a possiblity of getting source file to be empty (0 bytes), In this case I need to trigger an email to the user reg the same. Please provide inputs.
    Regards,
    Nithiyanandam

    Hi,
        Maybe you can try out these scenario..
    In the sender file channel, keep option as process Empty files and in the sender ASMA properties, select options file name and source file size.
    Then in your message map, from a UDF, if the file size in ASMA is zero, you can trigger an email to the intended recipient. Search in SDN, you will get the code for triggering email from a UDF.
    Another option would be to go for a conditional receiver determination. There the condition would be the file size of the source file.
    In the receiver determination, select condition --> Context Object --> SourceFileSize under file namespace.. If this is 0, select a mail recipient as the receiver and send mail using mail adapter.
    If file size is not 0, select your original receiver.
    Regards

  • Empty file after replace

    Hello
    I am facing a very strange problem saving files. Find attached a quick example showing the issue.
    The first time I hit "save" and choose a name for the file (numbers.txt, for example), everything works great and the file is created with my data. Nevertheless, if I save the file numbers.txt the first time and then I click on "save" again and choose the same name for the file and click YES after "The file already exists. Do you want to replace it?", the file numbers.txt is replaced, but it gets empty!!!! If I click on "save" again and choose another name (results.txt, for example), the file results.txt is created properly. If I try to replace the file results.txt I will get the same error with an empty file again.
    I think that the issue has something to do with "trying to write SAME DATA TWICE in a file", even choosing to "replace" the file. If you stop running the VI, start again, and try to save replacing a file that already exists, the file will not get empty.
    Thanks.
    Dan07
    Solved!
    Go to Solution.
    Attachments:
    Save File - Problem.vi ‏11 KB

    Dear Dan07,
    After you are done writing to the file, you should finish the whole operation with closing the file. Also, your original code writes the same set of random nubers to the file all the time. If you place the random nuber generation code inside your while loop, it will run every time you press the save button and it will generate a new set of random numbers. Please see the attached snippet for an example.
    If you have any further questions, please feel free to ask!
    Daniel
    Attachments:
    Save File with Close.png ‏25 KB

Maybe you are looking for

  • Checkbox in table

    hi dear wd experts, i have created a 2 coloumns table, which retrieves data from a model object. It's context is nodeUTablenodeUrowsattribute1. the second table column contains a checkbox. For the checkbox I set up a node, which carries a bool variab

  • Imovie won't open a specific movie

    I have been working for 2 days on a project. I took audio that I recorded from Skype and brought it into imovie to edit because I want to add video but it kept crashing on me and I had problems opening it so I trashed what I had done and broke up the

  • Windows SBS 2011 Essentials out of space on C Drive

    Hi there! We have a Dell server running SBS Essentials 2011, and we have recently been getting messages saying that the C Drive is full. When we purchased the server, we ensured that Dell installed loads of storage for us which is confusing. Upon lo

  • Document Print & Modify on KM

    Hello All: I have a issue. I want a expert advice at the administration level i.e. Can i restrict users to take a print of my documents as well as restrict them to modify it. This problem is critically stuck. Lets assume if i even want to restrict au

  • WCF Web Service Support

    Does Xcelsius support Microsoft Windows Communication Foundation Web Services? I've downloaded the trail version of Xcelsius Engage 2008 and when I try to load a WCF WSDL I get an error message stating Unable to Load. Thanks in advance,