Skip to Content
author's profile photo Former Member
Former Member

Add attachment in mail

We have a workflow which triggers on PO creation/change , and sends a mail to the PR creator for which the PO has been created .

We have a new requirement to add an attachment which contains the PO created in PDF form , in the mail sent to the PR.

Can someone let me know how can the attachment be added in the mail .

also , if there is any alternate or standard SAP method to do this .

Thanks

Sheetal

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Nov 23, 2007 at 10:30 AM

    Hi Sheetal,

    When you have the PO in PDF format in the workflow container you can add it as an attachment in the binding. Creating a PDF from the PO will be the hard part I think.

    Regards,

    Martin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 25, 2007 at 02:54 PM

    Hi,

    You can use the Business Object "SOFM" or "MESSAGE" to send the mail and Attach Object.

    Regards,

    Surjith

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 09:39 AM

    You can check this FM

    SO_NEW_DOCUMENT_ATT_SEND_API1

    You can suffice your need using this FM. You will get more information on this FM in the ABAP Forum.

    Thanks

    Arghadip

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 26, 2007 at 06:25 AM

    To build the pdf attachment, you need to copy and modify the routine that prints the PO:

    For

    <b>1. SAPSCRIPT</b>

    Pass the TDGETOTF set to X, it is on OPTIONS structure that refers to ITCPO of FM OPEN_FORM, the OTF data is returned in CLOSE_FORM FM

    <b>2. SMARTFORM</b>

    The smartform's generated FM needs to be called with GETOTF set to X again, it is on the CONTROL_PARAMETERS, the OTF data is received into JOB_OUTPUT_INFO-OTF data.

    Once the above is done you need to convert this OTF to PDF, search the ABAP forums for this otherwise I will have to dig through and revert to you.

    Good Luck

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.