Output file as a text file with tab delimited and fixed length fields

Hi all,
I have developed a custom report which outputs an excel file on the user desktop who executes that report.Now i need to create an additional (second) excel file with almost the same data as the first file.
Im using the FM GUI_DOWNLOAD to create the file.i need have the 2nd file as txt file(seperated by space/tab delimited) and also i want the fields to have fixed length.For this format of the file,what parameters do I need to pass to the FM ?
BR,
SRM Tech.

Thanks for the prompt reply.
Also in the sel screen,Im entering the path where  the o/p file needs to be downloadede.g. C:/Output_folder/Output.xls...Now if I need a text file,do I need to give the fielname as C:/Output_folder/Output.txt.?

Similar Messages

  • Tab delimited and Right justified fields

    Hi
    My requirement is to produce an output file where the line items consists of 5 fields of variable lengths and all of them are tab delimited and right justified at the same time
    for eg.
    ABC       123456ghtje  4567.45678   67.45678  pqr
    where all the values in the first field 'ABC' and 2nd field '123456ghtje' are right justified and are tab delimited and asme is the case for '4567.45678' , '67.45678' and 'pqr'
    they are all separated from each other by a tab but are not fixed lengths
    How can i achieve that ? i am using File Receiver Adapter ??
    Can it be done without Adapter Module ?
    Thanks
    Dev
    Edited by: sd on Feb 22, 2010 2:25 PM
    Edited by: sd on Feb 22, 2010 2:26 PM

    > they are all separated from each other by a tab but are not fixed lengths
    When thay are not fixed length fields, why do you have to worry about left or right justification? In delimetted files, you would only have the delimitter between the fields. You do not need to fill spaces for justifying them.
    VJ

  • Transfer data in unix with tab-delimited

    Hi,
    How can we transfer data to unix with tab-delimited? I have incoming file with tab-delimited and want to copy as backup file in another folder in unix. When I read the incoming file, tab separator is translated into '#' so when I do transfer data to the backup folder, the file contains '#'.
    Is there a way to transfer data in tab-delimited?
    thank you
    alia

    try to use delimiter cl_abap_char_utilities=>HORIZONTAL_TAB.
    here is a piece of code:
    REPORT  ztestfile                               .
    DATA: BEGIN OF gt_file_out OCCURS 0,
            filed(2000),
          END OF gt_file_out.
    START-OF-SELECTION.
      DATA: lv_file_out LIKE filename-fileextern.
      CONCATENATE 'Hello' 'World' INTO gt_file_out SEPARATED
        BY cl_abap_char_utilities=>horizontal_tab.
      APPEND gt_file_out.
      lv_file_out = '
    XXXX\XXXX\mytest1.txt'.
      OPEN DATASET lv_file_out FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT gt_file_out.
        TRANSFER gt_file_out TO lv_file_out.
      ENDLOOP.
      CLOSE DATASET lv_file_out.
    Message was edited by: joseph fryda

  • Download the file in Presentation server with TAB Delimited

    Hi,
    I have to download the data of the finla internal table in presentation servr.
    The oup put file should be TAB Delimited. I can do the same with using LOOP.
    Is there any class or FM to do the same so that the out put file can be TAB Delimited.
    Sandeep

    HI,
    you can use the fm
    GUI_DOWNLOAD
    in that if you see the
    WRITE_FIELD_SEPARATOR - the import parameter, you can use this
    so that the fille will be downloaded with tab delimited.
    Regards,
    Venkatesh

  • How to write the location of a file in a text file?

    Hello All,
    I am doing a POC with the following scenario:
    Steps:
    1. Move a file from one location in your system to another location, say from C drive to D drive.
    2. After that i want to write the new location of the file in a text file.
    I have succesfully moved the file from C drive to D drive using the File Adapter and also FTP Adapter. However I am unable to copy or write the new location of the file into a text file. Please provide me any suggestions regarding this issue i am facing. Your help and support is highly appreciated. Thanks in advance.

    Hi,
    If want the file directory name to be captured in the BPEL process then add <element name="directory" type="string"/> in the inbound or outbound adapter header wsdl file. Then declare a variable of the header message type and in the 'adapter' tab of the receive or invoke activity select that variable which you previously created.
    Hope this helps.
    Rdgs.

  • Copy one text file to another text file and delete last line

    Hi all wonder if someone can help, i want to be able to copy one text file to another text file and remove the last line of the first text file. So currently i have this method:
    Writer output = null;
             File file = new File("playerData.xml");
             try {
                   output = new BufferedWriter(new FileWriter(file, true));
                   output.write("\t" + "<player>" + "\n");
                   output.write("\t" + "\t" + "<playerName>" + playerName + "</playerName>" + "\n");
                   output.write("\t" + "\t" + "<playerScore>" + pointCount + "</playerScore>" + "\n");
                   output.write("\t" + "\t" + "<playerTime>" + minutes + " minutes " + seconds + " seconds" + "</playerTime>" + "\n");
                   output.write("\t" + "</player>" + "\n");
                   output.write("</indianaTuxPlayer>" + "\n");
                  output.close();
                  System.out.println("Player data saved!");
             catch (IOException e) {
                   e.printStackTrace();
              }However each time the method is run i get the "</indianaTuxPlayer>" line repeated, now when i come to read this in as a java file i get errors becuase its not well formed. So my idea is to copy the original file, remove the last line of that file, so the </indianaTuxPlayer> line and then add this to a new file with the next data saved in it. So i would end up with something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <indianaTuxPlayers>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
         <player>
              <playerName>Default Player</playerName>
              <playerScore>0</playerScore>
              <playerTime>null minutes null seconds</playerTime>
         </player>
    </indianaTuxPlayers>
    However after all day searching the internet and trying ways, i have been unable to get anything working, could anyone give me a hand please?

    I would go the XML route too, but for fun, open a file as a BufferedWriter and do this:
    void copyAllButLastLine(File src, BufferedWriter tgt) throws IOException {
        BufferedReader in = new BufferedReader(new FileReader(src));
        try {
            String previous= in.readLine();
            for (String current = null; (current = in.readLine()) != null; previous=current) {
                tgt.write(previous);
                tgt.newLine();
        } finally {
            in.close();
    }

  • How to save the contents of a file(not a text file)

    Hi all, I want to save the contents of a file(,png file, not a text file) as a field in a class. Shall I have it as a string or byte array or something?
    I have tried saving a file in a string but there were some problems with loading the file from a different platform. Following is my code.
            String string;
            try {
                StringBuffer sb = new StringBuffer(1024);
                char[] characterArray = new char[1024];
                BufferedReader br = new BufferedReader(new FileReader(file));
                while(br.read(characterArray) != -1){
                    sb.append(String.valueOf(characterArray));
                br.close();
                string= sb.toString();
            } catch (IOException ex) {
                ex.printStackTrace();
            }and I use the following code to recover the string back to a stream, and save that stream back to a time later.
        ByteArrayInputStream bais = new ByteArrayInputStream(map.getBytes());I realized that because this file is not a text file, the string could cause some problems. But anyone could tell me if I should use a byte array or someting? and how?
    Any help would be appreciated!
    Cheers,
    Jing

    You should use a byte array, and the binary streams (InputStream a& OutputStream). Never use Strings and Reader/Writer if you have binary data.
    Kaj

  • How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files?

    How can I quickly view pdf files like I can do with Windows Picture and Fax viewer for jpg files? I need to look at several thousand PDF files. It takes too long to open each one individually. The only thing I could think of is combining them into large groups and then using the Navigation index. But I like the way windows Picture and Fax Viewer does it because you can keep the files separate. Combining PDFs causes loss of individual file names. That would be a problem since I do need to have the individual file names.

    Windows Picture and Fax Viewer is a DLL and is started via a rundll32.exe call and can't be set as an application to handle images in Firefox 3 and later versions.
    Try to set Windows Picture and Fax Viewer as the default viewer in Windows, then it should be listed automatically in the Mozilla Firefox Browse dialog.
    *http://www.winhelponline.com/articles/115/1/Windows-Picture-and-Fax-Viewer-as-the-default-viewer-in-Mozilla-Firefox.html
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How do I convert an audio mp3 file to a text file?

    How do I convert an audio mp3 file to a text file?

    StephenInAZ wrote:
    I keep responding to posters here but my responses dissapear.
    there were reasons for that, see:
    https://discussions.apple.com/static/apple/tutorial/tou.html

  • How to convert a HTML files into a text file using Java

    Hi guys...!
    I was wondering if there is a way to convert a HTML file into a text file using java programing language. Likewise I would also like to know if there is a way to convert any type of file (excel, power point, and word) into text using java.
    By the way, I really appreciated the help that you guys gave me on my previous topic on how to extract tests from a pdf file.
    Thank you....

    HTML files are already text files. What do you mean you want to convert them?
    I think if you search the web, you can find things for converting those MS Office files to text (or extracting text from them, as I assume you mean).

  • Issue with ODI 11g and Fixed width files

    Hi to everyone,
    i've got a problem with a flat file with fixed length fields. I delcared all correctly(it seems) and in the data preview i see the correct data, unfortunatly when i lounch my interface execution i receive an error telling that the dimension of the last filed is more than the declared one. It looks like he is not able to understand the end of the record that is the normale "0D0A".
    And i have also another question, anyone knows why inside my ODI Desiner i see always the same file also if i try to change the data inside? Is it a problem of release or some bug? Have i forgot to configure something in some place?
    Thank you in advance.
    B.

    Yes AyushGaneriwal,
    the problem was non printable characters in the last field of 2000 character arriving from Mainframe download, now i asked for a clean file and is working good.
    Thank you.
    B.

  • How do I Help Apple Care Stop Warring with Each Other and Fix the Problem with My iPhone that They Acknowledge Creating?

    How Do I Help Apple US & Apple Europe Stop Warring With Each Other And Fix The Problem They Created?
    PROBLEM
    Apple will not replace, as promised, the iPhone 5 (A1429 GSM model) that they gave me in London, UK, with an iPhone 5 (A1429 CDMA model).
    BACKGROUND
    My iPhone 5 (A1429 CDMA model) was purchased this year in September on an existing Verizon Wireless (VZW) line using an upgrade. The purchase took place in California and the product was picked up using Apple Personal Pickup through the Cerritos Apple Retail Store. I will refer to this phone at my "original" phone.
    The original phone was taken into the Apple Store Regent Street in London, England, UK on November 15, 2012. The reason for this visit was that my original phone's camera would not focus.
    The Apple Store Regent Street verified there was a hardware problem but was unable to replace the part.
    The Apple Store Regent Street had me call the US AppleCare. At first they denied support, but then a supervisor, name can be provided upon request, approved the replacement of my original phone with an iPhone 5 (A1429 GSM model) as a temporary solution until I got back in the US. And approved that the GSM model would be replaced with a CDMA model when I came back to the US. I will refer to the GSM model as the "replacement". They gave me the case number --------.
    The Apple Store Regent Street gave me the replacement and took the original. The first replacement did not work for reasons I do not understand. They switched out the replacement several times until they got one that worked on the T-Mobile nano SIM card that I had purchased in England, UK. Please refer to the repair IDs below to track the progression of phones given to me at the Apple Store Regent Street:
    Repair ID ----------- (Nov 15)
    Repair ID ----------- (Nov 16)
    Repair ID ----------- (Nov 16)
    The following case number was either created in the UK or France between November 15 to November 24. Case number -----------
    On November 19, 2012, I went to France and purchased an Orange nano SIM card. The phone would not activate like the first two repair IDs above.
    On November 24, 2012, I went to the Apple Store Les Quatre Temps. The Genius told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. They had me call the AppleCare UK.
    My issue was escalated to a tier 2 UK AppleCare agent. His contact information can be provided upon request. He gave me the case number -----------.
    The UK tier 2 agent became upset when he heard that I was calling from France and that the France Apple Store or France AppleCare were not helping me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault.
    The UK tier 2 agent said he was working with engineers to resolve my problem and would call me back the next day on November 25, 2012.
    While at the Apple Store Les Quatre Temps, a Genius switched the phone given to from repair ID ----------- with a new one that worked with the French nano SIM card.
    Also, while at the Apple Store Les Quatre Temps, I initiated a call with AppleCare US to get assistance because it seems that AppleCare UK was more upset that France was not addressing the issue rather than helping me. I have email correspondance with the AppleCare US representative.
    A Genius at the Apple Store Les Quatre Temps switched the replacement with a new GSM model that worked on the French SIM card but would not work if restored, received a software update, or had the SIM card changed. This is the same temporary solution I received from the Apple Store Regent Street in the UK.
    By this point, I had spent between 12-14 hours in Apple Store or on the phone with an AppleCare representative.
    Upon arriving in the US, I went to my local Apple Store Brea Mall to have the replacement switched with a CDMA model. They could not support me. He told me that my CDMA phone should not have been replaced with a GSM model in the UK and that this was clearly Apple's fault. My instructions were to call AppleCare US again.
    My call with AppleCare US was escalated to a Senior Advisor, name can be provided upon request, and they gave me the case number -----------. After being on the phone with him for over an hour, his instructions were to call the Apple Store Regent Street and tell them to review my latest notes. They were to process a refund for a full retail priced iPhone 5 64BG black onto my credit card so that I could use that money to buy a new iPhone 5 64GB black at the Apple Store Brea Mall to reoslve the problem.
    The Apple Store Regent Street did not process my refund. He, name can be provided upon request, told me that the AppleCare US did not do a good job reviewing my case, that they were incapable of getting to the bottom of it like they were, and instructed me to call AppleCare US and tell them to review this case number and this repair id. I asked if he read the notes from the AppleCare US Senior Advisor and he would not confirm nor deny. When I offered to give him the case number he accepted but it seemed like would do no good. Our call was disconnected. When I tried calling back the stores automated system was turned on and I could not get back through.
    Now I have the full retail price of an iPhone 5 64GB black CDMA on my credit card and Apple will not process the refund as they said they would.
    I've, at this point, spent between 14-16 hours at Apple Stores or on the phone with AppleCare representatives, and still do not have the problem resolved.
    SOLUTION
    AppleCare US and AppleCare Europe need to resolve their internal family issues without further impacting their customers.
    Apple is to process a refund to my credit card for the cost of a full retail priced iPhone 5 64GB black.
    DESIRED OUTCOMES
    I have an iPhone 5 (A1429 CDMA model) that works in the US on VZW as it did before I received the replacement phone in the UK.
    Apple covers the cost of the solution because I did not create the problem.
    Apple resolves their internal issue without costing me more time, energy, or money.
    This becomes a case study for AppleCare so that future customers are not impacted like I have been by their support system.
    Does anyone have recommendations for me?
    Thank you!
    <Edited by Host>

    Thanks, but I've been on the phone with AppleCare US (where I am and live) and AppleCare UK. They continue bouncing me back and forth without helping resolve the problem.
    Perhaps someones knows how to further escalate the issue at Apple?

  • How to output strings to an text file and excel file

    Hi guys,
    I am writing a simple application taht process some string inputs from user using a simple GUI. The GUI consists of a series of
    textfields which the user can enter names, age, addresses....etc
    Once they complete filling up that GUI form, they click SUBMIT. All the values will then be read. These strings are then required to be output to 2 files
    1. To a text file which I can open it and read it anytime I wish.
    2. To an excel file which follows a specific format. That is, all names will be written to column B, all ages will be written to column C...etc
    The programme is expected to keep running allow the user to enter details of multiple persons(some 300 sets of data of different persons) until he clicks on End program.
    Please advise how I can output the strings to
    1. Text file
    2. Excel file.
    Many many thanks. I need this for one of my project which is due so so soon...... :((
    Regards
    David

    1. Text file
    See link to "Documentation - Tutorials" on the left
    side of this page.
    2. Excel file
    Dont try to write the real excel format (if you want
    to do it soon).
    - write data to a plain text file.
    - Use tab stops for separation of values.
    - Name file as excel file. (*.xls)
    If you double click this file, excel will import data
    and insert it to a table in the right order by
    itself.
    Excel can save this as real .xls now.
    Anyone here with a better idea? (Try to learn by
    myself)good thing to know for the excel tip :)
    thx

  • Help needed saving text members to TAB delimited txt file

    I have 7 text memebrs each containing several lines of text
    that were pulled in and sorted from a TAB delimited text file.
    What I'd like to know is, is there any way to convert those
    text members back into the TAB delimited format from which they
    came? I'd like to be able to pull in the data, let it be edited to
    some extent, then saved back out..... and I'm not too sure how to
    go about it.
    Example of txt file:
    ID_No Name Age
    1 Phil 26
    2 Sam 34
    3 Mary 21
    They're then sorted in to text files of ID_No, Name, and Age,
    with the lists of the relevent items in each.
    Like.....
    ID_No
    1
    2
    3
    Name
    Phil
    Sam
    Mary
    Age
    26
    34
    21
    Certain lines of these text members change, depending on what
    the user selects. I'd like to put these sections back in their
    original TAB delimited format, but with any changed data replacing
    the old, so next ime the app is opened the new data is pulled in
    from the txt file.
    I know I'm probably going about this the wrong way, but it's
    the only way I know so far lol
    Any ideas?

    global filex, idlst, namelst, agelst
    on readtabline (str)
    tmpstr = ""
    y = 1
    repeat with x = 1 to the number of chars in str do
    if str.char[x] = tab then
    case y of
    1 : idlst.add (tmpstr)
    2 : namelst.add (tmpstr)
    3 : agelst.add (tmpstr)
    end case
    tmpstr = ""
    y = y + 1
    else
    tmpstr = tmpstr & str.char[x]
    end if
    end repeat
    agelst.add (tmpstr)
    end
    on exitFrame me
    idlst = [] --set up some lists to hold that data we read in
    namelst = []
    agelst = []
    filex = new (xtra "fileio")
    filex.openfile ("t.txt", 1)
    indata = filex.readfile() -- read the data in
    filex.closefile()
    filex = void
    repeat with x = 1 to the number of lines in indata do
    readtabline(indata.line[x]) --seprate it into its diffrent
    elements
    end repeat
    -- you now have your data sorted in to three list of id, age
    and name
    -- so you would now do what ever editing you wanted to do
    --now to write it out to a new file
    filex = new (xtra "fileio")
    filex.createfile (the moviepath & "tout.txt")
    filex.openfile (the moviepath & "tout.txt", 2)
    repeat with x = 1 to idlst.count() do
    filex.writestring (idlst[x] & tab & namelst[x] &
    tab & agelst[x] & return)
    end repeat
    filex.closefile()
    end
    I tested this on your exact scenario and it worked a brezze
    hope it helps
    Regards
    David

  • Using a "Scheduled Task" on a cisco controller to output data to a text file

    Can someone tell me if there is a way to run a Cron Job, RBA, or some other automated process on an 8510?  The idea would be to run the job every 5mins, and output the data to a text file.  Is this possible?

    In your script - you might be able to capture the error by putting your code inside a try/catch block. Something like:
    try {
    # do stuff
    } catch {
    $error.message | out-file c:\temp\script.txt
    G. Samuel Hays, MCT, MCSE 2012, MCITP: Enterprise Admin
    Blog:gsamuelhays.blogspot.com
    twitter:twitter.com/gsamuelhays

Maybe you are looking for

  • Bluetooth USB Dongle does not work

    I have this generic looking USB dongle (forgot the brand) that I use with my eMachines e725 laptop. It worked fine with Linux Mint 9 KDE 64bit that I had to use for the past 1.5 years. The moment I plugged the dongle in, it was instantly detected and

  • Editing XML for SPRY Demos

    Hello All, Apologies in advance if this is a topic that has been covered in the past. I searched through the previous posts, but didn't see what I was looking for. I am pretty new to SPRY, but have been able to put together a few different apps that

  • Function module exits for Tcode MD11.

    Please tell me, Function module exits for Tcode MD11. Reg . Praju

  • Oracle Reports 3 (D2K)

    Hi, I have got the Reports server running on an NT server (SP6a) and got a printer configured on the server. The problem I have is that everytime I schedule a report using the Reports Queue Manager I get the "REP-3002: Error initializing printer. Ple

  • How to disable temp-files automatically in ALL user-profiles?

    Hello! we use java in an attendance-clock-applet. unfortunately, the default system (JRE)-setting is always to KEEP the temporay files, which after a short while slows down all systems dramatically. also, very unfortunately we use shared desktops, so