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.)

Similar Messages

  • I'm trying to send a pages document as an email attachment to pc users.  They can't access the document.

    I'm trying to send a pages document as an email attachment to pc users.  They can't access the document.  When I try go to the "file" menu, there is no "save as" option.

    Hi Shelly,
    Command-P (Print)
    In the Print dialogue, click the PDF button at lower left, choose Mail PDF
    The result should be a new email document with the pdf file attached.
    Address and send.
    The procedure applies to any document which may be printed, not just Pages documents.
    Regards,
    Barry

  • 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

  • Sending km document as an email attachment

    Hi all,
    I am trying to send a KM document as email attachment with the following peice of code. But I am getting FileNotFoundExceptio. Can anyone guide me as to where its going wrong. Any help will be appreciated.
    String filePath = "";
    ResourceContext ctx = new ResourceContext(getEP5User());
    RID rid = RID.getRID("/documents/LRForms/0000000054.pdf");
    IResource pdfResource =ResourceFactory.getInstance().getResource(rid, ctx);
    filePath =
         "irj\servlet\prt\portal\prtroot\com.sap.km.cm.docs\"
              + pdfResource.getRID().toString();
    Properties props = new Properties();
    props.put("mail.smtp.host", host);
    Session session = Session.getInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    Address toAddress;
    Address fromAddress;
    Address ccAddress;
    Address bccAddress = new InternetAddress();
    MimeMultipart multipart = new MimeMultipart();
    BodyPart messageBodyPart = new MimeBodyPart();
    fromAddress = new InternetAddress("[email protected]");
    message.setFrom(fromAddress);
    toAddress = new InternetAddress("[email protected]");
    message.setRecipient(Message.RecipientType.TO, toAddress);
    message.setSubject("Subject");
    messageBodyPart.setText("Please find attached the details.");
    multipart.addBodyPart(messageBodyPart);
    messageBodyPart = new MimeBodyPart();
    DataSource source = new FileDataSource(filePath);
    messageBodyPart.setDataHandler(new DataHandler(source));
    messageBodyPart.setFileName(source.getName());
    messageBodyPart.setHeader("Content-Type", "application/pdf");
    multipart.addBodyPart(messageBodyPart);
    message.setContent(multipart);
    Transport.send(message);
    On executing this code I am getting following exception.
    MessagingException javax.mail.SendFailedException: Sending failed;  nested exception is: javax.mail.MessagingException: IOException while sending message;  nested exception is: java.io.FileNotFoundException
    Thanks and regards,
    Jaydeep

    Hi,
    Did you check permissions/security zone settings on the folder/file?
    Can you access the file directly from the browser?
    Regards,
    Omri

  • 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

  • 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.

  • 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

  • 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 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

  • 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.

  • How at send a Word document as an email attachment from an ABAP program?

    Hi all,
    i got request to develop background run program which check which staff is due CONFIRM and able to attach confirmation form (Microsoft Word file) to HR and CC staff manager as recipients.
    I try almost all relevant FM but still face problem below, please assist.
    1) FM SO_DOCUMENT_REPOSITORY_MANAGER
    - A window pops up requesting Recipient email ids. I couldn't get the window suppressed.
    2) FM SO_NEW_DOCUMENT_ATT_SEND_API1
    - Since the attachment is a pre-formatted Word Document and not an Excel or Text document, couldn't process the contents into the internal table (most sample in forum is Excel not word)
    Appreciate ABAP folks who have sample code attach a word file will help on this.
    Thanks and regards,
    Felicek

    Hi ,
    sorry for my request but I have to send an e-mail with word attachment and I would appreciate if someone could give the code for
    the first part of this link: http://www.divulgesap.com/blog.php?p=ODI=
    (I mean 'ZDIV_SEND_EMAIL' ) . The problem is that I have to load in an internal table the file word (by using "open dataset in binary
    mode" I suppose ) and then pass this table to a FM or a method for sending e-mail with this file WORD but I 'm facing some
    problems....  any suggestion would be very appreciated ... I'm in a "impasse"  ! It's seems there is no way out !!!
    Thanks in advance
    Andrew

  • Word & Excel will not send open Document as an Email Attachment

    I have a user (one of the firm's managing principals), who can no longer Email the currently open document as an attachment from Word or Excel.  The last thing
    that was installed on her system was Outlook 2013, it is set as the default email software.   She also has Office 2003, this was left on her machine to help in the transitioning into the newer version, I am not sure how much she uses this.<o:p></o:p>
    is there a way to correct this 'WITH OUT' installing Office 2013?
    <o:p>Thank you,</o:p>
    <o:p>Robert</o:p>

    Hi,
    The "Send as Attachment" option only works when Outlook and word are installed from the same suite. That is required.
    Thanks,
    Ethan Hua CHN
    TechNet Community Support

  • I seem to be having trouble sending a PDF edited document as an email attachment?

    IT seems to send but then never arrives.  Im using trial version of Adobe Acrobat Pro XI.

    Hi Susan,
    I'd like to assist!
    Would you mind elaborating? The trial version has all the same functionality as the full version.
    Are you receiving a specific error message?
    Looking forward to hearing back from you!
    Kind regards, Stacy

  • Send Adobe form as email attachment

    Hello Experts,
    Recently iu2019m facing a problem regarding Adobe form PDF attachment and sending an e-mail along with the PDF attachment to customer mail id.But when i execute the RFC Function module, in customer side no mail is comming. And when i check the transaction SBWP then i found that the PDF attachment hold only 1KB of data which is not right.For that iu2019m sending my code which i was declared in my program.Can anybody Please help me to overcome this problem?
    FORM print_form USING p_disp       TYPE char1
                          drb_mail     TYPE char1
                         p_email LIKE itcpo-tdcovtitle
                         p_email1 LIKE itcpo-tdcovtitle.
      DATA ds_recipient  TYPE   swotobjid.
      CLEAR: dg_funcnam, dg_outputparams.
    *--Call generated function module
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name     = c_form
        IMPORTING
          e_funcname = dg_funcnam.
    dg_outputparams-nodialog = 'X'.
    dg_outputparams-getpdf   = 'X'.
    Job Open for PDF
    CALL FUNCTION 'FPCOMP_JOB_OPEN'
      CHANGING
        ie_outpar      = dg_outputparams
      EXCEPTIONS
        cancel         = 1
        usage_error    = 2
        system_error   = 3
        internal_error = 4
        OTHERS         = 5.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      EXIT.
    ENDIF.
    dg_docparams-langu = 'X'.
    dg_docparams-country = 'US'.
    dg_docparams-fillable = 'X'.
    form CONVERT_PDF_BINARY .
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER                = FP_FORMOUTPUT-PDF
      APPEND_TO_TABLE         =  ' '
    IMPORTING
      OUTPUT_LENGTH         =
        TABLES
          BINARY_TAB            = t_att_content_hex .
    endform.                    " CONVERT_PDF_BINARY
    *&      Form  MAIL_ATTACHMENT
          text
    -->  p1        text
    <--  p2        text
    form MAIL_ATTACHMENT USING  p_email LIKE itcpo-tdcovtitle
                        p_email1 LIKE itcpo-tdcovtitle.
    CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    Message body and subject
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear,' TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Please fill the attached form and send it back to us.'
      TO lt_message_body.
      append ' ' to lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.  lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Personnel Information Form' ).
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.  TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Personnel Information Form'
    I_ATTACHMENT_SIZE =
    I_ATTACHMENT_LANGUAGE = SPACE
    I_ATT_CONTENT_TEXT =
    I_ATTACHMENT_HEADER =
          i_att_content_hex = t_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    Add attachment
    Pass the document to send request
      lo_send_request->set_document( lo_document )."* Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send type ADR6-SMTP_ADDR value ' here mail id '.
    l_send = P_email.
    l_send = P_email1.
    lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_sender = cl_sapuser_bcs=>create( sy-uname ).
    Set sender
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender )." Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    lo_send_request->add_recipient(
    EXPORTING
    i_recipient = lo_recipient
    i_express = 'X' ).* Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      message 'The Personnel Information form has been emailed to the Employee' type 'I'.
    endform.                    " MAIL_ATTACHMENT
    *--Call Function module
    CALL FUNCTION dg_funcnam
      EXPORTING
        /1bcdwb/docparams  = dg_docparams
        im_logo         = dg_logo
        im_user_address = dt_user_address
        im_ship_to_addr = dt_imp_data
        im_text         = ds_text
        im_sales_text   = dt_sales_text
        im_item_data    = dt_item_data
      IMPORTING
        /1BCDWB/FORMOUTPUT = FP_FORMOUTPUT
      EXCEPTIONS
        usage_error     = 1
        system_error    = 2
        internal_error  = 3
        OTHERS          = 4.
    IF sy-subrc <> 0.
    ENDIF.
    CALL FUNCTION 'FPCOMP_JOB_CLOSE'
      IMPORTING
        e_jobresult    = l_result
      EXCEPTIONS
        usage_error    = 1
        system_error   = 2
        internal_error = 3
        OTHERS         = 4.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    DATA : dl_msg TYPE string.
    CONCATENATE 'Successfully mailed to' p_email p_email1 INTO dl_msg SEPARATED BY space.
    IF drb_mail = 'X'.
       COMMIT WORK.
       MESSAGE dl_msg TYPE 'I' .
       MESSAGE i000 WITH 'Successfully mailed to' p_email1.
    ENDIF.
    ENDFORM.                    "print_form
    Could you please any body help me, it's very uregent issue.
    Regards
    Sandeep

    *& Report  ZGB_ATTACHMENT
    REPORT  zgb_attachment.
    DATA:
    l_formname        TYPE fpname VALUE 'ZGB_ATTACHMENT',
    l_fm_name         TYPE rs38l_fnam,
    fp_outputparams   TYPE sfpoutputparams,
    fp_docparams      TYPE sfpdocparams,
    fp_formoutput     TYPE fpformoutput.
    DATA:
      t_att_content_hex TYPE solix_tab.
    PARAMETERS: p_pernr TYPE persno.
    START-OF-SELECTION.
      PERFORM get_function_module.
      PERFORM create_document.
      PERFORM convert_pdf_to_binary.
      PERFORM mail_attachment.
    *&      Form  GET_FUNCTION_MODULE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM get_function_module .
      CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
        EXPORTING
          i_name              = l_formname
        IMPORTING
          e_funcname          = l_fm_name
    *     E_INTERFACE_TYPE    =
    *     EV_FUNCNAME_INBOUND =
    ENDFORM.                    " GET_FUNCTION_MODULE
    *&      Form  CREATE_DOCUMENT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_document .
    *JOB OPEN
      CALL FUNCTION 'FP_JOB_OPEN'
        CHANGING
          ie_outputparams = fp_outputparams
        EXCEPTIONS
          cancel          = 1
          usage_error     = 2
          system_error    = 3
          internal_error  = 4
          OTHERS          = 5.
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
      fp_docparams-langu = 'X'.
      fp_docparams-country = 'US'.
      fp_docparams-fillable = 'X'.
      CALL FUNCTION l_fm_name
        EXPORTING
         /1bcdwb/docparams        = fp_docparams
          pernr                    = p_pernr
       IMPORTING
         /1bcdwb/formoutput       = fp_formoutput
    * EXCEPTIONS
    *   USAGE_ERROR              = 1
    *   SYSTEM_ERROR             = 2
    *   INTERNAL_ERROR           = 3
    *   OTHERS                   = 4
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
    *JOB CLOSE
      CALL FUNCTION 'FP_JOB_CLOSE'
    *    IMPORTING
    *      e_result       =
        EXCEPTIONS
          usage_error    = 1
          system_error   = 2
          internal_error = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * Implement suitable error handling here
      ENDIF.
    ENDFORM.                    " CREATE_DOCUMENT
    *&      Form  CONVERT_PDF_TO_BINARY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM convert_pdf_to_binary .
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer                = fp_formoutput-pdf
    *   APPEND_TO_TABLE       = ' '
    * IMPORTING
    *   OUTPUT_LENGTH         =
        TABLES
          binary_tab            = t_att_content_hex
    ENDFORM.                    " CONVERT_PDF_TO_BINARY
    *&      Form  MAIL_ATTACHMENT
    FORM mail_attachment .
      CLASS cl_bcs DEFINITION LOAD.
      DATA:
      lo_send_request TYPE REF TO cl_bcs VALUE IS INITIAL.
      lo_send_request = cl_bcs=>create_persistent( ).
    * Message body and subject
      DATA:
      lt_message_body TYPE bcsy_text VALUE IS INITIAL,
      lo_document TYPE REF TO cl_document_bcs VALUE IS INITIAL.
      APPEND 'Dear,' TO lt_message_body.
      APPEND ' ' TO lt_message_body.
      APPEND 'Please fill the attached form and send it back to us.'
      TO lt_message_body.
      APPEND ' ' TO lt_message_body.
      APPEND 'Thank You,' TO lt_message_body.
      lo_document = cl_document_bcs=>create_document(
      i_type = 'RAW'
      i_text = lt_message_body
      i_subject = 'Personnel Information Form' ).
      DATA: lx_document_bcs TYPE REF TO cx_document_bcs VALUE IS INITIAL.
      TRY.
          lo_document->add_attachment(
          EXPORTING
          i_attachment_type = 'PDF'
          i_attachment_subject = 'Personnel Information Form'
    * I_ATTACHMENT_SIZE =
    * I_ATTACHMENT_LANGUAGE = SPACE
    * I_ATT_CONTENT_TEXT =
    * I_ATTACHMENT_HEADER =
          i_att_content_hex = t_att_content_hex ).
        CATCH cx_document_bcs INTO lx_document_bcs.
      ENDTRY.
    * Add attachment
    * Pass the document to send request
      lo_send_request->set_document( lo_document ).
    * Create sender
      DATA:
      lo_sender TYPE REF TO if_sender_bcs VALUE IS INITIAL,
      l_send TYPE adr6-smtp_addr VALUE '[email protected]'.
    *  lo_sender = cl_cam_address_bcs=>create_internet_address( l_send ).
      lo_sender = cl_sapuser_bcs=>create( sy-uname ).
    * Set sender
      lo_send_request->set_sender(
      EXPORTING
      i_sender = lo_sender ).
    * Create recipient
      DATA:
      lo_recipient TYPE REF TO if_recipient_bcs VALUE IS INITIAL.
    *  lo_recipient = cl_sapuser_bcs=>create( sy-uname ).
      lo_recipient = cl_cam_address_bcs=>create_internet_address( l_send ).
    ** Set recipient
      lo_send_request->add_recipient(
      EXPORTING
      i_recipient = lo_recipient
      i_express = 'X' ).
    *  lo_send_request->add_recipient(
    *  EXPORTING
    *  i_recipient = lo_recipient
    *  i_express = 'X' ).
    * Send email
      DATA: lv_sent_to_all(1) TYPE c VALUE IS INITIAL.
      lo_send_request->send(
      EXPORTING
      i_with_error_screen = 'X'
      RECEIVING
      result = lv_sent_to_all ).
      COMMIT WORK.
      MESSAGE 'The Personnel Information form has been emailed to the Employee' TYPE 'I'.
    ENDFORM.                    " MAIL_ATTACHMENT

Maybe you are looking for

  • ILife 08 and iMovie 06 compatibility issues?

    Sorry if any of this has already been covered in other threads... Has anyone had a chance to thoroughly test the 6.04 version of iMovie (download version if you install iLife 08) and know what compatibility issues there are? I.E. How well does iPhoto

  • Invalid username or password after migrating user BIEE11g

    Hi, I have migrated user (e.g. user_1) from dev to another uat. according to : http://www.obieetalk.com/oracle-biee-11g-%E2%80%93-migrating-security-%E2%80%93-identity-stores-%E2%80%93-part-1 When i login uat as "user_1", it encounter errors: =======

  • How can I stop my computer from shutting down completely when I play fv2?

    Windows 7 64 bit.  My computer shuts down after 5 minutes of play on farmville2 and after about 20 minutes on farmville1 and gardens-of-time. I have followed all the instructions on the help page with no change. If anyone out there has any suggestion

  • Invoking class from loaded swf

    I'm working on a project where I'm loading in a video player as an external swf to my main movie. I'm not able to get my video or the custom player to show up, but sound is there (I've done the whole Library>New Video thing, so I have a video object

  • What exactly does the screen lock do?

    I am looking at this thing but I have no idea what it does. It wasn't on my 4g. What is it?