Convert unix text file cannot be processed in BW

Hi,
via a SFTP interface we extract a csv file from windows NT server to our BW system (UNIX).
When we load the file into BW we get an error.
This is caused by UNIX, the way it stores the data.
Somehow we have to convert, before we load into BW, the file back from UNIX into DOS format.
Is their any smart solution for this problem? Can it be resolved by abap? Or must the SFTP software do the job?
Regards,
Hans

Try something in SFTP only as it is working fine for us. May be file transfer mode needs to be changes.
Regards,
RB

Similar Messages

  • Converting a text file into a String

    I need to convert a text file (in whatever format, in my case it would be xml and xsl files) in a String.
    I made this methods:
    public static String createStringFromFile(File f) {
            StringBuffer buf = new StringBuffer();
            try {
                FileInputStream fInp = new FileInputStream(f);
                byte[] byteArray = new byte[fInp.available()];
                int bLetti = fInp.read(byteArray);  
                if (bLetti == fInp.available()) {
                    for (int i=0; i<fInp.available(); i++)
                        buf.append(Byte.toString(byteArray));
    else
    throw (new IOException("Errore nella lettura del file"));
    fInp.close();
    } catch (Exception e) {
    ErrorManager.getError(e);
    return (buf.toString());
    public static String createStringFromFile(String fileName) {
    StringBuffer buf = new StringBuffer();
    try {
    FileInputStream fInp = new FileInputStream(fileName);
    byte[] byteArray = new byte[fInp.available()];
    int bLetti = fInp.read(byteArray);
    if (bLetti == fInp.available()) {
    for (int i=0; i<fInp.available(); i++)
    buf.append(Byte.toString(byteArray[i]));
    else
    throw (new IOException("Errore nella lettura del file"));
    fInp.close();
    } catch (Exception e) {
    ErrorManager.getError(e);
    return (buf.toString());
    There are no compilation or runtime errors, but the result string is empty. Not null, empty. What should I do? :)

    Do you really want to use bytes and so on when java does it all for you?
    Here's how I did it, hope it's useful.
    public String getFileAsString(String fileName){
         StringBuffer buffer = new StringBuffer();
         try{
         BufferedReader bRead = new BufferedReader(new FileReader(new File(fileName)));
         String str = "";
         while( (str = bRead.readLine()) != null ){
              buffer.append(str);
         }//end while
         bRead.close();
         }catch(Exception e){
         System.err.println("in getFileAsString(): " + e.toString());
         }//end try
         return buffer.toString();
    }//end getAsString()

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • How to convert the TEXT file into an XML using plsql code

    Hi all ,
    I need to convert an TEXT file into an XML file how can i do it
    Below is my sample TEXT file .
    TDETL00000000020000000000000120131021115854ST2225SKU77598059          0023-000000010000
    I want the above to be converted into the below format
    <?xml version="1.0" encoding="UTF-8"?>
    <txt2xml>
      <!-- Processor splits text into lines -->
      <processor type="RegexDelimited">
      <regex>\n</regex>
            <!--
            This is used to specify that a message should be created per line in
            the incoming file;
            NOTE: this was designed to work with all the processors, however it
            only works correctly with 'RegexDelimited' processors (check the
            enclosing top processor type)
             -->
             <maxIterationsPerMsg>1</maxIterationsPerMsg>
      <!-- For lines beginning with FHEAD (File Header) -->
      <processor type="RegexMatch">
      <element>FHEAD</element>
      <regex>^FHEAD(.*)</regex>
      <processor type="RegexMatch">
      <element>OriginalLine</element>
      <regex>(.*)</regex>
      <consumeMatchedChars>false</consumeMatchedChars>
      </processor>
      <processor type="RegexMatch">
      <element>LineSeq,Type,Date</element>
      <regex>^(\d{10})(\w{4})(\d{14})$</regex>
      </processor>
      </processor>
      <!-- For lines beginning with TDETL (Transaction Details) -->
      <processor type="RegexMatch">
      <element>TDETL</element>
      <regex>^TDETL(.*)</regex>
      <processor type="RegexMatch">
      <element>OriginalLine</element>
      <regex>(.*)</regex>
      <consumeMatchedChars>false</consumeMatchedChars>
      </processor>
      <processor type="RegexMatch">
      <element>LineSeq,TransControlNumber,TransDate,LocationType,Location,ItemType,Item,UPCSupplement,InventoryStatus,AdjustReason,AdjustSign,AdjustQty</element>
      <regex>^(\d{10})(\d{14})(\d{14})(\w{2})(\d{4})(\w{3})([\w ]{13})([\w ]{5})(\d{2})(\d{2})([+-]{1})(\d{12})$</regex>
      </processor>
      </processor>
      <!-- For lines beginning with FTAIL (File Tail) -->
      <processor type="RegexMatch">
      <element>FTAIL</element>
      <regex>^FTAIL(.*)</regex>
      <processor type="RegexMatch">
      <element>OriginalLine</element>
      <regex>(.*)</regex>
      <consumeMatchedChars>false</consumeMatchedChars>
      </processor>
      <processor type="RegexMatch">
      <element>LineSeq,TransCount</element>
      <regex>^(\d{10})(\d{6})$</regex>
      </processor>
      </processor>
      </processor>
    </txt2xml>
    Thanks

    Sorry, that doesn't make much sense.
    The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
    Are you a user of this utility?

  • How to find SVG coordinates which have been converted to text file?

    Hi all,
    I am currently developing a system that will read svg file. As svg file can be converted to text file, i already converted it. The problem is how is i going to read the coordinates provided by svg?I just want to read all the coordinates, nothing else...I hope you all can help.
    Regards..
    Edited by: Tommy1986 on Jul 8, 2008 12:45 AM
    Edited by: Tommy1986 on Jul 8, 2008 12:47 AM

    <?xml version="1.0" standalone="no"?>
    <svg width="6.666667in" height="4.166667in" viewBox="-0.000000 -0.000000 6.666667 4.166667">
    <g transform="matrix(1,0,0,-1,0,4.166667)">
    <polyline id="1" stroke="#000000" stroke-width="0.007874" fill="none" points="1.218750,2.614583 1.239583,2.666667 1.364583,2.791667 1.395833,2.885417 " />
    <polyline id="2" stroke="#000000" stroke-width="0.007874" fill="none" points="1.656250,2.802083 1.364583,2.802083 1.322917,2.541667 1.296875,2.489583 1.296875,2.364583 1.406250,2.260417 1.468750,2.244792 1.875000,2.244792 " />
    <path id="3" d=" M1.887762,2.247006 A0.531129,0.531129 0 0,1 1.657914,2.815088 " fill="none" stroke="#000000" stroke-width="0.007874" />
    </g>
    </svg>
    Hi BatraAnkit,
    Thank you very much for replying in my post. I really appreciate it Above is an example of svg file. What I am tring to do is to read only the polyline and the path collumn. Is there anyway to do it? As you can see, the svg is in xml format. Looking forwards to your reply..
    Regards,
    Tommy1986

  • How to convert CSV/Text files to XML format

    Hi,
    I am trying to convert a .csv/.txt(Flat) file(s) to XML format. How can i achive this?
    Ex: I want to convert this text file to XML.
    Book#      first name                                last name                               ID#                 ID1#      F#
    B99          FRISBY                                  NASIER                                  LUCJ A         A 3127      1    
    B131         HAWKINS                              MICHAEL                               LUCJ A         A 3129       2    
    B313         KING                                     JOSHUA                                 CUCJ I         I-DORM      10   
    B307         GRAVES                               KIMBERLY                              NUCJ F         F-DORM     24-FL
    R469         HEATH                                  DARRELL                                SUCJ A         A 3132       1    
    R212         PEREZ                                  DARRELL                                SUCJ A         A 3133       2    
    R62          COFFEY                                GREGORY                               NUCJ HC      H C 3112    3FLOOR
    R215         BLACKWELL                          DEREK                                   LUCJ OOW     W 01       1     Could anyone please suggest me if we have any open source java api to acheive this?
    Thanks,
    Srikanth.

    Have a look at [http://servingxml.sourceforge.net/|http://servingxml.sourceforge.net/] or [http://www.talend.com/|http://www.talend.com/]

  • Intermittently Text file cannot be opened directly from Finder

    One day I would like to duplicate a text file by right click such file to select "Duplicate". However I accidentally pressed "Return" before right click selecting "Duplicate". It means that after pressing "Return", I entered the mode to rename this text file name, but then I continuously to right click selecting "Duplicate".
    After that, I saw a duplicated text file with the same name plus "copy" after this name. The file was dim in color. I tried to delete it but Finder disallow me to delete it. Finder told me that it was occupied by other and ask me whether I would like to "Force Delete". Then I clicked yes. Deletion operation was successful.
    After that, when I opened the same original text file by directly double click the text file. The operation was failed and Finder output two error window prompt with below two error messages:
    "The application can't be found"
    "The operation can't be completed
    An unexpected error occurred (error code -43)"
    After that, I tried to check the information by clicking "Ctrl-I" on this file. By default, I use TextEdit to open text file. I tried to select TextEdit as the default application for all text file in the information window. However, Finder still output above two windows prompt of error messages.
    If I tried to open TextEdit or any other editor application first and then open such text file directly from its menu, the text file can then be opened.
    Even for files within the same directory, I also cannot directly double click them from Finder to open it. Until I close the Finder window and reopen a new Finder window of such directory, then I can double click to open text file, where it would be opened by my default text editor "TextEdit".
    After that, from time to time, such two error message windows will prompt out disallowing me to directly double click opening the text file. For example, originally a text file can be opened properly. After working on the file some time later and try to open the other text file in the same directory, such two message windows will prompt out. Or when I work such text file and the swap to other application, and then go back to Finder to double click such opened text file, such two error message windows will also prompt out. The only way to temporary fix it is to close the Finder window first and reopen it again.
    In addition, after such accident, I also discovered that Finder cannot instantly update directory content anymore. For example, I setup FTP server and someone can upload files to my Public directory, and where my Public directory has been opened before anyone ftp files to me, the Public directory cannot update itself after someone uploaded files to me through ftp.
    Or sometime I execute copy operation within VMware image to copy a file to shared directory, I also cannot see the directory in Finder update the content. I have to click to other directory and then go back to such shared directory so as to refresh the directory content list. Even I click "Ctrl-R", it cannot refresh the directory.
    In the past before such accident, Finder works fine to update directory content promptly after any upload or copy operation.
    In addition to bug fix patch, is there any workaround solution I can try to recover my Finder?

    HI,
    This is a shot in the dark but it can't hurt.
    Locate these files.
    com.apple.finder.plist
    com.apple.textedit.plist
    ~/Library/Preferences
    Move those files the Trash and restart your Mac.
    If that doesn't do the job, boot from your install disk and check the startup disk for errors.
    Insert Installer disk and Restart, holding down the "C" key until grey Apple appears.
    Go to Installer menu and launch Disk Utility.
    Select your HDD (manufacturer ID) in the left panel.
    Select First Aid in the Main panel.
    *(Check S.M.A.R.T Status of HDD at the bottom of right panel. It should say: Verified)*
    Click Repair Disk on the bottom right.
    If DU reports disk does not need repairs quit DU and restart.
    If DU reports errors Repair again and again until DU reports disk is repaired.
    When you are finished with DU, from the Menu Bar, select Utilities/Startup Manager.
    Select your start up disk and click Restart
    If the hard disk appears to be ok and you still can't launch Text Edit, back up all important data and perform an Archive & Install.
    http://theappleblog.com/2009/08/27/snow-leopard-the-installation-process/
    Carolyn

  • Converting a text file into an array

    import java.io.*;
    public class Copy {
    public static void main(String[] args) throws IOException {
         File inputFile = new File("farrago.txt");
         File outputFile = new File("outagain.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    int c;
    while ((c = in.read()) != -1)
    out.write(c);
    in.close();
    out.close();
    i have been working my way through the online tutorials and have found them very helpful, i have looked at array and would like to know how to convert data from a text file inot an array? using the above example how would i go about doing this?

    You'd use the readLine () method:BufferedReader reader = new BufferedReader (new FileReader (file));
    String line;
    List list = new LinkedList ();
    while ((line = reader.readLine ()) != null) {
        list.add (line);
    // don't know why you'd want this, but anyway
    String[] lines = (String[]) list.toArray (new String[list.size ()]);Kind regards,
      Levi

  • How to convert a text file content to String in JSP?

    Hi,
    I need to read the content of a text file and convert it into String and display it on to a JSP file.
    But the codings below don't work. Please advise me on how can i display the text file content.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    File adCheck = new File("list.txt");
    fis = new FileInputStream(adCheck);
    int Length = adCheck.length();
    byte arr[] = new byte[Length];
    int dataRead = 0;
    int totalData = 0;
    while(totalData <Length)
         dataRead = fis.read(arr,totalData,Length);
         totalData += dataRead;
    String Content = new String(arr);//byte array converted to String
    arr = null;

         InputStreamReader in=new InputStreamReader(fis);
          StringWriter out=new StringWriter();
          char[] buffer=new char[8192];
          int sizeRead;
          while ( ( sizeRead=in.read(buffer, 0, 8192) ) != -1 )
            out.write(buffer, 0, sizeRead);
         String content=out.toString();

  • "Filename could not be converted because protected files cannot be converte

    ok, why can't i burn an MP3 disc from the files i download from iTunes? When i try, i get the 'protected files cannot be converted' prompt. What setting do i have wrong that won't let me do this? any help? thanks.

    ok, so i burned 2 songs to CD using the 'burn to audio cd' option you mention - but now i'm trying to go into the CD to pull the files out to make them into Mp3 format - except that inside of the CD are only two .cda (CD audio track) files for the two songs and each file is only 1kb. So...where are the songs? This is incredibly frustrating since I just purchased an MP3 auto stereo that I thought I could burn my iTunes songs onto (as MP3's) so I can listen to them in my car. The whole point was to put more content on a CD (using mp3). I guess not. ****, i can't even make the iTunes songs 'unprotectable' so I can convert them. I feel like I've made a big mistake with iTunes because of the litigous/proprietary BS.

  • Convert a text file to PDF format

    Hi,
    How can I convert a text(.txt) to a excel file using Powershell commands ?
    At the moment I am doing the conversion with VBA, but time consuming, as its a very big file.
    Kindly help.
    MIG.

    There are other ways around the txt to pdf. Without seeing how the txt file looks it makes it a little hard to help but below is a great link that talks about how you can use the com objects.
    http://wiki.coolorange.com/display/powerjobs/Convert+office+documents+to+Pdf 
    If the log file is something you need in excel I would first work on converting the file to CSV and then you can use excel or if its something you can use word with I would rename the file to docx so the com object picks it up. If you can share one of the
    files it would be a big help.
    There is also a dll you can use that is great with working with pdf files below is the link. I you are okay with downloading a third party dll this is a great tool.
    http://sourceforge.net/projects/itextsharp/
    Searching The Forum I found the below link that is exactly what your looking for using the itextsharp dll to create pdf file from text files.
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/d6a6b165-b222-4b37-9021-9e9d639da30d/powershell-and-itextsharp
    Hope this helps

  • Record Sound From a Microphone and convert it text file using jave applicat

    Hi, I want source code for recording sound from a microphone which is connected to a sound card fixed in my machine,and convert that sound file to a text file , so that i can compare that text later with the command which i have stored already in my computer.How to do this in Java ? If any one could help me in solving this problem, it would be very helpful for me !

    Have you looked into the JSAPI?
    http://www.esus.com/docs/GetQuestionPage.jsp?uid=1471

  • Converting a text file into a PDF? PLZ help

    hi all,
    i need some help !
    i have a text file which i'm reading in to array of bytes and then i insert the bytes into an output stream.
    now i want to send this file to the client browser where it would open Adobe acrobat reader and display the contents .
    I'm using a servlet to acheive this and i've set the response.setContent("application/pdf")
    the obvious problem is Acrobat reader is not able to open the contents.
    is there a work around for this?
    i would be grateful if anyone could come up with a solution

    Hello.
    http://www.lowagie.com/iText/

  • How to convert a text file in lower case to upper case?

    I've a beginner in java world and I just come through the tutorial in http://java.sun.com/docs/books/tutorial/essential/io/filestreams.html showing how to copy a text file:
    import java.io.*;
    public class Copy {
    public static void main(String[] args) throws IOException {
         File inputFile = new File("farrago.txt");
         File outputFile = new File("outagain.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    int c;
    while ((c = in.read()) != -1)
    out.write(c);
    in.close();
    out.close();
    And I would like to ask how to covert all lower case letters in input file to upper case letter in output file at the same time of copying.
    I guess it'll be using Character.toUpperCase(c), but I don't know how to do it actually.
    Any help would be much appreciated.

    Hope this helps
    import java.io.*;
    public class Copy {
    public static void main(String[] args) throws IOException {
    File inputFile = new File("farrago.txt");
    File outputFile = new File("outagain.txt");
    FileReader in = new FileReader(inputFile);
    FileWriter out = new FileWriter(outputFile);
    BufferedReader buff = new BufferedReader(in);
    String c;
    while ((c = buff.readLine()) != null)
    out.write(c.toUpperCase());
    in.close();
    out.close();
    }

  • Converting Unix Executable Files for use in DVD Studio Pro

    I have several projects that were created in iDVD 2 back in 2002. In Finder, the file kind is listed as Unix Executable Files. If I add the extension .dvdproj using Get Info and try to open them in DVD Studio Pro, I get the error Wrong File Format and it will not open the project.
    The machine I am currently using does not have iDVD on it.
    Does anyone have a recommendation on a way to make these files usable for DVD Studio Pro? I understand if it is not possible.

    You can import iDVD project into DVD Studio Pro, however I think it won't work with projects from iDVD 5. I'm not sure about iDVD 2. Also these files have no extension and are listed as Unix Executable Files.

Maybe you are looking for

  • Issue in Bi publisher report format

    Hi we are generating OIM reports in BI publisher we have generated template for report in rtf format from bi publisher itself. We have edited that template to add some details on top of column.Now if we generate report using pdf format this detail ab

  • File import with OS command on FTP receiver adapter

    Hi gurus, I would like to write a script ("Run OS command before Message Processing")for importing a file from a FTP based on a condition, like if file_a.txt does not exist on folder RECEIVE/TXT than import file_a.txt from location IMPORT/TXT to RECE

  • Export Release Build errors

    This just started happening to me in the last day or two.  Every time I try to use Export Release Build, I get an error: A folder named bin-release already exists with different case. I checked my entire workspace folder and removed every bin-release

  • HT4436 Setting up RULES to eliminate spam.

    I am confused about my email. For years I have used the .mac address and still do. Does all this email go through iCloud now? I am asking because of RULES for blocking spam. Can I just setup the rules in iCloud or do I need to set up the rules in my

  • Why does the text jump up and down when I'm trying to read or click on something? It's damned annoying. How can I stop it

    Home page or email page, the page jumps up and down at random and when I try to click on something I often miss and end up clicking something I don't want. It gets real annoying and I can't find where to stop it. Why did someone think to do this in t