Writing in a in file and going to a new line.

Hello.
There's something in a program i am currently writing.
I'm trying to write in 2 files with a format like this :
line1.....
line2.....
In the first file, everything is ok but in the second file, with exactly the same instructions, instead og getting my file like i need it, i've something like that :
line1......               line2....
Here is the code i'm using to write in the file :
  DATA : t_ent_estim like STANDARD TABLE OF ZVOIENT WITH HEADER LINE.
  LOOP AT t_ent_estim.
    TRANSFER t_ent_estim TO p_fici.
  ENDLOOP.
  PERFORM close_file(zvoiform) USING p_fici w_result.
The only difference is that in one case i use an internal table and in the other i use a structure i created myself :
DATA : BEGIN OF tbl_csv_trans OCCURS 0,
        s_csvdata(400),
       END OF tbl_csv_trans.
Anybody can explain to me why with the internal table, the instruction transfer does not write in a new line each occurence of my table ?
Thanks for the help.

Hi Helder,
I have also used a structure, and it works fine for me.
Check whether you have opened the file in text mode.
data :  BEGIN OF i_final_file OCCURS 0,
    record(300) TYPE c,
END OF i_final_file,
Open the file for output **********************
OPEN DATASET wa_c_filename FOR OUTPUT IN TEXT MODE.
IF sy-subrc NE 0.
    MESSAGE a999 WITH 'The file could not be created'.
  ENDIF.
Write line items to file  ************************
  LOOP AT i_final_file.
    TRANSFER i_final_file TO wa_c_filename.
  ENDLOOP.
Close the file ******************************
  CLOSE DATASET wa_c_filename.
Regards,
Susmitha
Reward points if helpful

Similar Messages

  • Project Manager will not collect all files and Start a Complete New Project

    As editor of several projects consisting of multiple terrabytes of footage, it's very important to me to be able to use the project manager to collect all files and start a new project. However, this is not happening!! After I've completely finished a project I should be able to save a new "trimmed" project in the desired location of choice. When I use this feature with PrPro CS 4.2.1 - I only get a partial trimmed project that when opened asks where are the missing files. I've also tried using the project manager to collect all files and move to a new location. Again, only a part of my project is being moved!!!! Earlier versions of the PpPro had no problems with this function. I've got two systems and both of them are identical in actions. Any help would be greatly appreciated!!!
    BBTv

    How can one do that if each project has thousands of pieces of video, text templates, music scores, photoshop documents, after effect files and so on? The number of different folders per project is almost mind boggling. Any help at all in a quick fix or update or anything would be greatly appreciated. I don't have any problem with my other editing programs and have run earlier versions of PrPro that had no problems with collecting all the files within a project and exporting them to a new location throught project manager either in trimmed or full projects. I really hate to have to start using Final Cut again because of such an easy issue. I know I'm overlooking something and any help would be greatly appreciated.

  • I have installed the new OS and have lost a part of my personal data: music files and pictures. The new safari is horrible. Give me back the previous version!

    I have installed the new OS and have lost a part of my personal data: music files and pictures. The new safari is horrible. Give me back the previous version! Or fix the bugs!

    These are user-to-user forums, they are not monitored by Apple (there are too many forums/threads/messages for that to happen). If you want to leave feedback for Apple then you can do so here : http://www.apple.com/feedback/ipad.html
    What bugs ? Have you not got your music, files, photos on your computer so that you can sync them back to the iPad ?

  • Writing to specific cells of existing Excel file and saving as a new file using LV 8.6

    Hi all,
    I am new to LV and am currently tasked to create a program that can open an existing excel file, input data in the program that will be written to a specific cell in the excel file and then saving the current edited file as a new file.
    I have browsed through all the forums but I am unable to view the examples sent in them as I am using LV 8.6 which is why I am still having trouble visualizing how to create a program like this. Can anyone help me and mentor me how to write this program in this version of LV? I do not have a microsoft office toolkit hence another approach could be preferred. Thank you.
    Aaron
    Solved!
    Go to Solution.

    Thank you for helping me on this. However I do not really understand how does ActiveEx work. I have created a Vi according to the picture that you provided but there was some error in running the file.
    Below is my own VI that I am trying to create. It consists of multiple string inputs which I am trying to input each into an existing file. I have created a separate txt file which has the cell numbers. I am trying to allocate each string into each respective cell in an existing file. I am currently having the problem of doing this "allocation" of each string as I do not have the microsoft office tool kit. Is there any other way for me to do so?
    Also, I would like to save the newly created file as a new file with the name as seen in my VI. How would I be able to do it?
    Please help me as I am stuck here but do not know how to continue
    Attachments:
    untitled.JPG ‏33 KB

  • How to read a text file and only output every other line?

    I am just writing a program that reads a file but outputs only every other line. Any ideas...please? thanks

    I'd start with something like this and expand on it as you go:
    File file = <whatever>;
    BufferedReader in = null;
    try {
        in = new BufferedReader(new FileReader(file));
        int i = -1;
        for (String line = null; (line = in.readLine()) != null; ) {
            if ((++i % 2) == 0) {
                System.out.println(line);
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        if (in != null) {
            try {
                in.close();
            } catch (IOException e) {
    }Shaun

  • My computer crashed, how do I transfer all my files and apps to a new computer?

    Hi All,
    Please help! My computer crashed, how do I transfer all my files and apps on my iPad to my new computer?
    Thanks so much,
    Jeff

    '''Firefox''' is the name. ''Foxfire'' is a bio-luminescent fungus. <br />
    [http://en.wikipedia.org/wiki/Foxfire_(bioluminescence)]
    See this article for moving all your Firefox personal data to the new PC.<br />
    http://support.mozilla.com/en-US/kb/Recovering+important+data+from+an+old+profile

  • Jar file and source code? (new to java!)

    Hi all!
    Sorry if this is a dumb question but I'm really new to java (.net guy).
    Someone sent me a jar file and now I need access to source code. I now that I can rename to .zip and view its contents (.class)...
    But what about source code? Can I decompile? As i understand, .class files are compiled .java files...
    Should I ask for the source code to the guys that sent me the .jar file?
    thanks
    jay

    Humm... is java as fast as replies in this forum? Thank's for your replies warnerja and zadok
    I need the source code so that I can understand how the original developer solved a problem. I can ask for the source code.
    I posted this message because I was afraid that the question was stupid and source code was in front of me. I am really new to java!
    So. No source code in .jar or .class files. Right?
    Thanks
    Jay

  • File and printer sharing with new router WRT100

    I have a desktop PC running XP media center home edition hardwired to the router and a wireless laptop running Vista basic. About a year ago I was able to set up a wireless home network. I was thrilled to find out I could share files and a printer between the 2 PC's. Everything was working well until last week when my router died. I replaced the router with WRT100 and both PC's are back online but I lost file sharing. I am NOT technical and know little about PC's. I just stumble along. I spent hours trying to figure out the problem. I changed no seetings  on my computers except what was needed to install the new router.    What I do know is that the network wizard  is telling me the network is set up but when I go into a folder I want to share there is no tab that says "share file on the network". (when this tab was there I checked it and the under the folder an icon would appear to show the folder was shared on the network between the 2 computers).
    I can share the files within the PC with other users but not on the network with my other computer. I checked all the settings and cannot find a problem. I tried to ping the computer but got an error.  Stuff was sent but not received, whatever that means???
    Any assistance would be greatly appreciated. Thanks....

    If you are running any firewall, try disabling that. Make sure all computer's are set to same workgroup. Also turn on built on firewall on vista, and xp. Turn defender off on vista. Then try to ping and check for replys.

  • Tab going to a new line when end of line is reached

    In most text editors, when you hold the tab key down, the cursor goes from tab stop to tab stop across the line. When end of the line is reached, the cursor goes to the next line, again goes from tab stop to tab stop on the new line, and so on. You end up with multiple lines.
    In TLF, with tabStops set, holding the tab key down, the cursor goes from tab stop to tab stop across the line. But when the cursor reaches the end of the line, it doesn't go to the next line. The cursor stays at the end of the line while more tab characters are inserted into the text flow. There is always only one line.
    Is there a way for TLF to have the tab key go to the next line when the cursor reaches the end of the line?
    Thanks for the info.
    Will

    Thank you very much for the update.
    We also discovered that, any line which has the previous line ending in a tab, any leading tabs will not show. For example (all in the same <p>):
    Line one ...<tab/>
    <tab/>Line two
    The leading tab on line two will not display. If the previous line does not end with <tab/>, then the leading tab on the following line shows. Is this related?
    Also, will the fix come in a 2.x update? Any time frame?
    Thanks again for the info.
    Will

  • Text file - carriage return, creating a new line

    anyone know how to create a new line in a text file, something which is the text file equivelent of a BR (html) tag.

    in windows it's "\r\n"
    in linux/unix/bsd it's "\n"
    but the best way to do it is
    //this will return the newline character for whatever
    //platform your program is running on
    System.getProperty("line.separator");

  • I am trying to enable writing of my bookmarks file and have followed the directions to do so but I can't open the places.sqlite file. I have no application with which to open it.

    The problem I am trying to fix is that I can't save any bookmarks. I uninstalled then installed again and still have this problem. There are no other problems but this one. I have tried disabling my extensions but that didn't work.

    See:
    * http://kb.mozillazine.org/Bookmarks_not_saved
    * http://kb.mozillazine.org/Locked_or_damaged_places.sqlite

  • Rename files and move them into new folders with part of original file name

    I have tried using automator and other programs such as name Name Mangler with no luck.
    I am trying to have an AppleScript run when files are added to a folder, using a service through Automator.
    File names come in 9 different suffixes, all with the same prefix.
    Example:
    nonspecificprefixSUFFIX
    nonspecificprefixOTHERSUFFIX
    nonspecificprefixALSOSUFFIX
    I am trying to get the program to create a folder named after the prefix, then to remove the prefix from the files after moving them into this folder.
    There are 9 different suffixes that should remained unchanged.
    End goal would be to have child folders named nonspecificprefix, nonspecificprefix2 etc each with 9 files only containing the suffix portion of original name.
    If anyone has any tips to get me on the right path that would be much appreciated! I have thousands of files to rename and move so this would save me loads of time!

    Erwin,
    I was not able to systematically examine this issue, because it occurred on a production system and, of course, I uninstalled the Adobe iFilters as soon as I read that they may delete pdf files. Before the uninstallation I noticed the AR9 folders appearing on c:\ and moved them from time to time to another folder. Using the search function inside this folder, I found that all files were present in duplicate at least. I concluded, that after moving the AR9 folders they were recreated containing the same files. Consequently, these files cannot have been deleted. Searching for the origin of these files I found that they were part of pdf portfolios, therefore my conclusion that they are part of the indexing mechanism of the portfolios. What I have not done (and what I am not going to do since it is a production system) is to fill a folder with pdfs and track what is happening to the files.
    In case of my server, I think that the iFilters did not delete any files. Of course I cannot say what happens on other systems. I am definitely not going to reinstall the iFilters before knowing what they a really doing to the files.
    Not sure if this is of much help
    Michael

  • Copying Music Files and iTunes Playlists Onto New Computer

    I just received my new MacBook Pro and am going to need to copy my music files, iTunes playlists, etc. from my existing PC to my new MacBook Pro. Can anyone recommend some good/definitive articles or posts on how to do this seamlessly?
    One thing I should note is that while I keep a lot of my music in my iTunes folder, I also keep a lot of it in other folders on my hard drive, and I'd strongly prefer to maintain this file organization. I'm hoping this won't cause any issues with the transition. I also really, really, really hope I'm able to cleanly transition my playlists without having to manually recreate anything, as I have hundreds of playlists that I've spent literally thousands of hours curating!
    Thanks in advance,
    Alex

    if i were you, i would move my complete library to the Mac first. you can easily move content to different locations later on. please post back if you want to know more.
    my reasons are these:
    1) as the articles i linked above outline, it is not as simple as +drag & drop+ if you want to retain playlists, ratings, etc. when making the move from winsloth to Mac. check this thread for possible problems: http://discussions.apple.com/message.jspa?messageID=11495714#11495714.
    2) it is generally better to let iTunes do the moving of files. if you do his manually, chances are iTunes will lose track of their location.
    well, you might want to wait and see if another user comes up with a brighter idea
    good luck !
    JGG

  • Importing data from a .txt file and have Acrobat create new pages

    Hi everyone,
    I've created a form in Acrobat 9 to be used as an invoice. I want to be able to import data from an excel spreadsheet or .txt file into all the form fields. I know that I can go Forms > Manage form Data > Import Data to import 1 record at a time, but say I have about 50 invoices to populate, is there a way to import all the records at once and have acrobat create a new invoice for each of the customer's records?
    If there is a way, will it be compatible for Acrobat Reader users since this form will be used by someone who only has the Reader?
    Really appreciate any help.

    Sure.. this is what we use. "New Micro Right Click Tools"
    http://www.nowmicro.com/rct/

  • Reader is stuck on one file and wont load a new file why?

    reader is stuck on one file wont load a new file why?

    Hey george,
    Could you please let me know if you are using the latest version of Adobe Reader i.e. 11.0.10
    What OS version are you using?
    Have you opened the file on the web or within Reader itself?
    You might close the file, launch Reader and go to Edit> Preferences> Security(Enhanced) and uncheck 'Enable Protected Mode at startup' option.
    Let me know if this sorts your problem.
    Regards,
    Anubha

Maybe you are looking for

  • 5400 vs 7200 option on a MacBook Pro

    I'm was thinking of purchasing a 17" MBP from Amazon but realized that the MBP they sell comes with a 120 gig 5400 hard drive. On the Apple site I see that you have the option of getting a 100 gig 7200 HD instead. I plan to use an external FW800 driv

  • Sap query iview error

    Hi there! I have a sap query iview in the portal that should display a query in CRM (build with SQ01). The query in the backend is fine, but I get this error message in the portal. "Error in Source. Message not available" I have double-checked that t

  • Test Stand Evaluation

    Hi. I would like to get some feedback regarding using Test Stand with Labview. Currently I am using Delphi Interface as my Excecutive Engine and Active X server to communicate with labview. The data logging, PLC I/O and Login/logout are part of Delph

  • Can I say this is a bug ?

    Hello,          For details please see enclosed. Attachments: I believe bug.vi ‏19 KB

  • Trouble: Crsytal reports for SAP Best practices

    Hello Friends, I have downloaded crystal reports for SAP Best practices. There are bunch of Crystal reports whose data source is a infoset query. Below are the reports Cost Analysis: Planned vs. Actual Cost Variance for Cost Centers     Table: CSKT,