Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Email attachment functionality

Former Member
0 Likes
997

Hello Experts,

Existing Functionality: When output type ZD00 is issued then custom smart form is called and a PDF invoice is generated in runtime and sent as an attachment via email to customers.

  1. Requirement: Go to VF02àServices for objectàCreate AttachmentàSelect Any PDF document from desktop and attach it.

Now when output type ZD00 is issued then existing functionality will automatically attach the invoice PDF but here before sending mail with invoice PDF as attachment we have to send above mentioned manual attachment along with invoice PDF. Means now our email should contain two below attachments before being sent:

1)      Automatically Triggered invoice PDF based on smart form and 2)  Manually attached PDF from desktop (For our case:  PDF document present in business shared area ).

Challenges:

1)      How to send this manually attached document in VF02 via email to customer so that email contains both invoice PDF and manually attached PDF.

If anyone came across such scenario then please share your expertise of feasibility in this requirement.

1 ACCEPTED SOLUTION
Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
817

Hi Sunil,

First You need to Check whether you can enhance your Driver program for the Output Type ZD00.

If Yes, Then Write the Logic of Fetching the Invoice PDF from your Desktop Folder. Example is shown in the below mentioned link.

http://wiki.sdn.sap.com/wiki/display/ABAP/Send+Emails+with+Attachments+of+any+Format

Pre-requisite is you need to keep the PDFs in a Single Folder. If not you need to write the code dynamically from the above example.

Now when you issue the Output in the VF02 transaction, then the existing Driver program for Invoice gots created and simultaneously your logic for Fetching the PDF file from Desktop gots Created.

Hope this helps.

1 REPLY 1
Read only

Venkat_Sesha
Product and Topic Expert
Product and Topic Expert
0 Likes
818

Hi Sunil,

First You need to Check whether you can enhance your Driver program for the Output Type ZD00.

If Yes, Then Write the Logic of Fetching the Invoice PDF from your Desktop Folder. Example is shown in the below mentioned link.

http://wiki.sdn.sap.com/wiki/display/ABAP/Send+Emails+with+Attachments+of+any+Format

Pre-requisite is you need to keep the PDFs in a Single Folder. If not you need to write the code dynamically from the above example.

Now when you issue the Output in the VF02 transaction, then the existing Driver program for Invoice gots created and simultaneously your logic for Fetching the PDF file from Desktop gots Created.

Hope this helps.