How to extract a tab delimiter file on appli server in openhub destination

Hi All,
in my scenario i want download a file on application server in tab delimiter file where iam not able to do it.while creating  OHD iam selecting seperator feild has ';'(semicolan).tab delimiter fule format is not posible with semicolan and even i tried it with "comma" also but not getting the tab delimiter formate.please help how to get that particular format..
thanks
vamshi..

Hi Dashyam,
May help you:----
with comma delimiter file read
I want to download comma delimiter file on to presentation server from inte
http://wiki.sdn.sap.com/wiki/display/ABAP/UploadaCommaDelimitedCSVfilethatcontainscommasindata+fields
Regards,
Suman

Similar Messages

  • Tab delimited file on app server. How to do that?

    Hello,
    When i transfer a tab delimited file from pre. server(windows) to app. server(windows) using CG3Z , the tab delimitation  is not working.
    for eg : the file with below layout
    01.04.2007     31.03.2008     1     120     
    01.05.2007     31.07.2008     2     140     
    is getting changed like
    01.04.2007#31.03.2008#1#120     
    01.05.2007#31.07.2008#2#140     
    All i need is a tab delimited file in app server also . Wats that i need to do for this ? Also how can i write a tab delimited file on app server through my program using open dataset.
    Thanks for ur time.
    Jeeva.

    Hi..
    Check this code: you will find the solution:
    Using the Static Attribute <b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b>
    Example:
    This is the Simple way you can download the ITAB with Tab delimiter:
    DATA : V_REC(200).
    OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT ITAB INTO WA.
      Concatenate WA-FIELD1 WA-FIELD2
             INTO V_REC
             SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
      TRANSFER V_REC TO P_FILE.
    ENDLOOP.
    CLOSE DATASET P_FILE.
    Note: if there are any Numeric fields ( Type I, P, F) In your ITAB then before CONCATENATE you have to Move them to Char fields ..
    Reward if Helpful.
    Example:
    DATA: V_RECORD(200).
    OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC <> 0.
      EXIT.
    ENDIF.
    DO.
    READ DATASET P_FILE INTO V_RECORD.
      IF SY-SUBRC NE 0.
        EXIT.
      ENDIF.
    SPLIT V_Record at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
                                INTO WA-FIELD1 WA-FIELD2.
    APPEND WA TO ITAB.
    ENDDO.
    <b>reward if Helpful.</b>

  • Generating tab delimited file on presentation server

    Hi All,
    I have to generate a tab delimited file on presentation server. The file shouldn't have '#' as separator. Instead it should be separated by TAB (when you press TAB button, some spaces will come naa... like that) ' '. Please advice me how to do this...
    Thanks in Advance,
    Regards,
    Phani

    Hi,
    Check this example..
    DATA: BEGIN OF itab OCCURS 0,
    matnr TYPE matnr,
    werks TYPE werks_d,
    END OF itab.
    itab-matnr = 'ABC'.
    itab-werks = 'ASDF'.
    APPEND itab.
    itab-matnr = 'EFG'.
    itab-werks = 'DHIS'.
    APPEND itab.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = 'C:\test.txt'
    write_field_separator = 'X'
    TABLES
    data_tab = itab
    EXCEPTIONS
    file_write_error = 1
    no_batch = 2
    gui_refuse_filetransfer = 3
    invalid_type = 4
    no_authority = 5
    unknown_error = 6
    header_not_allowed = 7
    separator_not_allowed = 8
    filesize_not_allowed = 9
    header_too_long = 10
    dp_error_create = 11
    dp_error_send = 12
    dp_error_write = 13
    unknown_dp_error = 14
    access_denied = 15
    dp_out_of_memory = 16
    disk_full = 17
    dp_timeout = 18
    file_not_found = 19
    dataprovider_exception = 20
    control_flush_error = 21
    OTHERS = 22.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    MESSAGE s208(00) WITH 'File downloaded'.
    ENDIF.
    Thanks,
    Naren

  • How to generate a tab delimited file in 4.6C

    Hi ,
      I have to genarate a tab delimited file in 4.6C version. I am concatenating all fields of internal table into one text line and passing that to file.How to give tab in <b>"concatenate"</b> statement under <b>"separated by "</b>. Please suggest.
    Thanks,
    sam.

    Hello Sam,
    CONSTANTS: CON_TAB TYPE X VALUE '09'.
           CONCATENATE G_T_OUTTAB-VBELN
                        G_T_OUTTAB-POSNR
                        G_T_OUTTAB-VKBUR
                        L_F_POSID
                        G_T_OUTTAB-BSTKD
                        L_F_NETWR
                        L_F_ERDAT_OR
                        L_F_ERDAT_IN
                        G_T_OUTTAB-VBELN_IN
                        L_F_ERDAT_DE
                        G_T_OUTTAB-VBELN_DE
                        INTO OUTPUT
                        SEPARATED BY CON_TAB.
    Vasanth

  • Read Tab delimited File from Application server

    Hi Experts,
    I am facing problem while reading file from Application server.
    File in Application server is stored as follows, The below file is a tab delimited file.
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
    The code is as Below.
    c_split  TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
    here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
    OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
          IF sy-subrc = 0.
            WRITE : /,'...Processing file - ', wa_filename-file.   
           DO.
          Read the contents of file
              READ DATASET wa_filename-file INTO wa_file-data.
              IF sy-subrc = 0.
                SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
                                                   wa_adrc_2-title
                                                   wa_adrc_2-name1
                                                   wa_adrc_2-name2
                                                   wa_adrc_2-name3
                                                   wa_adrc_2-name4
                                                   wa_adrc_2-name_co
                                                   wa_adrc_2-city1
                                                   wa_adrc_2-city2
                                                   wa_adrc_2-regiogroup
                                                   wa_adrc_2-post_code1
                                                   wa_adrc_2-post_code2
                                                   wa_adrc_2-po_box
                                                   wa_adrc_2-po_box_loc
                                                   wa_adrc_2-transpzone
                                                   wa_adrc_2-street
                                                   wa_adrc_2-house_num1
                                                   wa_adrc_2-house_num2
                                                   wa_adrc_2-str_suppl1
                                                   wa_adrc_2-str_suppl2
                                                   wa_adrc_2-country
                                                   wa_adrc_2-langu
                                                   wa_adrc_2-region
                                                   wa_adrc_2-sort1
                                                   wa_adrc_2-sort2
                                                   wa_adrc_2-deflt_comm
                                                   wa_adrc_2-tel_number
                                                   wa_adrc_2-tel_extens
                                                   wa_adrc_2-fax_number
                                                   wa_adrc_2-fax_extens
                                                   wa_adrc_2-taxjurcode.
    WA_FILE-DATA is having below values
    ##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
    And this is split by tab delimited and moved to other variables as shown above.
    Please guide me how to read the contents without "#' from the file.
    I have tried all possible ways and unable to get solution.
    Thanks,
    Shrikanth

    Hi ,
    In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
    More over i would suggest you to ist replace # with some other  * or , and then try to see in debugging if any further  # appears..
    and no # appears then try to split now.
    if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
    and then again try to replace it and then split..
    Please follow the process untill all the # are replaced...
    This should work for you..
    Let me know if you further face any issue...
    Regards
    Satish Boguda

  • UPLOADING tab delimited file onto FTP server

    Hello all
    Can i upload a tab delimited file onto the FTP server. If yes then how
    points guranteed if answered!!

    Hi,
    Yes you can do this one .. you can have a look at the standard program 'RSEPSFTP'.
    REPORT ZFTPSAP LINE-SIZE 132.
    DATA: BEGIN OF MTAB_DATA OCCURS 0,
    LINE(132) TYPE C,
    END OF MTAB_DATA.
    DATA: MC_PASSWORD(20) TYPE C,
    MI_KEY TYPE I VALUE 26101957,
    MI_PWD_LEN TYPE I,
    MI_HANDLE TYPE I.
    START-OF-SELECTION.
    *-- Your SAP-UNIX FTP password (case sensitive)
    MC_PASSWORD = 'password'.
    DESCRIBE FIELD MC_PASSWORD LENGTH MI_PWD_LEN.
    *-- FTP_CONNECT requires an encrypted password to work
    CALL 'AB_RFC_X_SCRAMBLE_STRING'
         ID 'SOURCE' FIELD MC_PASSWORD ID 'KEY' FIELD MI_KEY
         ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD MC_PASSWORD
         ID 'DSTLEN' FIELD MI_PWD_LEN.
    CALL FUNCTION 'FTP_CONNECT'
         EXPORTING
    *-- Your SAP-UNIX FTP user name (case sensitive)
           USER            = 'userid'
           PASSWORD        = MC_PASSWORD
    *-- Your SAP-UNIX server host name (case sensitive)
           HOST            = 'unix-host'
           RFC_DESTINATION = 'SAPFTP'
         IMPORTING
           HANDLE          = MI_HANDLE
         EXCEPTIONS
           NOT_CONNECTED   = 1
           OTHERS          = 2.
    CHECK SY-SUBRC = 0.
    CALL FUNCTION 'FTP_COMMAND'
         EXPORTING
           HANDLE = MI_HANDLE
           COMMAND = 'dir'
         TABLES
           DATA = MTAB_DATA
         EXCEPTIONS
           TCPIP_ERROR = 1
           COMMAND_ERROR = 2
           DATA_ERROR = 3
           OTHERS = 4.
    IF SY-SUBRC = 0.
      LOOP AT MTAB_DATA.
        WRITE: / MTAB_DATA.
      ENDLOOP.
    ELSE.
    * do some error checking.
      WRITE: / 'Error in FTP Command'.
    ENDIF.
    CALL FUNCTION 'FTP_DISCONNECT'
         EXPORTING
           HANDLE = MI_HANDLE
         EXCEPTIONS
           OTHERS = 1.  
    Regards
    Sudheer

  • How to upload a TAB Delimited file and pls tell me the internal tble format

    Hello All,
    When i upload a TAB Delimited .txt file its giving me # Symbols in between the internal table fields.
    pls advise.
    Suresh

    data: begin of wa_input,  
            plnnr(8) type c,   
            plnal(2) type c,   
            vornr(4) type c,   
            arbpl(8) type c,   
            steus(4) type c,   
            ltxa1(40) type c,  
            ltext(1000) type c,
           end of wa_input.    
    data: i_input like wa_input occurs 0 with header line.
      call function 'WS_UPLOAD'                  
           exporting                             
                filename            = p_input " file path
                filentype           = 'DAT'      
           tables                                
                data_tab            = i_input    
           exceptions                            
                file_open_error     = 1          
                file_write_error    = 2          
                invalid_filesize    = 3          
                invalid_table_width = 4          
                invalid_type        = 5          
                no_batch            = 6          
                unknown_error       = 7.

  • How to create a TAB Delimited file with blank columns

    Hi,
    In my requirement i want to generate a tab delimated file. So i used  FCC in Reciever CC and am able to create a tab delimated file. But the file content is not in the format i am expecting.  File created  as shown below.
    Eid       First Name      Middle Name         Last name
    7          raj                   reddy                    petter
    8          ram                 johnson
    Here 'Johnson' is last name of 'ram', But it displayed under the 'Middle name' column, as the employee does not have the middle name.
    But i want file in the format shown below.
    Eid       First Name      Middle Name         Last name
    7          raj                   reddy                    petter
    8          ram                                             johnson
    Please suggest me what i need to do to generate the file in the required format.
    Thanks  in Advance..
    Regards
    Sreeni

    Hi,
    You can handle this in mapping. just pur a condition for all the fields(middle name, last name) if missing like
    field---
              equalS-----If then----Constant(Space)-----Target field ---else----Field-----Target Field.
    Constant(blank)
    Thanks!

  • Reading tab delimited file from application server

    Hi All,
    I do know that we need to use Open data set to read a file from application server, but my question is when you use  read DATASET v_file into wa_final -  this wa_final is an work area and also i have mentione an internal table. so do we need to Split the record at tab into the corresponding fields. Append the records into an internal table i_input.????
    Please let me know on this....
    thanks in advance....
    Poonam....

    Hi,
    first see the file contents in application server, how the contents whether the contents seperated by any symbol or not, if the contents seperated by any symbol then you have to split the data before appending to internal table.
    check this code.
    DATA: l_data_string TYPE string.
      filename = p_file.
      OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc EQ 0.
        DO.
          READ DATASET filename INTO l_data_string.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          CLEAR k_input.
          SPLIT l_data_string AT '#' INTO k_input-agreement k_input-suffix k_input-status
                k_input-first_name k_input-last_name k_input-job_title k_input-tel k_input-fax k_input-email_address k_input-mob_number.
          APPEND k_input TO i_input.
        ENDDO.
      ENDIF.
    Regards,
    Venu

  • Handling Tab Delimited File generation in non-unicode for multi byte lang

    Hi,
    Requirement:
    We are generating a Tab Delimited File in different languages (Single Byte and Multi Byte) and placing the files at application server.
    Problem:
    Our system is a Non-unicode system so we are facing problems with generation of Tab delimited file for multibyte languages like Russian, Japanese, Chinese etc.,
    I am actually using data: d_tab TYPE X value '09' but it dont work for multi byte. I cant see tab delimited file at application server path.
    Any thoughts about how to proceed on this issue?Please let me know.
    Thanks & Regards,
    Pavan

    >
    Pavan Ravikanti wrote:
    > Thanks for your answer but do you reckon cl_abap_char_utilities will be a work around for data: d_tab type X VALUE '09' .
    > Pavan.
    On a non-unicode system the X Variant is working, but not on a unicode system. Here you must use the class. On the other hand you can use the class on a non-unicode system und your char var will always be correct (one byte/twobyte depending on which system your report is running).
    What you are planning to do is to put a file with an amount of possible characters into a system with has a less amount of characters. Thats not working in no way.
    What you can do is to build up a multi-code-page system where the codepage is bound to the user or bound to the logon-language. Here you you can read and process textfiles in several codepages - but not a textfile in unicode. You have to convert the unioce textfile into a non-unicode textfile before processing it.
    Remember that SAP does not support multi-code-page Systems anymore and multi-code-page systems will result in much more work when converting the system to unicode.
    Even non-unicode system will not be maintained by SAP in the near future.
    What you encounter here are problems for what unicode was developped. A unicode system can handle non-unicode textfiles, but the other way round will always lead to problems which cant be solved.

  • Splitting tab delimited file?

    how to split a tab delimited file?

    Hi,
    Do like this
    *--Local Variables
      DATA : l_file       TYPE string,
             l_line(1000) TYPE c.
    *--Clear
      CLEAR : l_file.
      l_file = p_aifile.
    *--Read the data from application server file.
      OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE c_ok.
        MESSAGE i368(00) WITH text-014.
      ENDIF.
    *--Get all the records from the specified location.
      DO.
        READ DATASET l_file INTO l_line.
        IF sy-subrc NE c_ok.
          EXIT.
        ELSE.
          SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
                          INTO st_ipfile-anlkl
                               st_ipfile-txt50
                               st_ipfile-txa50
                               st_ipfile-anlhtx
                               st_ipfile-sernr
                               st_ipfile-invnr
                               st_ipfile-aktiv
                               st_ipfile-invzu
                               st_ipfile-kostl
                               st_ipfile-raumn
                               st_ipfile-ord41
                               st_ipfile-gdlgrp
                               st_ipfile-herst
                               st_ipfile-typbz
                               st_ipfile-afabe
                               st_ipfile-afasl
                               st_ipfile-ndjar
                               st_ipfile-ndper
                               st_ipfile-tafabe
                               st_ipfile-tafasl
                               st_ipfile-tndjar
                               st_ipfile-tndper
                               st_ipfile-anbtr01
                               st_ipfile-anbtr02
                               st_ipfile-anbtr03
                               st_ipfile-anbtr04.
          APPEND st_ipfile TO it_ipfile.
        ENDIF.
      ENDDO.
    *--Close dataset
      CLOSE DATASET l_file.
    Regards,
    Prashant
    Edited by: Prashant Patil on Mar 5, 2008 4:11 PM

  • Create tab delimited file

    Hi,
    I must create a tab delimited output complex text file from a read on a database table. The file has multiple record lines in it. I have created the XSD from the sample output file and have each field terminated by a './T' . I must pass a tab for each field regardless of whether it is populated from my source data. I can not send a space in the field. How can I map a null value through the XSLT so that the output file has a tab? I've tried setting a default on the xsd but that seems to do nothing. Currently I am setting a fixed text through the mapper to space for all the fields that I do not use. I then go into the XSL and remove the space from the <xsl:text></xsl:text> element. This works, however when I go back into the mapper and change anything through the xslt, it wipes out all of my empty text elements.
    Any ideas on how to create a tab delimited file that has tabs for fields that have no data?
    Thank you much,
    Kevin Meyer

    Hi,
    I must create a tab delimited output complex text file from a read on a database table. The file has multiple record lines in it. I have created the XSD from the sample output file and have each field terminated by a './T' . I must pass a tab for each field regardless of whether it is populated from my source data. I can not send a space in the field. How can I map a null value through the XSLT so that the output file has a tab? I've tried setting a default on the xsd but that seems to do nothing. Currently I am setting a fixed text through the mapper to space for all the fields that I do not use. I then go into the XSL and remove the space from the <xsl:text></xsl:text> element. This works, however when I go back into the mapper and change anything through the xslt, it wipes out all of my empty text elements.
    Any ideas on how to create a tab delimited file that has tabs for fields that have no data?
    Thank you much,
    Kevin Meyer

  • Truncated last blank column in fixed width tab delimited file

    Hi All,
               I've to generate fixed width tab delimited file in application server.As per my requiremnt  Last column in the file should be blank. When i have generated file last column is truncated because it is populated blank.
    Need solution to get the last column with blank data.
    Thanks
    Kiran

    Hi,
    The last column is not truncated I hope,bcoz it is space,u were not able to find it.
    Read the file into internal table and see in the debugging mode if it is present or not.

  • How to convert Mail attachment file Tab Delimited file to XML.

    Hi PI Experts
        I have XI scenario: MAIL  XI SAP (ABAP Proxy), the process is
    1.     XI will receive tab delimited file as attachment in mail.
    2.     XI will convert the tab delimited file into XML, then map to the target structure.
    3.     Target will be posted into ECC through ABAP Proxy.
    Can anyone help me how can I convert the attachment file (i.e. Tab delimited file) to XML while configuring the sender side.
    Thanks in Advance

    I just grabed what I answered from another thread. It should work.
    Processing sequence as follows:
    1. localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swap1
    2. localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean tran1
    3. sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
    Module Configuration as follows: Fill the XXXX part with your info.
    swap1 swap.keyName payload-name
    swap1 swap.keyValue MailAttachment-1
    tran1 Transform.Class com.sap.aii.messaging.adapter.Conversion
    tran1 Transform.ContentType ext/xml;charset=utf-8
    tran1 xml.conversionType SimplePlain2XML
    tran1 xml.documentName XXXXXXX_Mail
    tran1 xml.documentNamespace http://XXXXX.com.au/XXXX
    tran1 xml.fieldSeparator \t
    tran1 xml.processFieldNames fromConfiguration
    tran1 xml.structureTitle rows
    Once you set up the above configuration, you will get one record at a time.
    Create a souce message interface like the followings:
    XXXXXXXXX_Mail
    rows
    record
    Target message interface:
    XXXXXXXXX
    rows
    field 1
    field 2
    field 3
    Write a UDF function to remove the TAB space
    public removeTABSpace(String record,Container container){
    //write your code here
    StringTokenizer st = new StringTokenizer(record,"\t",false);
    String t="";
    while (st.hasMoreElements()) t += st.nextElement();
    return t;
    Write another UDF to get the field 1 for example:
    public String getField1(String input,Container container){
    int counter=0;
    int beginIndex=0;
    int endIndex=0;
    int i;
    for (i=0;i<input.length();i++){
    if (input.charAt(i)==34){
    counter=counter+1;
    if (counter==1){
    beginIndex=i+1;
    counter=0;
    break;
    for (i=0;i<input.length();i++){
    if (input.charAt(i)==34){
    counter=counter+1;
    if (counter==2){
    endIndex=i;
    counter=0;
    break;
    input=input.substring(beginIndex,endIndex);
    return input;
    Get the mapping like the followings:
    record - removeTABSpace - getField1 - field 1
    If you need to get field 2, you will need to write another UDF similar to the above one to handle it.

  • How can I save a Numbers spreadsheet as a tab delimited file?

    Okay, I would like to save a Numbers spreadsheet as a tab delimited file. But of course I can't do that, since Numbers only saves as a comma separated values file.
    Plan B: I can open up a CSV file created by Numbers in TextEdit, and I would like to Find and Replace all the commas with tabs. So I open up the Find window, enter a comma under Find, but of course when I put the cursor in the Replace blank and hit the Tab key, it just goes to the next blank instead of giving me a Tab.
    Is there a way I can get a Tab into that blank so I can replace all the commas with tabs?
    --Dave

    Hello
    When we use TextEdit as I described, rows are separated by Returns.
    It appears that your program requires LineFeeds.
    Here is a neat soluce.
    Save this script as an Application Bundle.
    --\[SCRIPT tsv2csv]
    (* copy to the clipboard a block of datas separated by tabs
    run the script
    You will get on the desktop a csv file named from the current date-time.
    The values separator is set to match the Bento's requirements:
    If the decimal separator is period, the script uses commas.
    If the decimal separator is comma, the script uses semi-colons.
    This may be changed thru the setting of the property maybeSemiColon.
    According to the property needLF,
    embedded Returns will be replaced by LineFeeds
    or
    embedded LineFeeds will be replaced by Returns
    Yvan KOENIG (Vallauris, FRANCE)
    le 10 octobre 2008
    property needLF : true
    (* true = replace Returns by LineFeeds
    false = replace LineFeeds by Returns *)
    property maybeSemicolon : true
    (* true = use semiColons if decimal separator is comma
    false = always uses commas *)
    --=====
    try
    set |données| to the clipboard as text
    on error
    error "the clipboard doesn't contain text datas !"
    end try
    set line_feed to ASCII character 10
    if |données| contains tab then
    if maybeSemicolon then
    if character 2 of (0.5 as text) is "," then
    set |données| to my remplace(|données|, tab, quote & ";" & quote)
    else
    set |données| to my remplace(|données|, tab, quote & "," & quote)
    end if -- character 2 of (0.5…
    else
    set |données| to my remplace(|données|, tab, quote & "," & quote)
    end if -- maybeSemiColon
    end if -- |données| contains tab
    if needLF then
    if |données| contains return then set |données| to my remplace(|données|, return, line_feed)
    set |données| to my remplace(|données|, line_feed, quote & line_feed & quote)
    else
    if |données| contains line_feed then set |données| to my remplace(|données|, line_feed, return)
    |données| to my remplace(|données|, return, quote & return & quote)
    end if -- needLF
    set |données| to quote & |données| & quote
    set p2d to path to desktop as text
    set nom to my remplace(((current date) as text) & ".csv", ":", "-") (* unique name *)
    tell application "System Events" to make new file at end of folder p2d with properties {name:nom}
    write |données| to file (p2d & nom)
    --=====
    on remplace(t, tid1, tid2)
    local l
    set AppleScript's text item delimiters to tid1
    set l to text items of t
    set AppleScript's text item delimiters to tid2
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end remplace
    --=====
    --[/SCRIPT]
    Yvan KOENIG (from FRANCE vendredi 10 octobre 2008 13:47:36)

Maybe you are looking for