Send report query as email attachment

Hi,
I have created a multireport query under Shared Components that allows users to print several sql queries to a pdf file in a prefefined format. Is it possible to generate an email out of Apex with this report query pdf as an attachment (without having the users save the pdf to their hard drive and and manually attach to an email)?
Thanks,
Forrest

Hello RnB,
You can check the mentioned link for the same:
[Simple Program to generate PDF from ABAP List Output.|http://www.abapmadeeasy.com/2011/02/sap-abap-simple-program-to-generate-pdf.html]
Regards,
Uttam Agrawal

Similar Messages

  • Send report as an email attachment from a page

    Hi
    I have page which generates a report based on two filters. After the report is generated, 'I want to send that report as an email attachment from that page, when button is clicked "Send Email"
    Thanks a lot in advance.'

    I accomplished functionality I believe similar to what you are looking for in an application once by querying a report into an html e-mail message. This approach gives you all kinds of flexibility. At least this would be one way of doing it. I am going to include a simplified sample here of what the script looked like. I hope this is at least helpful.
    DECLARE
    l_body_html CLOB;
    BEGIN
    l_body_html :=
    '<html>
    <head>
    <style type="text/css">
    body{font-family: Arial, Helvetica, sans-serif;
    font-size:9pt;
    margin:30px;
    background-color:#ffffff;}
    </style>
    </head><body>
    ' || UTL_TCP.crlf;
    l_body_html :=
    l_body_html || '<table border="1"><tr bgcolor="#999999">
    <th width="75" scope="col">
    Department
    </th>
    <th width="75" scope="col">
    Course
    </th>
    </tr>' || UTL_TCP.crlf;
    FOR c1 IN (SELECT some_table.DEPARTMENT, some_table.COURSE FROM some_table)
    LOOP
    l_body_html :=
    l_body_html || '<tr><td>
    ' || c1.DEPARTMENT || '
    </td>' || UTL_TCP.crlf;
    l_body_html := l_body_html || '<td>
    ' || c1.COURSE || '
    </td>' || UTL_TCP.crlf;
    l_body_html := l_body_html || '</tr>' || UTL_TCP.crlf;
    END LOOP;
    l_body_html := l_body_html || '</table>' || UTL_TCP.crlf;
    apex_mail.send(
    p_to => '<some email address>',
    p_from => '<desired from address here>',
    p_body => NULL,
    p_body_html => l_body_html,
    p_subj => '<desired subject line here>');
    END loop;
    apex_mail.push_queue;
    END;
    Edited by: stbrownOSU on Dec 8, 2009 2:53 PM
    I think something must have happened when I copied and pasted the code from TOAD. I have corrected the above code. Please try it again.

  • Send Report output as Email attachment (PDF)

    Hi Experts,
      i am trying to send the contents of an internal table from my report as email using PDF attachment. I have coded the logic and i get the attachment in the email. When i try to open the attachement, i cannot open it.
    The message i get is "_Adobe reader could not open the attachment "attach.pdf" because it is either not a supported file type or the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded )._
    Not sure where i went wrong.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
    CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
      ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = it_message
          receivers                  = t_receivers
        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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "send_file_as_email_attachment

    Hello RnB,
    You can check the mentioned link for the same:
    [Simple Program to generate PDF from ABAP List Output.|http://www.abapmadeeasy.com/2011/02/sap-abap-simple-program-to-generate-pdf.html]
    Regards,
    Uttam Agrawal

  • How do I save my exported doc in order to send it as an email attachment?

    how do I save my exported doc in order to send it as an email attachment?

    Plug your ipod in and pull up itunes. Then click on the device name in the left hand side. Click the restore option. When it goes all the way through and says "your device has been restored and is restarting, once it restarts you want to choose the option that says "setup as a new device"

  • Can you send slideshows as an email attachment?

    can you send slideshows as an email attachment? Please provide the steps if it is possible, thank you

    Yes, but you shouldn't.
    Here's how.
    Export the Slideshow to the FInder - a process that will make a QuickTime movie of it.
    Attach that movie to the email. Send
    Why not? Videos are very large files. Most Internet providers have a limit on the largest file you can send. Sending one too large means it can bounce back to you. ALso, even if the other person can receive it, downloading large files via email is slow, and can even cause crashes on some email apps on older systems.
    Intead of emailing it, upload it to DropBox, YouTube, Vimeo, or any other sharing site and send the person a link.
    Then they can download it themselves
    Regards
    TD

  • I want to send my output of report as an email attachment

    i am having internal table contains values.
    i want that output should be send as an email attachment
    to email id given in selection screen.
    help me how to pass that internal table to the parameters
    of SO_DOCUMENT_SEND_API1 function module
    should i call any function modules to format my internal table to get as an attachment in email.
    help me its urgent..

    *& Report  ZEMAIL_ATTACH                                               *
    *& Example of sending external email via SAPCONNECT                    *
    REPORT  ZEMAIL_ATTACH                   .
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *   Retrieve sample data from table ekpo
      PERFORM data_retrieval.
    *   Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    * Populate message body text
      perform populate_email_message_body.
    * Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
    *   Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
    *       Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D',  "OK for non Unicode
                 con_tab TYPE x VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    *    con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
                    wa_charekpo-aedat wa_charekpo-matnr
               INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    *       Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    * Fill the document data.
      w_doc_data-doc_size = 1.
    * Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    * Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    * Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    * Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    * Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    * Populate zerror return code
      ld_error = sy-subrc.
    * Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
    *       Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
    *        Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.
                       " POPULATE_EMAIL_MESSAGE_BODY

  • Cannot send report to desired email address

    Hi,
    When an user tries to schedule a webi report in InfoView and send the report (as an attachment) to an manually entered email address, the report is always send to the default email address (of the adaptive Jobserver defaults).
    The user schedules the webi report by rightclicking it in InfoView -> select schedule -> format and destinations-> select email recipients -> deselect Job server defaults ->enter email -> click on schedule
    The default email address is the address entered in the CMC in servers -> adaptiveJobserver -> Destination.
    All users are experiencing this problem, except for the (general) Administrators.
    So I guess the problem is caused by insufficient rights. Obviously the question is which right I have to enable in order to make sure the report is delivered to the email address the user has entered.
    BTW, I'm using BO XI R3.1 FP1.3.
    Thanks a lot.

    Hello rp02100 and welcome to the BlackBerry Support Community Forums.
    Sorry to hear you're experiencing an issue with your email.
    What type of email account are you using - Gmail, Yahoo, POP/IMAP, Hotmail? Does this only happen when you try to send to yourself using this email and to this email account? 
    If you have more than one email account, if you were to use a different email account and send yourself an email to another account, does this same issue happen?
    Thanks!
    -HMthePirate
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • Send report output as pdf attachment (without collecting spool )

    I used to do this requirement by collecting the spool and then convert it to pdf. But in this case we should use the report output ( NOT FROM SPOOL )  and convert it to PDF and send it as email attachment.
    Please help.
    Thanks!

    Hi,
    I can think of these options. Please explore on the possibilities.
    1) Create one MAIN Report , which will submit your report. Get the List output from memory. Convert the Data to PDF and send the PDF as attachment in mail.
    2)  Create a smartform which will be called in your report. Convert the returned data to PDF and then send the PDF as attachment in mail.
    3) Create one MAIN Report , which will submit your report thorugh a JOB. Wait for the JOB to be completed. Convert the ABAP Spool data to PDF and send the PDF as attachment in mail.
    Regards,
    Abhishek

  • Send PDF-Spool via email-Attachment

    Hi,
    i send an internal table to spool and convert it.
    this works ok.
    But when i send it via
       CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    i have problem with the attachment (PDF-Error).
    Has anyboby a codeexample?
    Here my short report until Conversion into PDF
    REPORT ZGRO_TEST.
    TABLES: MARA.
    DATA: BEGIN OF ITAB OCCURS 0.
            INCLUDE STRUCTURE MARA.
    DATA: END   OF ITAB.
    DATA: FILESIZE     TYPE I.
    Spoolnummer
    DATA: SPOOL_NR     LIKE TSP01-RQIDENT.
    PDF Ausgabetabelle
    DATA: BEGIN OF PDF_OUTPUT OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA: END   OF PDF_OUTPUT.
    START-OF-SELECTION.
      SELECT * FROM MARA INTO TABLE ITAB UP TO 100 ROWS.
    Ausgabe in Spool umleiten
      NEW-PAGE PRINT ON LINE-SIZE 255
                     NO DIALOG
                     NO-TITLE
                     NO-HEADING
                     IMMEDIATELY ' '.
    interne tabelle ausgeben
      LOOP AT ITAB.
        WRITE:/ ITAB.
      ENDLOOP.
    Rücksetzen Spollausgabe auf Bildschirm.
      NEW-PAGE PRINT OFF.
    Spoolnummer besorgen
      SPOOL_NR = SY-SPONO.
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                SRC_SPOOLID   = SPOOL_NR
           IMPORTING
                PDF_BYTECOUNT = FILESIZE
           TABLES
                PDF           = PDF_OUTPUT.
    END-OF-SELECTION.
    How can i use the PDF_OUTPUT as email attachment?
    Thanks for help.
    Regards, Dieter

    after you get the pdf output:
    do like this:
      LOOP AT it_pdf_output.
        TRANSLATE it_pdf_output USING ' ~'.
        CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
      ENDLOOP.
      TRANSLATE gd_buffer USING '~ '.
      DO.
        it_mess_att = gd_buffer.
        APPEND it_mess_att.
        SHIFT gd_buffer LEFT BY 255 PLACES.
        IF gd_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
    REFRESH it_mess_bod.
    Default subject matter
      gd_subject         = 'Subject'.
      gd_attachment_desc = 'Attachname'.
    CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
      it_mess_bod        = 'Message Body text, line 1'.
      APPEND it_mess_bod.
      it_mess_bod        = 'Message Body text, line 2...'.
      APPEND it_mess_bod.
    If no sender specified - default blank
      IF p_sender EQ space.
        gd_sender_type  = space.
      ELSE.
        gd_sender_type  = 'INT'.
      ENDIF.
    Send file by email as pdf   PERFORM send_file_as_email_attachment
                                   tables it_mess_bod
                                          it_mess_att
                                    using p_email
                                          'Example .pdf documnet attachment'
                                          'PDF'
                                          gd_attachment_name
                                          gd_attachment_desc
                                          p_sender
                                          gd_sender_type
                                 changing gd_error
                                          gd_reciever.
    FORM send_file_as_email_attachment tables it_message
                                              it_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
    data:   t_packing_list like sopcklsti1 occurs 0 with header line,
            t_contents like solisti1 occurs 0 with header line,
            t_receivers like somlreci1 occurs 0 with header line,
            t_attachment like solisti1 occurs 0 with header line,
            t_object_header like solisti1 occurs 0 with header line,
            w_cnt type i,
            w_sent_all(1) type c,
            w_doc_data like sodocchgi1.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = it_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    Regards,
    Ravi

  • Sending document as an email attachment

    I have just installed pages '08 and trying to find out how to send a document as an email attachment. I accustomed to using Word, which has "send as an attachment" in the File menu, which is very convenient, since it takes a couple of seconds and you don't have to save and find files to drop into the email.
    Does Pages have anything like this?

    Pages doesn't have a function like that, and in fact Pages files are a bit cumbersome to mail, since they need to be archived (compressed/"zipped") first, to ensure they get sent correctly. In other words, the process is to select the document in the Finder, in the File menu choose "Create Archive" and then attach the resulting file to the email.
    There is a trick however that will make doing this easier -- if you have a saved Pages file, you can go up to the title bar and Control-click on the icon next to the file name. This action will produce a dropdown menu that lists the path to the file. The item just below the file name is the folder that the file is in -- if you choose that item, you will see a Finder window for that folder pop up, with the file name highlighted. You can now immediately go to the Finder's File menu and choose Create Archive. This technique means you don't have to hunt around for where the file is located on your computer, and can speed things up a bit. (This Control-click on the proxy icon works in all windows in OS X, not just for Pages.)

  • Send Reports in an Email

    I was wondering if any of you have been challenged to automatically send reports from CRMOD via Email. If you have and you were successful how did you guys do it.
    I hope this feature is built in future versions

    Smjohn,
    You can't automatically run reports to send via email but why not setup a dashboard as a custom web tab for these people so they can just click on the tab to view the report?
    cheers
    Alex

  • Send payload content as email attachment

    Hi all
    I have a field in the source structure, the content of this field/tag has to be sent as an email attachment.
    Appreciate your help in advance
    -Keerthi

    Hi,
    Try using a receiver mail adpater, you can send the payload data as attachment.
    http://help.sap.com/saphelp_tm60/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Thanks,
    Pragati

  • Send destination message in email attachment

    I have a source schema(let A) and it is converted into destination schema(let B) through mapping.The destination message is sent to a file location.Now I want to send this destination message in email attachment through c# code.but the destination message
    should be pick up from orchestration not from send file location.
    how it is possible ?

    Are you talking about sending your message as an attachment through the orchestration? Well that is what the SMTP Adapter is for. Refer
    http://winterdom.com/2005/08/smtpadapterinbts2006andhtmlformattedmessages and the official document on SMTP Adapter @http://msdn.microsoft.com/en-us/library/aa578267.aspx
    To receive mails into an orchestration, you should have a POP3 enabled e-mail account, use the POP3 Adapter with the MIME/S-MIME Pipeline Components to pick-up and read the mails from BizTalk.
    Regards.

  • Do not know how to take a saved doc and send it as an email attachment in my gmail account

    how do i take a scanned doc, saved in my doc folder and send it as an email to recipient.
    I get confirmation that it was sent but person says it was not attached

    Hi,
    The following is the program[Click Here| http://saptechnical .com/Tips/ABAP/email/EmailProgram.txt] which will send any format file. Actual Creator of the program is Amit Bisht.
    Thanks & Regards,
    Rock.

  • Send report output via email as zipped attachment

    Is it possible for the report output to be zipped before being attached to an email when running on a windows reports_server? On unix we theoretically have the ability to modify the mail.sh shell script that performs the mail operation for reports.

    Hi Richard
    This is a Reports 9i solution.
    You may create a batch file that runs the report, compresses the file and invokes, say, a Java application that mails the given .zip file.
    More "advanced" options would be:
    You may create a pluggable destination that captures report output. Next, your code does the compresses the output file and mails it.
    A simpler solution would be to run two reports. First, that creates the reports output file. In its AFTER_REPORT trigger, call Java method (thru. Java Importer), that picks up the output file and compresses it. Second, that uses XML distribution feature of Reports 9i and mails the .zip file as a file attachment using appropriate construct.
    Regard
    Sripathy

Maybe you are looking for

  • Calling a function in a function

    I am trying to call a function in a function (CF Report Builder 7) and I always got an error. As far as I know, it is suppose to be very simple and I keep it simple but since I work with re-usable function, I try to apply this method as well in CF Re

  • Which Soundcard should i buy for Musicproduction on new iMac ?

    Hi, I'm planning to buy a new 20" iMac Intel. The main use will be Music Production as in Home Recording Studio. My question is for reasons of Budgeting. I'm now a Windows user and for music production I use Steinberg System 4 which includes the Stei

  • How to change font in just one column of JTable

    I have a table with 4 column. I want to have Courier font in column number 2, and Arial in columns number 1, 3 and 4. With: table.setFont(new Font("Courier New", Font.PLAIN, 12)); I can set fonts in all columns but how to set font in just one column.

  • Mac Mini 2006 MA607LL/A need to buy dual layer burner

    Hi guys. I bought a MA607LL/A mac mini. I need to upgrade so it can read dual layer burn cd. So I guess super drive? Which one will fit? Ty

  • LM61 Unpack HU Materials or HU from HU

    Hi Please see attachment LM61 Unpack Screen flow. It should allow me to Unpack, but I get an error "Handling unit &1 not found in the warehouse". The HU does exist and the error message is not correct. Could someone please advise how to Unpack in RF?