External Email (PDF Attachment) while PO is created or Changed

Hi All,
I have a requirement as below.
1. When a PO is created / changed then saved, the PO Form is to be sent to the respective vendor through External Email along with the PO Form printout generated.
2. The PO Form is to be attached in the Email (PDF Document).
Please write to me if you have a suitable solution for this requirement.
I have created the PO Form in SAPScript. Is it possible to develop the above requirement in SmarForm? Please suggest me.
Thanks in Advance,
Kannan.

Since you are using SAPScript I thought this solution would be simpler. We are also using SAPScript and email all document types when necessary.
1. As suggested before: create an output type as an email type (Same as mornal output just the value 8 for transmission medium).
2. For ease of maintainance I copied the associated printing program to a new program and link this new program to the output type as normal.
3. In your print program make the following changes.
(a) include code below just before your open form. You can read the email address from whereever you have them. In this example they are read from a custom z* table ZEMAIL_TEMP . Sometimes we read them from customer master, vendor master etc.
(b) make sure you have the folowing export parameter in your "START_FORM" Function module
     MAIL_RECIPIENT = RECIPIENT_OBJ
4. Make sure your conversion rules are set properly. Transaction code SCOT Setting-->Conversion Rules
SAPScript text is an OTF type. We are converting our forms to PDF so we have the following entry:
Format = OTF     
Format to = PDF
Ranking = 1        
Function Module = SX_OBJECT_CONVERT_OTF_PDF</b>
5. The are other bells and whistles (like changing the email header) that I can happily share once/if you are happy with your solution.
Hope I am not missing any vital info.
Good Luck

Similar Messages

  • Email Billing document as PDF Attachment while saving from VF01/02

    Hi,
    Can anybody suggest if there is any BADI/User Exit/Configuration exists in order to email Billing document as a PDF attachment while saving from VF01 or VF02?
    We need to trigger this while saving the Output type say, VF02 GOTO -> HEADER -> OUTPUT (select the output type) -> SAVE - should send an email with PDF attachment.
    I have written the code for sending email with PDF attachment. Presently this code is included in the Print program for the sapscript and an email is sent when an output is issued from VF01/02/03 where as the requirement is to send email whenever the document is saved.
    Thanks in Advance,
    Srinivas

    Hi,
    While saving subroutine FORM_OPEN will get triggerred, and this will be included in the Z Program. If it is not contained in the Z program, include this subroutine. This subroutine will have include RVADOPFO.
    The above include will have the function module ADDR_GET_NEXT_COMM_TYPE, and the import parameter LVS_COMM_VALUES will contain the address number and email address to whom the pdf needs to be sent.
    So here, i.e. In place of standard include RVADOPFO, put custom include ZRVADOPFO, and modify the code as below.
    After the function module ADDR_GET_NEXT_COMM_TYPE, read the email address from any custom table based on the various conditions or hard coded value, then move it to the below variable.
    LVS_COMM_VALUES-ADSMTP-SMTP_ADDR.
    And remaining functionality will be taken care by the standard code. i.e. converting the spool to PDF and attaching it while sending the email etc....
    If I am not wrong, the same functionality will work  even while saving the sales order etc..
    Regards,
    Santu.

  • Need to send external email with attachment for workflow 20000075

    Hello Everyone,
    I am new to W/F, I Need to send external email with attachment for PO Release W/F 20000075. Currently Work item is being sent to SAP inbox of required user based on PO Release strategy configuration in SPRO. I tried to create Send mail step after PO release event but I am not sure how to arrive at Recipient type in send mail step(the mail should be sent to person in the release strategy). Everything looks fine all I need to do is to send external email with attachment instead of sending work item into SAP inbox.
    Your help will be highly appreciated.
    Thanks.

    You can use extended notifications to send an e-mail message with a link to the workitem. Search for extended notifications in SDN.
    Regards,
    Martin

  • In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    In my Mac Mail Version 4.5, I am not received email pdf attachement. It is shown in some html like form in message content. Please help

    Erdygirl please be aware you are posting to a public forum.  I have removed your personal information from your previous post.
    Please check your account at http://www.adobe.com/ to locate your serial number.  You can find more information on how to locate your serial number at Find your serial number quickly - http://helpx.adobe.com/x-productkb/global/find-serial-number.html.

  • Email PDF attachements

    email PDF attachements that are open in ibooks will not close , and cant return to mail box in box

    This has happened to other users too. There seems to no solution to prevent it from happening. You can restore you iPad to service by either resetting your iPad:
    Press and hold both the Sleep/Wake button and the
    Home button for at least ten seconds, until the Apple logo appears.
    Or for some people turning of and then back on the specific Mail account in Setting does the trick.

  • Send e-mail  Billing document as PDF Attachment while saving from VF01/02

    Hi all,
    I have written the code for sending email with PDF attachment. Presently this code is included in the Print program for the smartform and an email is sent when an output is issued manually from VF02/03 where as the requirement is to send email whenever the document is saved.
    We need to trigger this while saving the Output type say, <b>VF01</b> GOTO -> HEADER -> OUTPUT (select the output type) -> SAVE - should send an email with PDF attachment.
    need ur help on this.
    thanks,
    Subba.

    Hello,
    Just like you have defined an ouput type for smartforms ,you can define new output type with external email option as medium which will first generate a PDF from invoice data & then send it as email .
    I am not sure but you can also try this ::::::
         If you have custom-developed smartforms program,then you can add email code at the end of smartform execution by generating PDF, in the same output type instead of  creating new.
    Thanks.

  • Send PO External email with attachement and Body text

    Hi,
    I need to send Purchase Orders to Vendors as PDF attachments to emails; I have successfully configured all the necessary to send external email with PDF attachement but I want to add text in the body of the email:
    For Output Type NEU
       Access to conditions (General Data) set to X the Replacement of text symbols is SAPMM06E/TEXT_SYMBOL_REPLACE and I fill the text in the Mail Title and Texts. The email was send with all the information : Attachement, title with PO number but with no text in the body.
    Can somebody help me with this issue.
    best regards
    Andre

    Hi,
       My file is "PO Number APM - 123456.dpf". You have to config the "Define Message Types for Purchase Order" in the section Mail title and texts with NEU output type. But don't forget to put the program name SAPMM06E
    Look at
    [purchase order as email - SAPMM06E and TEXT_SYMBOL_REPLACE|purchase order as email - SAPMM06E and TEXT_SYMBOL_REPLACE]
    Best regards
    Andre

  • Email PDF attachment not opening error

    Hi All,
    I am sending the PDF attachment through email when i get the mail and opening the attachment the PDF says "A drawing error occurred'. Can any one tell me how to solve this problem.
    i am doing otf to pdf conversion and the populate all the field related to the email.
    Is there any specific solution for this error.
    Regards,
    Lakshmikanth

    Hi All,
    I am sending the PDF attachment through email when i get the mail and opening the attachment the PDF says "A drawing error occurred'. Can any one tell me how to solve this problem.
    i am doing otf to pdf conversion and the populate all the field related to the email.
    Is there any specific solution for this error.
    Regards,
    Lakshmikanth

  • Dunning letter (email) PDF attachment or body of email

    Hi experts,
    What is the industry practice for dunning letters when sent via email? Attach them as a pdf to the email, or add all the content of the dunning letter to the body of the email to make it easier for the customer to receive the message?
    Thanks,
    Mario

    Hi Mario,
    It all depends on the functionality that and payment option that are provided.
    If the dunning letters contains and payment/remittance slip(through which customer can make payment in bank, outlet or post office) than the letter should go as PDF attached to mail with body saying that its the reminder for payment being missed,
    But if the payment option is not like as described above than you can send the the letter in html body mail.
    Regards

  • Can no longer open email PDF attachment in iBooks

    Just discovered can no longer open on iPad mini any email attachment PDF file in iBooks.  Cannot tap attachment and select open in iBooks. PDF attachment opens itself automatically on the body of the email. Is this a PDF problem or iPad problem or iBooks problem.

    It's not a problem with either app. Just hold down on the open PDF to bring up the "open in" window. If hold down on the open PDF and select "Quick Look" , that will give you the full screen file and you will see the share icon in the upper right corner.

  • PDF Attachment while posting thru MIRO / FB60

    Dear Friends,
    I need your help on the following scenario.
    Requirement:
    we are going to build an interface for invioce postings in SAP using Tcode FB60(Invioce with out PO) and MIRO(with PO).
    Data has to be picked up by the interface from a staging server where each invoice data is available in .dat format.
    Data for posting is from the .dat file. We are going to store that in Z tables and will use for posting.
    But our additional requirement is each invoice will have a PDF document(supporting document for that invoice), it is not the invoice as such, but an additional document.
    While doing the posting in SAP thru FB60/MIRO transaction, the PDF file corresponding to this invoice has to be attached with this posting.
    Problem Areas:
    We know that an attachment can be uploaded thru transaction in FB03 after the posting is done using Object Services.
    1. But our concern is how can they be attached programatically?
    2. Can't we attach the file while doing Posting either thru FB60 or MIRO?
    3. How to extract those PDF files placed in another server and attach during the background job?
    Any help/inputs on this is highly appreciated.
    SAP Version: 4.7 Enterprise edition
    Note: Content of the PDF attachment is not the data for invoice posting, no need to read its contents, it only has to be attached with the posting.
    Regards,
    Simha

    Change in requirement..
    Hence i am closing this thread.
    Regards,
    Simha

  • Emailing PDF attachment. Context is lost...

    Hi Folks
    In a previous post a asked about how to attach and send a dynamic PDF form.
    In the following code I determine the Form Name, get the FORMOUTPUT and add it to an email attachment.
    My problem now is that when I look in transaction SOST the attachment doesn't display any of the dynamic info supplied from the context.
    Could someone please help to tell me how I need to include this.
    <br>
    Thanks
    <br>
    * First get name of the generated function module<br>
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'<br>
      EXPORTING<br>
        i_name     ='ZSFPFLS_EX_WDA_CON'<br>
      IMPORTING<br>
        e_funcname = fm_name.<br>
    <br>
    * Set output parameters and open spool job<br>
    fp_outputparams-nodialog = 'X'. " suppress printer dialog popup<br>
    fp_outputparams-getpdf = 'X'. " launch print preview<br>
    fp_outputparams-PDFCHANGESRESTRICTED = 'N'. "Form can be filled out and signed and you can also create comments<br>
    <br>
    CALL FUNCTION 'FP_JOB_OPEN'<br>
      CHANGING<br>
        ie_outputparams = fp_outputparams<br>
      EXCEPTIONS<br>
        cancel          = 1<br>
        usage_error     = 2<br>
        system_error    = 3<br>
        internal_error  = 4<br>
        OTHERS          = 5.<br>
    <br>
    * Set form language and country (->form locale)<br>
    *fp_docparams-fillable = 'X'. "Only set this if the form must be interactive<br>
    fp_docparams-dynamic = 'X'.  "Only set this if the form must be interactive and dynamic<br>
    <br>
    * Now call the generated function module<br>
    CALL FUNCTION fm_name<br>
      EXPORTING<br>
        /1bcdwb/docparams       = fp_docparams<br>
        /1bcdwb/docxml          = fp_docxml<br>
      IMPORTING<br>
        /1bcdwb/formoutput      = fp_formoutput<br>
      EXCEPTIONS<br>
        usage_error             = 1<br>
        system_error            = 2<br>
        internal_error          = 3<br>
        OTHERS                  = 4.<br>
    <br>
    * Close spool job<br>
    CALL FUNCTION 'FP_JOB_CLOSE'<br>
      EXCEPTIONS<br>
        usage_error    = 1<br>
        system_error   = 2<br>
        internal_error = 3<br>
        OTHERS         = 4.<br>
    <br>
    * Now you have the PDF form in xstring format inside the field fp_formoutput-pdf<br>
    <br>
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'<br>
      EXPORTING<br>
        buffer = fp_formoutput-pdf<br>
      TABLES<br>
        binary_tab = itab.<br>
    <br>
    TRY.<br>
    *  " create email objects<br>
      l_o_send_request = cl_bcs=>create_persistent( ).<br>
    <br>
    <br>
    *  " sender<br>
      l_o_sender = cl_cam_address_bcs=>create_internet_address( REPLY_ADDRESS ).<br>
      l_o_send_request->set_sender( i_sender = l_o_sender ).<br>
    <br>
    <br>
    *  " recipient TO<br>
      l_o_recipient = cl_cam_address_bcs=>create_internet_address( ADDRESS).<br>
      l_o_send_request->add_recipient(<br>
      i_recipient = l_o_recipient<br>
      ).<br>
    <br>
    *  " create documents<br>
      l_o_document = cl_document_bcs=>create_document(<br>
      i_type = 'RAW' " RAW document format<br>
      i_text = l_it_contents<br>
      i_subject = SUBJECT<br>
      ).<br>
    *  l_o_send_request->set_document( l_o_document ).<br>
    <br>
    *  " add attachment<br>
      l_o_document->add_attachment( EXPORTING i_attachment_type = 'PDF'<br>
                                              i_attachment_subject = SUBJECT<br>
                                              i_att_content_hex = itab ).<br>
      l_o_send_request->set_document( l_o_document ).<br>
    <br>
    *  " send email<br>
      l_v_ret = l_o_send_request->send( ).<br>
    <br>
    CATCH cx_bcs INTO bcs_exception.<br>
    * exceptions, do something<br>
    ENDTRY.<br>
    <br>
    * never forget this one<br>
    COMMIT WORK.
    <br>

    /1BCDWB/DOCPARAMS and /1BCDWB/DOCXML are both generated by default when I create a form from within SE80 in a Web Dynpro View. The Interface gets generated automatically when linking the form to my context on the Web Dynpro View.
    fp_docparams-... gets filled:
    fp_docparams-langu = 'E'.
    fp_docparams-country = 'ZA'.
    fp_docxml is of type xstring and is now being filled by the PDFSource binary in my context. (Although this isn't yet producing results)
    I still don't see where I can add more parameters to the Interface in Tx SFP. I am in Change Mode, but find no option to add Parameters.
    If I do manage to add more parameters, how will I link these in my Form because I can't see the Parameters when in the Layout view of the form in Tx SFP..
    Thanks again. Do you have any other suggestions?

  • Workflow email PDF attachment

    All,
    I'm using the following code in a zprogram/FM that will be called in a method to create an attachment to the workflow and then send the attachment through mail. But this is not working.
    1) I trigger the wf thru idoc posting - works fine
    2) The image is read successfully in the xstring format
    3) When the background step is called that in turn calls this FM and supplies the WID of the wf (not the task), no image gets attached. But if i supply the wid of the wf directly and execute this FM in foreground, it attaches. in the background it gives this error "unable to attach the document"
    4) in the next mailing step, I've bound the attachments container element  = mail step's container element. The mail also doesnt come with the attachments.
    Please help.
    Thanks,
    Sam
    Edited by: Rock on Jul 21, 2009 1:26 AM

    REPORT  ysam_im_test_wf.
    INCLUDE <cntn01>.
    TYPE-POOLS: swlc.
    INCLUDE <symbol>.
    DATA :
    lv_header TYPE swr_att_header,
    lv_objsofm TYPE swotobjid-objtype,
    lv_objtkey TYPE swotobjid-objkey.
    * ls_fitment TYPE r_fitment_mstr,
    DATA : lv_xstring TYPE xstring,
    att_id TYPE swr_att_id,
    lv_return TYPE sy-subrc.
    DATA : bo_sofm TYPE swc_object .
    DATA:  l_docwrapper1 TYPE xstring,
           l_existence(1) TYPE c.
    DATA: t_message_lines TYPE swr_messag OCCURS 0 WITH HEADER LINE.
    PARAMETERS: p_wid TYPE swr_struct-workitemid.
    START-OF-SELECTION .
      CALL FUNCTION 'ZGEN_IMAGE_DATA_GET'
        EXPORTING
          i_zuonr              = '100028'
        IMPORTING
          l_docwrapper1        = l_docwrapper1
          existence            = l_existence
        EXCEPTIONS
          service_call_error   = 1
          file_download_error  = 2
          browser_invoke_error = 3
          OTHERS               = 4.
      lv_xstring = l_docwrapper1.
      IF lv_xstring IS NOT INITIAL.
        UPDATE tvarv SET low = 'XSTRING'
        WHERE name = 'ZSAMTEST1'.
        lv_header-file_type = 'B'.
        lv_header-file_name = 'Invoice Attachment'.
        lv_header-file_extension = 'PDF'.
        lv_header-language = 'EN'.
        CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
          EXPORTING
            workitem_id    = p_wid
            att_header     = lv_header
            att_bin        = lv_xstring
          IMPORTING
            return_code    = lv_return
            att_id         = att_id
          TABLES
            message_lines  = t_message_lines.
        IF lv_return = 0.
          lv_objtkey = att_id-doc_id.
          lv_objsofm = 'SOFM'.
          swc_create_object bo_sofm lv_objsofm lv_objtkey.
        ENDIF. " IF lv_return = 0
      ELSE.
        att_id = 0.
        lv_objtkey = att_id-doc_id.
        swc_create_object bo_sofm lv_objsofm lv_objtkey.
      ENDIF.

  • Email print attachment should trigger by created by name...

    Dear All,
    I have one doubt related to Email print output. Presently in my project I get one request from the user that when he  create a order at that time a email should trigger so that he/she get a email notification .
    In standard Sap for this we need to maintain the condition record and according to that it should directly goes to either Sold-to-party or contact person assign in that sales order but our requirement is to send the same who create that sales order means created by name. this is for return order type.
    For your information for that output type we used sap script
    Regards,
    Moni

    OK.
    Then you should create a new output type for this mail in transaction NACE.
    And then you should add this program without any sapscript or smartform.....only this program !
    And in the NACE - "Processing routine" enter:
    Special function - ZZSEND_MAIL - ENTRY
    report ZZSEND_MAIL.
    tables: nast.
        data: l_subject type so_obj_des,
              lt_bodytext type bcsy_text,
              i_addr type adr6-smtp_addr,
              l_bodytext_row type soli.
        data: bcs_exception type ref to cx_bcs.
    FORM entry USING return_code us_screen.
    *>>>Here you must add abap for getting email address.....
    * select single ernam from vbak into tmp_ernam where vbeln = nast-objky(10).
    * i_addr  = email_address for tmp_ernam. 
    try.
    *---1) Subject and body
            l_subject = nast-objky.
            l_bodytext_row = 'bodytext'.
            append l_bodytext_row to lt_bodytext.
    *---2) Email document object
            data: document type ref to cl_document_bcs,
                  num_rows type i,
                  textlength type so_obj_len,
                  l_mailtext type soli_tab.
            describe table l_mailtext lines num_rows.
            num_rows = num_rows * 255.
            move num_rows to textlength.
            document = cl_document_bcs=>create_document(
                        i_type = 'RAW'
                        i_text = l_mailtext
                        i_length = textlength
                        i_subject = l_subject ).
    *---3) Create persistent send request
            data: send_request type ref to cl_bcs.
            send_request = cl_bcs=>create_persistent( ).
    *---4) Add document to send request
            send_request->set_document( document ).
    *---5) Get sender object
            data: sender type ref to cl_sapuser_bcs.
            sender = cl_sapuser_bcs=>create( sy-uname ).
    *---6) Add sender
            call method send_request->set_sender
              exporting
                i_sender = sender.
    *---7) Create recipient
            data: recipient type ref to if_recipient_bcs.
            recipient = cl_cam_address_bcs=>create_internet_address(
                                                           i_addr ).
    *---8) Add recipient with its respective attributes to send request
            send_request->add_recipient( exporting i_recipient = recipient ).
    *---9) Set send immediately
            send_request->set_send_immediately( 'X' ).
    *---10) Send document
            send_request->send( ).
            commit work.
          catch cx_bcs into bcs_exception.
            data: ex_msg type string.
            ex_msg = bcs_exception->get_text( ).
            write: 'Caught exception.', ex_msg.
        endtry.
    ENDFORM.

  • How do I change my default settings when opening an email PDF attachment?  I want it to "open" not "save as".  I did the Adobe chat but the steps he gave me for my Adobe Reader XI didn't match up with the options on my screen.

    It used to "open" but somehow must have flipped over to "save as"

    Hi Susan,
    Welcome to forums.
    As you mentioned that you received an email from Adobe. That is a auto generated email by the systems, so you don't need to worry about it, If you download the product today, according to system it starts from today however pratically, trial starts after you installed and first launch it. So please ignore that email
    You can install the FM in your desktop and laptop and activate it on both the machines however cannot use it at the same time as per User License Agreement. As Harpeet mentioned the email for support team, you can post your question on forums or to that email.
    Hope this answers your query.
    Thanks
    Priyank

Maybe you are looking for