Email CSV file as an attachment

Hi,
I am sending a CSV file as an e-mail attachment. Now, i use the character '0D0A' to get the lines onto a new line. But the extra spaces which are left in the previous lines are coming on to the next line. now there are spaces of the previous line and then the data of the current line follows. But in the internal table, the data is stored correctly, So, SHIFT LEFT is also not working.
Please reply if there is any solution for the same.
Thanks in advance,
Pallavi.

HI,
1) I am assuming that you are creating the CSV file on the SAP server and that it is on the WINTEL platform.
Your code would look something like
data: ws_record(2000) type c.
Open dataset filename for output in text mode.
Loop at itab.
concatenate itab-field1 itab-field2 itab-field3
  into ws_record separated by ','.
transfer ws_record to filename.
endloop itab
close dataset filename.
2) Alternatively please check the documentation on the following function module including the example.
SO_NEW_DOCUMENT_ATT_SEND_API1
Regards
David Cooper

Similar Messages

  • How to send csv file as an attachment

    Hi,
    I am able to create a csv file in this directory as "test.scv" using utl_file and some select statements.
    Now I need to send this csv file as an attachment in email.
    we have smtp installed on our server.
    Please help me on this .
    Thanks
    Kind Regards

    The first link takes in a filename (this would be the csv file you have already created) so nothing should be hard coded; it's just the parameters you pass in.
    Doing a little more research (from the asktom article I posted previously) links to this [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html] which the real gold is at [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/maildemo_sql.txt]:
    with examples how to use it at [http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/mailexample_sql.txt].
    To get the attachments working from a PL/sql application you will require one of the packages or a large amount of code.
    here's the coded example for attaching files from the packages listed in maildemo_sql.txt from Oracle's website
    REM Send an email with 2 attachments.
    DECLARE
      conn      utl_smtp.connection;
      req       utl_http.req; 
      resp      utl_http.resp;
      data      RAW(200);
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => 'Me <[email protected]>',
        recipients => 'Someone <[email protected]>',
        subject    => 'Attachment Test',
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.attach_text(
        conn      => conn,
        data      => '<h1>Hi! This is a test.</h1>',
        mime_type => 'text/html');
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'image/gif',
        inline       => TRUE,
        filename     => 'image.gif',
        transfer_enc => 'base64');
      -- In writing Base-64 encoded text following the MIME format below,
      -- the MIME format requires that a long piece of data must be splitted
      -- into multiple lines and each line of encoded data cannot exceed
      -- 80 characters, including the new-line characters. Also, when
      -- splitting the original data into pieces, the length of each chunk
      -- of data before encoding must be a multiple of 3, except for the
      -- last chunk. The constant demo_mail.MAX_BASE64_LINE_WIDTH
      -- (76 / 4 * 3 = 57) is the maximum length (in bytes) of each chunk
      -- of data before encoding.
      req := utl_http.begin_request('http://www.some-company.com/image.gif');
      resp := utl_http.get_response(req);
      BEGIN
        LOOP
          utl_http.read_raw(resp, data, demo_mail.MAX_BASE64_LINE_WIDTH);
          demo_mail.write_raw(
            conn    => conn,
            message => utl_encode.base64_encode(data));
        END LOOP;
      EXCEPTION
        WHEN utl_http.end_of_body THEN
          utl_http.end_response(resp);
      END;
      demo_mail.end_attachment( conn => conn );
      demo_mail.attach_text(
        conn      => conn,
        data      => '<h1>This is a HTML report.</h1>',
        mime_type => 'text/html',
        inline    => FALSE,
        filename  => 'report.htm',
        last      => TRUE);
      demo_mail.end_mail( conn => conn );
    END;
    /Edited by: tanging on Dec 18, 2009 10:58 AM

  • Send mails with csv file as an attachment through oracle(SQL SCripts / Stor

    Hello Everybody,
    I have recently come across a requirement in which I am supposed to send mails with csv file as an attachment through oracle(SQL SCripts / Stored Procedure) .
    The contents of the csv file are to be retreived from the Database as well as the content of the mail and to whom it needs to be sent has also to be picked up from the database.
    Can somebody suggest me with a suitable code for the same?
    Would be of great help..!!
    Thanks & Regards,
    - VR
    Edited by: user646716 on Dec 18, 2009 10:44 AM

    read below links
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805
    http://www.orafaq.com/wiki/Send_mail_from_PL/SQL#Send_mail_with_UTL_TCP_-withattachments
    How to send csv file as an attachment

  • How can I email using UTL_SMTP with a csv file as an attachment?

    Dear All,
    It would be great if someone could help me. I am trying to use UTL_SMTP to email with a csv file as attachment. I do get an email with a message but no attachment arrives with it.
    In fact the code used for attaching the csv file gets appended in the message body in the email.
    CREATE OR REPLACE PROCEDURE test_mail
    AS
    SENDER constant VARCHAR2(80) := '[email protected]';
    MAILHOST constant VARCHAR2(80) := 'mailhost.xxxx.ac.uk';
    mail_conn utl_smtp.connection;
    lv_rcpt VARCHAR2(80);
    lv_mesg VARCHAR2(9900);
    lv_subject VARCHAR2(80) := 'First Test Mail';
    lv_brk VARCHAR2(2) := CHR(13)||CHR(10);
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25) ;
    utl_smtp.helo(mail_conn, MAILHOST) ;
    dbms_output.put_line('Sending Email to : ' ||lv_brk||'Suhas Mitra' ) ;
    lv_mesg := 'Date: '||TO_CHAR(sysdate,'dd Mon yy hh24:mi:ss')||lv_brk||
    'From: <'||SENDER||'>'||lv_brk||
    'Subject: '||lv_subject||lv_brk||
    'To: '||'[email protected]'||lv_brk||
    'MIME-Version: 1.0'||lv_brk||
    'Content-type:text/html;charset=iso-8859-1'||lv_brk||
    ' boundary="-----SECBOUND"'||
    ''||lv_brk||
    '-------SECBOUND'||
    'Some Message'
              || lv_brk ||
    '-------SECBOUND'||
              'Content-Type: text/plain;'|| lv_brk ||
              ' name="xxxx.csv"'|| lv_brk ||
              'Content-Transfer_Encoding: 8bit'|| lv_brk ||
              'Content-Disposition: attachment;'|| lv_brk ||
              ' filename="xxxx.csv"'|| lv_brk ||
              lv_brk ||
    'CSV,file,attachement'|| lv_brk ||     -- Content of attachment
    lv_brk||
    '-------SECBOUND' ;
    dbms_output.put_line('lv_mesg : ' || lv_mesg) ;
    utl_smtp.mail(mail_conn, SENDER) ;
    lv_rcpt := '[email protected]';
    utl_smtp.rcpt(mail_conn, lv_rcpt) ;
    utl_smtp.data(mail_conn, lv_mesg) ;
    utl_smtp.quit(mail_conn);
    EXCEPTION
    WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
    NULL ;
    WHEN OTHERS THEN
    dbms_output.put_line('Error Code : ' || SQLCODE) ;
    dbms_output.put_line('Error Message : ' || SQLERRM) ;
    utl_smtp.quit(mail_conn) ;
    END;

    LKBrwn_DBA wrote:
    Use UTL_MAIL instead.That package is an utter disappointment - and an excellent example IMO of how not to design an application programming interface. Even the source code is shoddy.. I mean, having to resort to a GOTO statement....!!?? The person(s) who wrote that package are sorely lacking in even the most basic of programming skills if structured programming is ignored and a spaghetti command used instead.
    No wonder the public interface of that code is equally shabby and thoughtless... The mail demo code posted by Oracle was better written than this "+package+" they now have bundled as the official Mail API.
    I dunno.. if I was in product management there would have been hell to pay over pushing cr@p like that to customers.

  • Email CSV Files from ABAP in 4.6c

    Hi all,
    I've been trying to work out how to send an email from an ABAP program with a body of email text and a CSV file  attachment. We are running 4.6c and have SAP connect configured. I can send plain text emails but can't seem to attach a CSV file successfully. In my program I have set up an internal table which represents the CSV contents.
    Any of the threads I follow on the SDN seem to point towards binary attachments which I have tried but do not seem to work as I want them to.. there are formatting issues or the file ends up having an extension which is not suitable.
    I want to be able to name the attachment appropriately ... e.g. filename.csv so that the receiver can open it directly in Excel or in other text file applications.
    Can anyone point me in the right direction for this ?
    Cheers,
    Gordon

    Hi Thomas, thanks for that.. I'm starting to get the hang of the packing table. But I'm still stuggline with the format of the file when it arrives in the email.
    If I set the DOC_TYPE field to 'TXT' for the attachment, the email does arrive now with my data in a .txt file attachment however the CSV data which I had in my internal table is not presented in the file as it was in the table. In my table I_EXTRACT, each row is a CSV record I want to go into the file.. but when it arrives the txt file has incorrect line breaks, so more than one record per line etc. It's as all the data has been spewed out as long string into the text file.
    Is there an extra step or escape key I need to add to my data to get SAP to add the line breaks correctly ?
    My code for adding the attachment to the email data is as follows:
      LOOP AT i_extract.
        APPEND i_extract TO objtxt.
      ENDLOOP.
    Create Message Attachment
    Write Packing List (Attachment)
      att_type = 'TXT'.
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ TABLE objtxt INDEX tab_lines.
      objpack-doc_size = ( tab_lines - 2 ) * 255 + STRLEN( objtxt ).
      clear objpack-transf_bin.
      objpack-head_start = 2.
      objpack-head_num = 0.
      objpack-body_start = 2.
      objpack-body_num = tab_lines.
      objpack-doc_type = att_type.
      objpack-obj_name = 'ATTACHMENT'.
      objpack-obj_descr = 'myfile'.
      APPEND objpack.

  • CSV file as an attachment is not in the recognizable format

    Hi All,
    I have a requirement to send a csv file as an e-mail attachment. For this, I am collecting the required data into the final internal table and converted this final internal table data into CSV format and then sending this in the mail as csv file attachment using the functiona module 'SO_NEW_DOCUMENT_ATT_SEND_API1'. Program is working fine and mail is coming to receiver's inbox.
    Well.. Now the problem is, I am getting the message while opening the csv file as "The file is not in a recognizable format." and if we say OK... then it is opening. Now how can we avoid coming of this message while opening the file.
    Please advice.
    Thanks a lot in advance.
    Regards
    Ramesh.

    These are all the Object types which are allowed in the attachement format.. try changing to any of the formats..
    ALI   ABAP list document
    ARC   Archive object (image)
    BCS   External Document Storage
    BIN   Binary document
    DLI   Distribution list
    EXT   PC document
    FOL   Folder
    GRA   SAP Business Graphics
    OBJ   Business object
    OFO   Object folder
    OTF   OTF document
    R3I   IDoc
    RAW   SAP editor document
    SCR   SAPscript document
    URL   Link to Internet/Intranet
    WIM   Work item
    XXL   Document for list viewer

  • Email existing file as an attachment

    Hi all,
    After executing the function 'SO_DOCUMENT_REPOSITORY_MANAGER' I get a dialog box which asks the recipients e-mailaddress.If I enter a correct mailing address everything is fine... Anyone who knows how ik can skip the dialog box en automatically fill the email address? Thanx!
    kavitha

    Hi,
    Check this out. A simple email sending functionality.
    INITIALIZATION .
    CLASS cl_abap_char_utilities DEFINITION LOAD.
    gf_etb = cl_abap_char_utilities=>horizontal_tab. "For horrizontal tab
    gf_cr = cl_abap_char_utilities=>cr_lf. "For enter
    gf_lf = cl_abap_char_utilities=>newline. "For new line
    Declaration
      DATA:    lwa_hd_change TYPE sood1,
               lt_objcont    TYPE STANDARD TABLE OF soli,
               lwa_objcont   TYPE soli,
               lt_receivers  TYPE STANDARD TABLE OF soos1,
               lwa_receivers TYPE soos1 ,
               lt_att_cont   TYPE STANDARD TABLE OF soli,
               lwa_att_cont  TYPE soli,
               lt_packing    TYPE STANDARD TABLE OF soxpl,
               lwa_packing   TYPE soxpl,
               lf_sent       TYPE sonv-flag,
               lf_size       TYPE i.
      CONSTANTS: lc_obj(11)  TYPE c VALUE 'BOMSouthco',
                 lc_desc(20) TYPE c VALUE 'BOM Download',
                 lc_lang(1)  TYPE c VALUE 'E',
                 lc_raw(3)   TYPE c VALUE 'RAW',
                 lc_net(1)   TYPE c VALUE 'U',
                 lc_mail(4)  TYPE c VALUE 'MAIL',
                 lc_xls(3)   TYPE c VALUE 'XLS',
                 lc_ext(3)   TYPE c VALUE 'EXT'.
    Passing values to the strutures used in SO_OBJECT_SEND function module
      lwa_hd_change-objla      = lc_lang.
      lwa_hd_change-objnam     = lc_obj.
      lwa_hd_change-objdes     = lc_desc.
      lwa_hd_change-objlen     = 255.
      lwa_objcont-line = text-t29.
      APPEND lwa_objcont TO lt_objcont.
      CLEAR lwa_objcont.
      lwa_receivers-recextnam  = text-t31.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
      lwa_receivers-recextnam  = text-t30.
      lwa_receivers-recesc     = lc_net.
      lwa_receivers-sndart     = lc_mail.
      lwa_receivers-sndex      = 'X'.
      lwa_receivers-sndpri     = 1.
      lwa_receivers-mailstatus = 'E'.
      APPEND lwa_receivers TO lt_receivers.
      CLEAR lwa_receivers.
    Passing values for the attachment file
      LOOP AT gt_output INTO gwa_output.
        CONCATENATE gf_lf  gwa_output-matnr  gf_etb  gwa_output-idnrk  gf_etb
                    gwa_output-type   gf_etb  gwa_output-menge   gf_etb
                    gwa_output-meins  gf_etb  gwa_output-comp    gf_etb
          INTO lwa_att_cont-line.
        APPEND lwa_att_cont TO lt_att_cont.
        CLEAR lwa_att_cont.
      ENDLOOP.
      CHECK lt_att_cont IS NOT INITIAL.
      DESCRIBE TABLE lt_att_cont LINES lf_size.
      lwa_packing-transf_bin = ' '.
      lwa_packing-head_start = 1.
      lwa_packing-head_num   = 0.
      lwa_packing-body_start = 1.
      lwa_packing-body_num   = lf_size.
      lwa_packing-file_ext   = lc_xls.
      lwa_packing-objlen     = lf_size * 255.
      lwa_packing-objtp      = lc_ext.
      lwa_packing-objdes     = lc_desc.
      lwa_packing-objnam     = lc_obj.
      APPEND lwa_packing TO lt_packing.
      CLEAR lwa_packing.
      CHECK gf_error IS NOT INITIAL. "Check if unix file is written
    FM to send email to the intended recipients
      CALL FUNCTION 'SO_OBJECT_SEND'
        EXPORTING
          object_hd_change           = lwa_hd_change
          object_type                = lc_raw
        IMPORTING
          sent_to_all                = lf_sent
        TABLES
          objcont                    = lt_objcont
          receivers                  = lt_receivers
          packing_list               = lt_packing
          att_cont                   = lt_att_cont
        EXCEPTIONS
          active_user_not_exist      = 1
          communication_failure      = 2
          component_not_available    = 3
          folder_not_exist           = 4
          folder_no_authorization    = 5
          forwarder_not_exist        = 6
          note_not_exist             = 7
          object_not_exist           = 8
          object_not_sent            = 9
          object_no_authorization    = 10
          object_type_not_exist      = 11
          operation_no_authorization = 12
          owner_not_exist            = 13
          parameter_error            = 14
          substitute_not_active      = 15
          substitute_not_defined     = 16
          system_failure             = 17
          too_much_receivers         = 18
          user_not_exist             = 19
          originator_not_exist       = 20
          x_error                    = 21
          OTHERS                     = 22.
      IF sy-subrc = 0.
        MESSAGE s004 WITH text-t34.
      ENDIF.
      COMMIT WORK.
    Reward if helpful.
    Regards,
    Ramya

  • Javax.mail CSV file attachment corrupt?

    I'm having some trouble with attaching a file to an outgoing email, it's a CSV file and when it is uploaded/attached to the email, it becomes "corrupt". Excel will still open it but if I open it in notepad the formatting is noticeably messed up. I need it to retain all the correct return carriages and line feeds, which I believe are what are getting mingled. (Another program must read it and this formatting is messing everything up).
    Here's the code:
    MimeBodyPart messageBodyPart =
                     new MimeBodyPart();
             //fill message
             messageBodyPart.setText(outBoundMessage);
             Multipart multipart = new MimeMultipart();
             multipart.addBodyPart(messageBodyPart);
             if (fileAttachment != null) {
                // Part two is attachment
                MimeBodyPart attachment = new MimeBodyPart();
                attachment.attachFile(fileAttachment);
                attachment.setFileName(fileAttachment.getName());
                attachment.setHeader("type", "text/csv");
                multipart.addBodyPart(attachment);
             // Put parts in message
             message.setContent(multipart);The other parts of the message are being created and attached where necessary. My guess is that it's not transferring in binary? I've never really done this sort of thing so if anyone could lend a hand and show me how to properly attach files so they don't get altered in anyway I would greatly appreciate it.

    Hi,
    I am sending csv file as an attachment by using below code
    import java.util.*;
    import java.io.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    public class AttchmtMail
        String finaldt;
            public  void mailAtchmt(String fname,String dt) {
                String   to="[email protected]";
               String from = "[email protected]";
              String to2="[email protected]";
                 String host = "xxx.xx.xxx.xxx";
                // Create properties, get Session
                Properties props = new Properties();
                // If using static Transport.send(),
                // need to specify which host to send it to
                props.put("mail.smtp.host", host);
                // To see what is going on behind the scene
                props.put("mail.debug", "true");
                Session session = Session.getInstance(props);
                try {
                    // Instantiatee a message
                    Transport bus = session.getTransport("smtp");
                    bus.connect();
                    Message msg = new MimeMessage(session);
                    //Set message attributes
                    msg.setFrom(new InternetAddress(from));
                    InternetAddress[] address = {new InternetAddress(to),new InternetAddress(to2)};
                    msg.setRecipients(Message.RecipientType.TO, address);
                    msg.setSubject("New OU's on "+dt+".");
                    msg.setSentDate(new Date());
                   // String filename= "C:/Feeds/"+finaldt+"/"+files;
    String file1= fname;
    File f1=new File(file1);
    if(f1.exists())
    setFileAsAttachment(msg, file1);
    else
    //setFileAsAttachment(msg,"","",info);
    msg.saveChanges();
    bus.sendMessage(msg, address);
    bus.close();
    catch (MessagingException mex) {
    // Prints all nested (chained) exceptions as well
    mex.printStackTrace();
    // How to access nested exceptions
    while (mex.getNextException() != null) {
    // Get next exception in chain
    Exception ex = mex.getNextException();
    ex.printStackTrace();
    if (!(ex instanceof MessagingException)) break;
    else mex = (MessagingException)ex;
    public void setFileAsAttachment(Message msg, String filename)
    throws MessagingException {
    // Create and fill first part
    MimeBodyPart p1 = new MimeBodyPart();
    p1.setText("Dear ,\n\nPlease check the attachment " );
    // Create second part
    MimeBodyPart p2 = new MimeBodyPart();
    // Put a file in the second part
    if(!filename.equals(""))
    FileDataSource fds = new FileDataSource(filename);
    p2.setDataHandler(new DataHandler(fds));
    p2.setFileName(fds.getName());
    // Create the Multipart. Add BodyParts to it.
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(p1);
    if(!filename.equals(""))
    mp.addBodyPart(p2);
    } // Set Multipart as the message's content
    msg.setContent(mp);
    }//End of class
    Madhu                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Send mail w/ CSV zip file as an attachement w/o using StrictXml2PlainBean

    Hi Experts,
    Is there any other way to send an email to target, that has a Zipped CSV file as an attachment, without using StrictXml2PlainBean?
    I can't use StrictXml2PlainBean because it only accepts up to 3 levels of Recordset in the message type strucutre. The structure of my target is complex, up to 4 levels.
    Any suggestions?

    Use MessageTransformBean, that accepts more levels.
    Check online help for details.

  • CSV file not appear as a CSV file in attach

    Hi.
    I am sending an CSV file as an attach in an email. But the problem is that it appears as a PDF file, even though in SOST it appears as a CVS file. Does anyone faced this problem?
    Thanks.

    Well, I when I look at this method, I see Attachment_type is of type SOODK-OBJTP.  When I forward navigate into that, I see structure SOODK, with field name OBJTP, type SO_OBJ_TP.  Forward navigating again, I see that that field has domain SO_OBJ_TP.  When I look at the value range for the domain, I find table TSOTD.  Inside that table, I don't find 'csv' as a  type.  This leads me to believe that SAP doesn't know what type of attachment it has.  Since your code implies a hex/binary file, perhaps BIN is the replacement for CSV, and the file name should probably contain '.csv'.  Sorry, it's been a while since I wrote a email with attachment;  I don't remember what I used in prior programs, I believe is used BIN or RAW.
    The choices are listed below:
    ALI                        X          X      ABAP list document      
    ARC                        X                 Archive object (image)  
    BCS                                   X      External Document Storage
    BIN                        X                 Binary document         
    DLI                        X                 Distribution list       
    EXT                        X    X            PC document             
    FOL                        X                 Folder                  
    GRA                        X          X      SAP Business Graphics   
    OBJ                        X                 Business object         
    OFO                                   X      Object folder           
    OTF                                   X      OTF document            
    R3I                                   X      IDoc                    
    RAW   X                    X                 SAP editor document     
    SCR                        X                 SAPscript document      
    URL                                          Link to Internet/Intranet
    WIM                                   X      Work item               
    XXL                        X          X      Document for list viewer

  • How to align the CSV file on upload?

    Hi All,
    I have to upload a CSV file as an attachment in a mail and the data's in the internal table which has to be uploaded in the CSV file are seperated using commas which on uploading appear in the CSV file in the same column but i need the data's to be seperated in different columns and different lines...
    Pls help it is very urgent..
    Thanks in Advance...

    Hi
    For my understanding you are talking about download.
    For that you have to concatenate each fields of final internal table (gt_itab for example) using comma as below.
    TYPES: BEGIN OF ty_lines,
             line(1023) TYPE c,
           END OF ty_lines.
    DATA: l_filename TYPE string VALUE 'C:\temp\abcd.csv',
          gt_lines  TYPE TABLE OF ty_lines,
          gw_lines  TYPE ty_lines.
      LOOP AT gt_itab INTO gw_itab.
        CONCATENATE gw_itab-f1
                    gw_itab-f2 .....
               INTO gw_lines-line
               SEPARATED BY ','.
         APPEND gw_lines TO gt_lines.
      ENDLOOP.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_filename
          filetype                = 'ASC'
          confirm_overwrite       = 'X'
          no_auth_check           = 'X'
        TABLES
          data_tab                = gt_lines.

  • BPEL process to receive CSV file in SOAP attachmnet

    Hi ,
    I have a requirement where i need to develop a BPEL process that receives a CSV file in a SOAP attachment. The BPEL process ahould take the CSV file from the attachment and store it in a local Directory. Thanks in advance.

    Hi ,
    I have a requirement where i need to develop a BPEL process that receives a CSV file in a SOAP attachment. The BPEL process ahould take the CSV file from the attachment and store it in a local Directory. Thanks in advance.

  • Can't open CSV file.

    Hi
    I got value in order to put in excel file(csv).
    This is example for put value to excel file
    ExcelSheet.Application.Visible = True
    ExcelSheet.Application.cells(1, 1).Value = "Test"
    ExcelSheet.saveas "C:\email.csv"
    ExcelSheet.Application.Quit
    Set ExcelSheet = Nothing
    When I received excel file,I used this file to open with datablank.But it can't open.
    Could you help me please.
    Thank you,
    Waruja

    Waruja,
    You can use MSExcel VBA to create a file, but you need to make sure that the file is formatted as plain text in CSV format. Open your email.csv file in Notepad and make sure you can read it there. If it doesn't show you clear readable text in Notepad, eTester won't be able to read it either.

  • Setting required to process incomming Email with CSV file attached

    Dear all,
    We are having a scenario where in the supplier receives a PO confirmation CSV file from the download center as an Email attachment. The supplier updates the file by confirming PO's and replies back. The CSV file needs to update the confirmed PO's in SNC.
    The SO50 settings are in place but still we are not able to receive the Email back in SNC. Any suggestion on what settings we need in SNC to receive and process the CSV file?
    thanks,
    mahehs

    Hi,
    You can use the upload center to process the changed data. Isnt that helpful?
    Best Regards,
    Harsha Gatt

  • .csv file in an outlook email attachment

    Hello,
    How can we accomplish following using SOA/BPEL without using Oracle Beehive or any other third paty tools.
    1. Emails contain a .csv file with 5 columns.
    2. There is a table in Oracle EBS database with 5 columns.
    3. We need to have real time integration to import these .csv file from incoming emails into Oracle table from #2 above.
    How can SOA/BPEL detach the .csv file from emails, parse .csv fields and import these files in Oracle table in real time manner?
    Please advise.
    Darsh

    as idea
    - vba script in outlook for save .*csv files to some directory
    - composite for pooling directory and insert data from parsed .*csv files
    or
    all by vba

Maybe you are looking for