How to insert Newline in text file thr CL_ABAP_CHAR_UTILITIES

Hi,
I need to send a mail with TEXT file attachment which has many records in it. It is working fine. But the only problem is, all records are displayed in the 1st line itself. So i need to separate the records by inserting new line.
constants: c_new type c value CL_ABAP_CHAR_UTILITIES=>NEWLINE.
LOOP AT it_final INTO wa_final.
lv_menge = wa_final-menge.
CONCATENATE  wa_final-ebeln
           wa_final-bukrs
           wa_final-lifnr
           wa_final-ebelp
           wa_final-matnr
           wa_final-werks
           lv_menge
           c_new    " Newline
           INTO lv_txt SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
APPEND lv_txt to text.
CLEAR: lv_txt, lv_menge.
ENDLOOP.
For this code, i'm not getting the new line for each record.
Plz help me out for the same.
Thanks,
Ramesh

Hi ,
Sorry i cant get u.. Plz let me know exactly.. Now i replaced the Horizontal tab with CR_LF but even this is not working..
CONSTANTS: c_new type ABAP_CR_LF value CL_ABAP_CHAR_UTILITIES=>CR_LF.
      LOOP AT it_final INTO wa_final.
        lv_menge = wa_final-menge.
        CONCATENATE wa_final-ebeln
                   wa_final-bukrs
                   wa_final-lifnr
                   wa_final-ebelp
                   wa_final-matnr
                   wa_final-werks
                   lv_menge
"                   c_new
                   INTO lv_txt SEPARATED BY c_new. "cl_abap_char_utilities=>horizontal_tab.
        APPEND lv_txt TO text.
        CLEAR: lv_txt, lv_menge.
      ENDLOOP.
Correct me if i'm wrong..
Thanks
Ramesh

Similar Messages

  • How can u insert and retrieve text files in any format using forms6i.

    how can u insert and retrieve text files in any format using forms6i.
    can u give me an example of an insert statement, let's assume the file is located in the a:drive.
    and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
    e.g .pdf formatted file would open in acrobat.
    any help would be appreciated.
    Thanks
    Hussein Saiger

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • How to read a whole text file into a pl/sql variable?

    Hi, I need to read an entire text file--which actually contains an email message extracted from a content management system-- into a variable in a pl/sql package, so I can insert some information from the database and then send the email. I want to read the whole text file in one shot, not just one line at a time. Shoud I use Utl_File.Get_Raw or is there another more appropriate way to do this?

    how to read a whole text file into a pl/sql variable?
    your_clob_variable := dbms_xslprocessor.read2clob('YOUR_DIRECTORY','YOUR_FILE');
    ....

  • How do I get a text file from Photoshop  to work in the main sequence in pp?

    How do I get a text file to work properly in the master sequence. I moved it from Photoshop, which I learned to do from a tutorial, but when I move the animated text sequence to the master, it either isnt running, or it is scaled way too big. How do I get it to run in the main sequence?

    "Wont Work Here" !  Does not mean much.
    Are you having an audio or a video issue? 
    Looks like no video clip on the video layer above that section of audio.
    I am teaching myself this stuff completely on the fly
    I suggest you do the Basic Tutorials ( Adobe TV for example) in both Premiere Pro and PhotoShop.
    You need to be competent in the basics and fundamentals of these apps and that will also help you describe and discuss the issues.   Check the 'Products on this site....
    Adobe TV

  • How to read the whole text file lines using FTP adapter

    Hi all,
    How to read the whole text file lines when error occured middle of the text file reading.
    after it is not reading the remaining lines . how to read the whole text file using FTP adapter
    pls can you help me

    Yes there is you need to use the uniqueMessageSeparator property. Have a look at the following link for its implementation.
    http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIACDAAC
    cheers
    James

  • How to scan/ read a text file, pick up only lines you wanted.

    I'm new to Labview, I trying to wire a VI which can read a text file
    example below:
    Example: My Text File:
    1 abcd
    2 efgh
    8 aaaa
    1 uuuu
    and pick out only any line which start with number 1 (i.e 1 abcd)
    then output these 2 lines out to a a new text file?
    Thanks,
    Palmtree

    Hi,
    How do you creat your text files? Depending on the programm, there is added characters in the beginning and at the and of the file. So here you will find a VI to creat "raw" text files.
    To debug your VIs, use the probs and breakpoints, so you can solve the problem by your self or give an more accurate description of it.
    There is also the VI that read a integer and two strings  (%d %s %s)
    Attachments:
    creat text file.vi ‏9 KB
    read_from_file.vi ‏14 KB

  • How do I open a text file to sort using bubble sort?

    Hi,
    I have a text file, which is a list of #'s.. ex)
    0.001121
    0.313313
    0.001334
    how do you open a text file and read a list? I have the bubble sort code which sorts.. thanks

    I wrote this, but am getting a couple errors:
    import java.util.*;
    import java.io.*;
    public class sort
         public static void main(String[] args)
              String fileName = "numsRandom1024.txt";
              Scanner fromFile = null;
              int index = 0;
              double[] a = new double[1024];Don't use double. You should use something that implements Comparable, like java.lang.Double.
              try
                   fromFile = new Scanner(new File(fileName));
              catch (FileNotFoundException e)
    System.out.println("Error opening the file " +
    " + fileName);
                   System.exit(0);
              while (fromFile.hasNextLine())
                   String line = fromFile.nextLine();
                   a[index] = Double.parseDouble(line);Don't parse to a double, create a java.lang.Double instead.
                   System.out.println(a[index]);
                   index++;
              fromFile.close();
              bubbleSort( a, 0, a.length-1 );No. Don't use a.length-1: from index to a.length-1 all values will be null (if you use Double's). Call it like this:bubbleSort(a, 0, index);
    public static <T extends Comparable<? super T>> void
    d bubbleSort( T[] a, int first, int last )
              for(int counter = 0 ; counter < 1024 ; counter++)
    for(int counter2 = 1 ; counter2 < (1024-counter) ;
    ) ; counter2++)Don't let those counter loop to 1024. The max should be last .
                        if(a[counter2-1] > a[counter2])No. Use the compareTo(...) method:if(a[counter2-1].compareTo(a[counter2]) > 0) {
                             double temp = a[counter2];No, your array contains Comparable's of type T, use that type then:T temp = a[counter2];
    // ...Good luck.

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • How to append paragraph in text file of TextEdit application using applescript

    how to append paragraph in text file of TextEdit application using applescript and how do i save as different location.

    christian erlinger wrote:
    When you want to print out an escape character in java (java is doing the work in client_text_io ), you'd need to escape it.
    client_text_io.put_line(out_file, replace('your_path', '\','\\'));cheersI tried replacing \ with double slash but it just printed double slash in the bat file. again the path was broken into two lines.
    file output
    chdir C:\\DOCUME~1\
    195969\\LOCALS~1\\Temp\
    Edited by: rivas on Mar 21, 2011 6:03 AM

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • How to insert data from *.dmp file to  oracle 11g using Oracle SQL Develope

    hi
    i backup my database using PL/SQL developer and made *.dmp file
    how to insert data from *.dmp file to oracle 11g using Oracle SQL Developer 2.1.1.64
    and how to make *.dmp file from sql*plus ?
    thanks in advance

    Pl/Sql developer has a config window, there you choose the exec to do the import/export.
    Find it and his home version, it may be exp or expdp, the home version is the version of the client where the exp executable is.
    Then use the same version of imp or impdp to execute the import, you do not need to use Oracle SQL Developer 2.1.1.64. If you want to use it, you must have the same version in the oracle home that exp/imp of sql developer use.

  • HOW TO IMPORT HUNDREDS OF TEXT FILE TO DATABASE AS TABLE

    Hi,
    I have hundreds of text files in my computer. Every text file includes records. I want to see these records in one table at the database. How can I do that?
    thank you very much for help
    ömer faruk akyüzlü
    in Turkey

    I have a standard template that my developers use for reading text files using External Tables . Each developer gets an external table to read in test data. The format the data in CSV format, but you could use others. The External Table points to a generic file name, such as "csv_data". They then just rename the file or create a link to it, depending on the OS.
    My solution uses the Directory objects. The following can be put in a script and run passing the first argument as the developers name. It supports a csv file upto 15 columns, but you can expand it.
    -- begin script
    CREATE OR REPLACE DIRECTORY &1 as '/home/&1';
    grant read on directory &1 to public;
    alter session set current_schema=&1;
    --drop table csv_data;
    CREATE TABLE csv_data
    col1 VARCHAR2(250),
    col2 VARCHAR2(250),
    col3 VARCHAR2(250),
    col4 VARCHAR2(250),
    col5 VARCHAR2(250),
    col6 VARCHAR2(250),
    col7 VARCHAR2(250),
    col8 VARCHAR2(250),
    col9 VARCHAR2(250),
    col10 VARCHAR2(250),
    col11 VARCHAR2(250),
    col12 VARCHAR2(250),
    col13 VARCHAR2(250),
    col14 VARCHAR2(250),
    col15 VARCHAR2(250)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY &1
    ACCESS PARAMETERS
    (RECORDS DELIMITED BY newline
    NOBADFILE
    NODISCARDFILE
    NOLOGFILE
    SKIP 0
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    RTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    col1 CHAR, col2 char,col3 char,col4 char,col5 char,col6 char,col7 char,col8 char,col9 char,
    col10 char,col11 char,col12 char,col13 char,col14 char,col15 char
    LOCATION (&1:'csv_data')
    REJECT LIMIT Unlimited
    NOPARALLEL
    NOMONITORING
    --end script

  • How can i feed a text file into a Hashtable?

    Hi,
    im working on my third year project, im new to java and am struggling a little with writing the code.
    I need to feed a text file into my program and insert it into a hashtable. I presume i'll be using an input stream to feed the file in, how do i go about placin the text file into a hashtable??
    please help!

    ok, so im trying to code an authorship attribution
    program. the first part of the program need to
    compare a text file A (list of words), with another
    two text files B and C. Compare how? Do you want to know how many times certain words from list A appear in files B and C?
    The words in list A will first be compared to those
    in list B and than list C. I was wondering if there
    was a way of inserting file A,A Map is a list of key/value pairs, so what do you mean by inserting here? What are you inserting? What would the keys and values here be?
    followed by B,
    comparing the two files.....than inserting file C and
    comparing it with A??
    Does this make sense??Not quite, but it might just be me.

  • How to include non-photo text files when burning a DVD-RW

    I'm using Photoshop Elements 3.0.1 on Windows XP Service Pack 2.
    I want to include a couple of text (TXT) files on a DVD-RW disc that I'm going to burn my photos to. The text files will contain a chronicle of the trip on which I took the photos.
    I can't figure out how to get Photoshop Elements (PSE) to let me include these text files. Is there a way to do that in PSE? It seems to only allow you to work with photo files.
    As a work-around, I tried first burning the text files to the disc using Nero and not finalizing the disc. I then tried to use PSE's burn command to add the photos, but PSE objected that the disc was not empty and asked me if I wanted to erase its contents. When I said "No", it asked me to insert a different disc. So apparently PSE will only work with an empty disc or a partially-full disc that you are willing to erase first.
    Help!
    Thanks.
    Steve Westfall

    Ward,
    I didn't try burning the photos first and then burning the text files with Nero, because I read elsewhere in the forum that PSE has the nasty habit of always finalizing the disc when it finishes its burning session, which means you couldn't add anything to it in a subsequent burning session. However, I haven't verified that. I'll have to try it.
    The work-around that I finally came up with and successfully used was basically your second option. I used the export command to export the pictures that I want to a directory, and then used Nero to burn those pictures and anything else I want to the disc.
    Still, it seems like there ought to be a way to get PSE to include files other than photos.
    Thanks for your input.
    Steve

  • How do I export to text file and suppress the cr-lf at end of row?

    Hello.
    I have created a report that is mean to export to a text file.  It will always be a 1 row report and it's always going to be uploaded to a vendor via their website.  They don't want the cr-lf at the end of the row.
    I can't figure out how to get crystal to not do that.  When I export to a text file (not a tab delimited text file), it seems to throw in the cr-lf at the end of the row.  I have to manually remove it before uploading it.  This task of uploading the file will go to someone else in the near future and I would like to not have to rely on them to do it.
    Am I missing it?

    Could you please elaborate what do you mean by 'cr-lf'. Just came across these SAP notes,however don't know whether they are applicable in your context.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313331333533303333%7D.do
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313333333333373332%7D.do
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333033383337%7D.do
    Thanks

Maybe you are looking for