File to Mail with content as excel attachment

Hi there,
Can somebody please guide me in achieving this goal.
I have a requirement in which I have to send the email content as an excel attachment which is very new to me.
Requirement
File.............XI............Mail
Sender File: xyz.xml
Mapped with standard mail.xsd and concat all the requested filed to the content but now the requirement is changed and I need to send the content as an excel attachment.
I don't know JAVA & ABAP and this is the first time I am using mail adapter.
Can somebody please guide me how to achieve this.
In Another interface I have to send the source file name as a mail attachment, By Default mail adapter send the filename as untitled.
Is there easy way to changed the name of the attachment to the source file name.
File ............... XI.........Mail.
Source file: xyz.xml
No mapping required just send the file to the mail adapter but condition is that the file name should be the same.
Mail (Attachment: xyz.xml)
Please can somebody suggest me how to achieve this.
Thanks,

Hi,
Please refer the blogs given which help you a lot regarding your requirement.
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
/people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
/people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems

Similar Messages

  • Attach file to mail with "unusual" characters

    Hi
    I have made a procedure that can send mail with attached file/files. But when I attach a text file that contains characters like (Å, Ä or Ö) these characters gets like (A, A and ?) when I recieve the mail to my mail client. When I look at the file on the disk before I attach it the characters is OK but when I attach the file and mails it the characters get replaced. So why does the charaters get messed up when I attach the file to a mail??
    My procedure looks like this:
    procedure mail_files(from_name varchar2,
    to_name varchar2,
    subject varchar2,
    message varchar2,
    max_size number default 9999999999,
    filename1 varchar2 default null,
    filename2 varchar2 default null,
    filename3 varchar2 default null,
    debug number default 0) is
    mottagare VARCHAR2(2048) := to_name;
    v_smtp_server varchar2(32) := 'mail.telia.se';
    v_smtp_server_port number := 25;
    v_directory_name varchar2(100);
    v_file_name varchar2(100);
    v_line varchar2(1000);
    crlf varchar2(2) := chr(13) || chr(10);
    mesg varchar2(32767);
    conn UTL_SMTP.CONNECTION;
    type varchar2_table is table of varchar2(200) index by binary_integer;
    file_array varchar2_table;
    i binary_integer;
    v_file_handle utl_file.file_type;
    v_slash_pos number;
    mesg_len number;
    mesg_too_long exception;
    invalid_path exception;
    mesg_length_exceeded boolean := false;
    begin
    -- first load the three filenames into an array for easier handling later ...
    file_array(1) := filename1;
    file_array(2) := filename2;
    file_array(3) := filename3;
    -- Open the SMTP connection ...
    conn := utl_smtp.open_connection(v_smtp_server, v_smtp_server_port);
    -- Initial handshaking ...
    utl_smtp.helo(conn, v_smtp_server);
    utl_smtp.mail(conn, from_name);
    WHILE (mottagare IS NOT NULL) LOOP
    utl_smtp.rcpt(conn, get_element(mottagare));
    END LOOP;
    --utl_smtp.rcpt( conn, to_name );
    utl_smtp.open_data(conn);
    -- build the start of the mail message ...
    mesg := 'Date: ' || TO_CHAR(SYSDATE, 'dd Mon yy hh24:mi:ss') || crlf ||
    'From: ' || from_name || crlf || 'Subject: ' || subject || crlf ||
    'To: ' || to_name || crlf || 'Mime-Version: 1.0' || crlf ||
    'Content-Type: multipart/mixed; boundary="DMW.Boundary.605592468"' || crlf || '' || crlf ||
    'This is a Mime message, which your current mail reader may not' || crlf ||
    'understand. Parts of the message will appear as text. If the remainder' || crlf ||
    'appears as random characters in the message body, instead of as' || crlf ||
    'attachments, then you''ll have to extract these parts and decode them' || crlf ||
    'manually.' || crlf || '' || crlf ||
    '--DMW.Boundary.605592468' || crlf ||
    'Content-Type: text/html; charset=8859-1' || crlf ||
    'Content-Disposition: inline;' || crlf ||
    'Content-Transfer-Encoding: 8bit' || crlf || '' || crlf ||
    message || crlf;
    mesg_len := length(mesg);
    if mesg_len > max_size then
    mesg_length_exceeded := true;
    end if;
    utl_smtp.write_data(conn, mesg);
    --utl_smtp.write_raw_data(conn, utl_raw.cast_to_raw(mesg));
    -- Append the files ...
    for i in 1 .. 3 loop
    -- Exit if message length already exceeded ...
    exit when mesg_length_exceeded;
    -- If the filename has been supplied ...
    if file_array(i) is not null then
    begin
    -- locate the final '/' or '\' in the pathname ...
    v_slash_pos := instr(file_array(i), '/', -1);
    if v_slash_pos = 0 then
    v_slash_pos := instr(file_array(i), '\', -1);
    end if;
    -- separate the filename from the directory name ...
    v_directory_name := substr(file_array(i), 1, v_slash_pos - 1);
    v_file_name := substr(file_array(i), v_slash_pos + 1);
    -- open the file ...
    v_file_handle := utl_file.fopen(v_directory_name, v_file_name, 'r');
    -- generate the MIME boundary line ...
    mesg := crlf || '--DMW.Boundary.605592468' || crlf ||
    'Content-Type: application/octet-stream; name="' ||
    v_file_name || '"' || crlf ||
    'Content-Disposition: attachment; filename="' ||
    v_file_name || '"' || crlf ||
    'Content-Transfer-Encoding: 8bit' || crlf || crlf;
    mesg_len := mesg_len + length(mesg);
    utl_smtp.write_data(conn, mesg);
    -- and append the file contents to the end of the message ...
    loop
    utl_file.get_line(v_file_handle, v_line);
    if mesg_len + length(v_line) > max_size then
    mesg := '*** truncated ***' || crlf;
    utl_smtp.write_data(conn, mesg);
    mesg_length_exceeded := true;
    raise mesg_too_long;
    end if;
    mesg := v_line || crlf;
    utl_smtp.write_data(conn, mesg);
    mesg_len := mesg_len + length(mesg);
    end loop;
    exception
    when utl_file.invalid_path then
    -- All other exceptions are ignored ....
    when others then
    null;
    end;
    mesg := crlf;
    utl_smtp.write_data(conn, mesg);
    -- close the file ...
    utl_file.fclose(v_file_handle);
    end if;
    end loop;
    -- append the final boundary line ...
    mesg := crlf || '--DMW.Boundary.605592468--' || crlf;
    utl_smtp.write_data(conn, mesg);
    -- and close the SMTP connection ...
    utl_smtp.close_data(conn);
    utl_smtp.quit(conn);
    end;
    Any help is highly appreciated.
    Regards
    Nils

    Hi Madhu,
         Using the default modules PayloadSwapBean and MessageTransformBean you can able to send multiple attachments.
    swap.keyName  :payload-name or payload-description or content-type, content-description. swap.keyValue: If you have  a multiple attachments then give the multiple key value.
    Like you have payload name
      Attachment1, Attachment2 then
    swap.keyName  payload-name
    swap.keyValue  Attachment1, Attachment2
    Using the MessageTransformBean you can able to change the file name.
    PayloadSwapBean:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/2e/bf37423cf7ab04e10000000a1550b0/content.htm]
    MessageTransformBean:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm]
    Regards,
    Prakasu

  • Convert Script output data to Text(.txt) file & send mail with attachment.

    Hi All,
    Requirement: I shulb be able to conver th Script output data to Text(.text) file & send a maill with attachment with this text file. Formant of text file should be like output of Print priview.
    Plese sugget with Function modules to cover as Text file.
    I am able to converting the Script output data to PDF and sending mail with attachment. So I don't want PDF file now.
    Thanks in advance.

    Hi, Thanks for responst.
    We can convert the Scirpt output to PDF file by using OTF function module and the PDF file looks like Print Privew output.
    Same like this I want Script out in NOTEPAD (.txt). Is that possible, Plz sugget with relavent Function Modules.
    Thanks.

  • File to Mail with XML Attachment

    Hi Ravi,
    Just have look into the configuration of sender file adapter configuration.
    The sender file adapter is configured to pick the normal payload, which is specified in the File access parameters, and the additional image file  that is to be sent as an attachment is configured under the Additional File(s).The file type would still remain binary.
    Also check out the Module c onfiguration if you did it correctly and check out the transform.ContentType values inside.
    Hope this will help you.
    Regards
    Aashish Sinha

    Hi Shabarish,
    In the module tab i have specified the below beans
    localejbs/AF_Modules/MessageTransformBean                           contentType
    AF_Modules/PayloadZipBean                                                    zip
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean           mail
    In the module configuration i mentioned as
    Transform.ContentDescription   file
    Transform.ContentDisposition   attachment:filename="file.xml"
    zip.filenameKey                      contentType
    zip.mode                                zipOne
    Now i am getting the mail with zip file as an attachment.But the name of the attachment i got is MainDocument.zip
    Even the file name inside the zip is MainDocument.xml.
    How can i specify my own file name for both zip file and the file inside the archieve folder.Please help me.
    Regards
    Divia

  • Convert Screen(spool) to PDF file sending mail with attach file

    Hi :
    I'd like convert spool list to pdf and sending file...
    so, I read thread about spool convert to PDF before,
    and know how to convert Spool to PDF file and send mail with attach file.
    but I have a problem.
    my solution as:
    step 1. Call function: "CONVERT_ABAPSPOOLJOB_2_PDF"
    step 2. Call function: "SO_NEW_DOCUMENT_ATT_SEND_API1"
    then, I got a mail with attached PDF file, but the PDF file display limited 255 line.( SO_NEW_DOCUMENT_ATT_SEND_API1 limited)
    I want to showing word is wider that 255.
    and then I find a manual method as:
    After program finished.
    Function Menu -> system -> List -> Send
    use Prog: "Create Document and Send"
    I use this prog sending mail and attached file ,
    PDF file do <b>NOT</b> have 255 word limit !
    finally. my question is, If I want sending mail as Prog: "Create Document and Send", how to do?
    which Function I have to use?...
    Please help me, Thanks!

    Hi,
    Check this sample code of sending spool as attachment to an email address..
    Parameters.
    PARAMETERS: p_email(50) LOWER CASE.
    PARAMETERS: p_spool LIKE tsp01-rqident.
    Data declarations.
    DATA: plist         LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    DATA: document_data LIKE sodocchgi1.
    DATA: so_ali        LIKE soli OCCURS 100 WITH HEADER LINE.
    DATA: real_type     LIKE soodk-objtp.
    DATA: sp_lang       LIKE tst01-dlang.
    DATA: line_size     TYPE i VALUE 255.
    DATA: v_name        LIKE soextreci1-receiver.
    DATA rec_tab        LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
    Get the spool data.
    CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
         EXPORTING
              rqident              = p_spool
              first_line           = 1
              last_line            = 0
              desired_type         = '   '
         IMPORTING
              real_type            = real_type
              sp_lang              = sp_lang
         TABLES
              buffer               = so_ali
         EXCEPTIONS
              no_such_job          = 1
              job_contains_no_data = 2
              selection_empty      = 3
              no_permission        = 4
              can_not_access       = 5
              read_error           = 6
              type_no_match        = 7
              OTHERS               = 8.
    IF sy-subrc <> 0.
      MESSAGE s208(00) WITH 'Error'.
      LEAVE LIST-PROCESSING.
    ENDIF.
    Prepare the data.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 0.
    plist-body_num = 0.
    plist-doc_type = 'RAW'.
    plist-obj_descr = 'Test ALV'.
    APPEND plist.
    plist-transf_bin = 'X'.
    plist-head_start = 0.
    plist-head_num = 0.
    plist-body_start = 1.
    DESCRIBE TABLE so_ali LINES plist-body_num.
    plist-doc_type = real_type.
    Get the size.
    READ TABLE so_ali INDEX plist-body_num.
    plist-doc_size = ( plist-body_num - 1 ) * line_size
                     + STRLEN( so_ali ).
    APPEND plist.
    Move the receiver address.
    MOVE: p_email  TO rec_tab-receiver,
          'U'      TO rec_tab-rec_type.
    APPEND rec_tab.
    IF NOT sp_lang IS INITIAL.
      document_data-obj_langu = sp_lang.
    ELSE.
      document_data-obj_langu = sy-langu.
    ENDIF.
    v_name = sy-uname.
    Send the email.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
         EXPORTING
              document_data              = document_data
              sender_address             = v_name
              sender_address_type        = 'B'
         TABLES
              packing_list               = plist
              contents_bin               = so_ali
              receivers                  = rec_tab
         EXCEPTIONS
              too_many_receivers         = 1
              document_not_sent          = 2
              document_type_not_exist    = 3
              operation_no_authorization = 4
              parameter_error            = 5
              x_error                    = 6
              enqueue_error              = 7
              OTHERS                     = 8.
    IF sy-subrc <> 0.
      MESSAGE e208(00) WITH 'Error'.
    ENDIF.
    COMMIT WORK.
    Send the email immediately.
    SUBMIT rsconn01
    WITH mode = 'INT'
    AND RETURN.
    Thanks,
    Naren

  • To send output of report to the mails ids as an excel attachment

    Hi all,
    I have a requirement that I have created a report using classes. Now I have to send output of my report to the particular mailids as an excel attachment.
    Can anybody help me?
    Regards,
    Azra.

    Hi,
    Refer Below links.
    Re: Formatting Excel Attachment output in SO_DOCUMENT_SEND_API1
    Information Broadcasting with Excel Report as attachment
    Zip the excel and send as mail attachment
    Regards
    Md.MaahboobKhan

  • Mail adapter - content coming as attachment

    Hellow experts,
    I am sending data from R3 to emails using mail adapter.  I am using the follwoing mail package format.  
    <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>Water Catchment Form</Subject>
      <From>[email protected]</From>
      <To>[email protected]</To>
      <Reply_To>[email protected]</Reply_To>
      <Content_Type>text/plain</Content_Type>
      <Content>You have work order(s) !!</Content>
      </ns1:Mail>
    In my mail adapter, I have ticked
      Use Mail Package Format and
      Keep Attachments
    I am getting the content as an attachment - I want it inside the email.
    The attachment is coming with a name Untitled.pdf  - I need the actual name.
    Am I missing anything?
    What can I do to get things right?
    Thnx

    Hi Sabbir
    refer this Pdf may be helpful for u
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05
    Thanks!!

  • File to Mail with multiple attachments

    Hi All,
    I am doing file to mail scenario in which iam including attachments.
    I am able to send one attachment(i.e., .txt) from file to mail.
    My requirement is i need to send both .txt and .xls .Please let me know the procedure for sending multiple attachments(probabaly without any abap coding or .jar files usage).
    regards
    Madhu

    Hi Madhu,
         Using the default modules PayloadSwapBean and MessageTransformBean you can able to send multiple attachments.
    swap.keyName  :payload-name or payload-description or content-type, content-description. swap.keyValue: If you have  a multiple attachments then give the multiple key value.
    Like you have payload name
      Attachment1, Attachment2 then
    swap.keyName  payload-name
    swap.keyValue  Attachment1, Attachment2
    Using the MessageTransformBean you can able to change the file name.
    PayloadSwapBean:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/2e/bf37423cf7ab04e10000000a1550b0/content.htm]
    MessageTransformBean:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm]
    Regards,
    Prakasu

  • File-Sender: Probl. with Content conversion - Read whole line in singleTag

    Hello,
    I have a flat file that i read with the sender file adapter.
    After content conversion I get not the result i wished to have...
    The source flat file looks for example like this:
    ABC;DEF;GHIJ
    KLM;NOP;Q
    RSTU;VW
    After the Content Conversion I would like to have this result:
    <Recordset>
         <Data>
              <Row>ABC;DEF;GHIJ
               <Row>KLM;NOP;Q
              <Row>RSTU;VW
              <……>
    What sounds very similar but didn’t work for me yesterday….
    I defined a data type that looked like this:
    DT_TEST (Complex Type)
         Recordset (0..unbounded)
              Data (1)
                   Row (type string / 0..unbounded)
    During the file content conversion I just did this:
    Recordsetname: Recordset
    Recordset structure: Data, 1
    Data.fieldNames = Row
    Data.fieldSeparator = ‘nl’
    This was also described in blog:
    /people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
    But my result is always like this:
    <Recordset>
         <Data>
              <Row>ABC;DEF;GHIJ
         </Data>
    </Recordset>
    <Recordset>
         <Data>
              <Row> KLM;NOP;Q
         </Data>
    </Recordset>
    <Recordset>
         <Data>
              <Row> RSTU;VW
         </Data>
    </Recordset>
    ….And not like I wished….
    Can anybody help me…?
    Greetings
    Tobias

    Hi,
    I just gone thru the blog and as per the structure defined I have no idea how this works this way.
    But if you modify the structure to
    RecordSet - occurs 0-1
    Data - occurs 0-n
    Row - occurs 0-1
    And in the Content conversion mentions Data,* instead of Data,1.
    In this case you will be getting a output like
    <Data>
      <Row>ddf,sdfsd,sdf</Row>
    </Data>
    <Data>
      <Row>fff,sdfsd,sdf</Row>
    </Data>
    You can achieve this but I don't have any idea how to generate that kind of output with the Structure and the conversion parameter mentioned in the blog.
    Thanks,
    Prakash

  • How to link to a file in UCM with content presenter site studio template

    Hi,
    I have Webcenter spaces with content presenter showing Site studio content.
    In this site studio region I have an element for rich text (html)
    Now we want to create a link in this text to an existing document in UCM.
    The question is how achief this?
    There seems no standard functionality for doing this.
    Any suggestion is welcome!
    Thanks,
    Edward

    Hi,
    I have Webcenter spaces with content presenter showing Site studio content.
    In this site studio region I have an element for rich text (html)
    Now we want to create a link in this text to an existing document in UCM.
    The question is how achief this?
    There seems no standard functionality for doing this.
    Any suggestion is welcome!
    Thanks,
    Edward

  • Workflow sending mail with content

    Hi Experts,
    I created a workflow that will be started , if personal data will be changed, after that I would like to have a mail with the changed data. So I got a mail but without any datas.
    What am I doing wrong?  
    Regards,
    Alessandro Poliafico

    Hi,
      If Iam not wrong then I hope you are trying to change the employee personal details from PA30 txn. Which internally it means that you are trying to do some changes in the organisational data. So the workflow is also the part of organisational data. I hope by refreshing the org assignment you might overcome this issue.
    To refresh organisational environment , all you have to do is follow the below path of execution
    SBWP ---> on Menu Settings ---> Wrofklow Settings ---> Refresh Org Envronment.
    After this try again.
    Regards
    Pavan

  • File to Mail with body content and attachment

    Hi Experts,
    Here my scenario;
    I receive an xml file, this xml file content need to be mapped to body of the eMail as well formatted email. and also the original xml file which I receive need to be sent as attachment.
    I searched in sdn, help and checked many blogs..
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    If I want to send email with message in body then I need to select message protocol XIPAYLOAD and use mail package, but Iam not able to send the original file as attachment.
    How could I achieve both??
    please help.
    If not clear please let me know, I will explain in detail.
    rgds
    skr

    Hi SKR,
    Check the below blogs, this will throw some light on your issue.
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution
    Thanks,

  • Mail with more then one attachment file

    Hi,
    I want to know weather we can send <b>more than one attachment file</b> through our program to external mail id.
    Reg,
    Hariharan

    hi,
    yes u can send more than one attachment.
    sample prog:
    report ztest.
    data: itcpo like itcpo,
          tab_lines like sy-tabix.
    Variables for EMAIL functionality
    data: maildata   like sodocchgi1.
    data: mailpack   like sopcklsti1 occurs 2 with header line.
    data: mailhead   like solisti1 occurs 1 with header line.
    data: mailbin    like solisti1 occurs 10 with header line.
    data: mailtxt    like solisti1 occurs 10 with header line.
    data: mailrec    like somlrec90 occurs 0  with header line.
    data: solisti1   like solisti1 occurs 0 with header line.
    perform send_form_via_email.
    FORM SEND_FORM_VIA_EMAIL                    
    form  send_form_via_email.
      clear:    maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
      refresh:  mailtxt, mailbin, mailpack, mailhead, mailrec.
    Creation of the document to be sent File Name
      maildata-obj_name = 'TEST'.
    Mail Subject
      maildata-obj_descr = 'Subject'.
    Mail Contents
      mailtxt-line = 'Here is your file'.
      append mailtxt.
    Prepare Packing List
      perform prepare_packing_list.
    Set recipient - email address here!!!
      mailrec-receiver = [email protected]'.
      mailrec-rec_type  = 'U'.
      append mailrec.
    Sending the document
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = maildata
                put_in_outbox              = ' '
           tables
                packing_list               = mailpack
                object_header              = mailhead
                contents_bin               = mailbin
                contents_txt               = mailtxt
                receivers                  = mailrec
           exceptions
                too_many_receivers         = 1
                document_not_sent          = 2
                operation_no_authorization = 4
                others                     = 99.
    endform.
         Form  PREPARE_PACKING_LIST *********************************************************
    form prepare_packing_list.
      clear:    mailpack, mailbin, mailhead.
      refresh:  mailpack, mailbin, mailhead.
      describe table mailtxt lines tab_lines.
      read table mailtxt index tab_lines.
      maildata-doc_size = ( tab_lines - 1 ) * 255 + strlen( mailtxt ).
    Creation of the entry for the compressed document
      clear mailpack-transf_bin.
      mailpack-head_start = 1.
      mailpack-head_num = 0.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'RAW'.
      append mailpack.
      mailhead = 'TEST.TXT'.
      append mailhead.
    File 1
      mailbin = 'This is file 1'.
      append mailbin.
      describe table mailbin lines tab_lines.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = 1.
      mailpack-body_num = tab_lines.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST1'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    *File 2
      mailbin = 'This is file 2'.
      append mailbin.
      data: start type i.
      data: end type i.
      start = tab_lines + 1.
      describe table mailbin lines end.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = start.
      mailpack-body_num = end.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST2'.
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    endform.
    regards,
    madhu

  • File to Mail with report format

    Hi
    I have a requirement in which I have to send the email to the user and all the information should be present in the email content no attachment.
    I have to pick the xml file for the FTP location and then send the email to the user in the specific format which is mention below.
    FTP.........................XI..........................MAIL (No Attachment)
    Example
    abc.xml
    Output must be in this format
    Original File name.             Original Creation date and time     Customer ID     File level Ack  Name     File level Ack 
    xxxxxxx                                     xxxxxxxxx                                xxxxxx               xxxxx                    xxx     
    xxxxxxx                                     xxxxxxxxx                                xxxxxx               xxxxx                    xxx     
    xxxxxxx                                     xxxxxxxxx                                xxxxxx               xxxxx                    xxx     
    Creation date and time     Total number of trasnsactions     Status code      Error Description
    xxxxxxxxx                            xxxxxx                                         xxxxx          SYNTAX ERROR
    xxxxxxxxx                            xxxxxx                                         xxxxx          SYNTAX ERROR
    xxxxxxxxx                            xxxxxx                                         xxxxx          SYNTAX ERROR
    Can somebody please tell me how to generate the output like that. I am concatenating all the fields but I have to do too many padding to generate the output like that which I think is not the correct way to generate the output.
    Is there any way to generate the required output with UDF or any other way except concat.
    Is there any way I can convert the output in Excel or Word file.
    Thanks,

    Hi Kumar,
    Could you please tell me the complete UDF
    My Requirement is to generate the output in 1 or multi line along with the heading.
    Original File name.      Original Creation date and time     Customer ID     File level Ack Name     File level Ack
    Where ....... represent the values.

  • Send table with email as excel-attachment

    Hi.
    I have such a requirement. I have a report that selects data and show it in ALV form.
    No I need to execute it as background job and then send emails with selected data as an attached excel file.
    Does anybody know the way to convert usual internal table into the internal table that contains the same data in a excel file form, that I could send then with email?
    All ways of converting itab to excel use excel file on frontend PC as a destination. Is there any way to avoid downloading to a real file and then uploading back to internal table?
    Thanks in advance.

    hi,
    these steps will help u to achieve your requirement.
    step 1 : for getting the selected records only , u can use the below code
                    lr_selections = go_alv_table_ref->get_selections( ).
                    lr_selection(gs->get_selected_rows( RECEIVING value = gt_rows ).
    Step2 : paa the selected records (gt_rows) to the method cl_bcs_convert=>string_to_solix - (give the code page as 4103 -this wll convert to an excel file ) get the file and send as a mail attachment using the method 'add_attachement' from the class 'cl_document_bcs'.
    Hope this helps,
    Thanks,
    Sindhuja

Maybe you are looking for

  • Transport PC and CC master data

    Hi, Can we transport profit and cost center master data? I didn't see that option on menu when I created one. Also, I tried transporting std hierarchy, which is allowed and in there I checked Profit center master data to be transport along. But my qu

  • Are there any plans to add rowing machine data to health app

    The health app is definitely good if your a runner or cyclist, however it doesn't seem to cover logging gym workout data. Does Apple have any plans to add metrics to the health app for these. In particular I use a rowing machine and it would be great

  • Imported iphoto's have disappeared

    maybe a month and half ago i imported my girlfriends photos onto my mac (she has her own user name etc) we have obiously deleted all the photos off from her phone and went into iphoto yesterday to get some photos and there is no photos I have used th

  • What is month end data from mbew?

    I have a report that shows valuated stock qty and value that needs to be filtered based on Month End data. (MARD, MBEW). How to code this filter "Month End data"?

  • Re: request failed in FIAP Data source

    Hi Gurus,             Please let me know  FIAP   data source is  schedule   in delta(daily 1.pm) but delta is failed in daily basis, when i run repeat  delta it is success . sometimes  repeat  delta  happens fails , what may be the root cause........