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

Attach a word document and send mail

Former Member
0 Likes
862

Dear All,

I have a requirement in which based on a path, i need to attach the word document,that should be sent to a specified mail recipient.

I tried bsc_example_5. But that attached only winword file..and that cant be opened through MS-Word.

Pl. suggest.

Regards,

Vidhya

Dear All,

I have a requirement in which based on a path, i need to attach the word document,that should be sent to a specified mail recipient.

I tried bsc_example_5. But that attached only winword file..and that cant be opened through MS-Word.

Pl. suggest.

Regards,

Vidhya

3 REPLIES 3
Read only

former_member189059
Active Contributor
0 Likes
785

Hello,

Use the function module SO_DOCUMENT_SEND_API1

Don't forget to populate the 'packing_list' and 'contents_bin' tables.

Read the file in binary mode to populate contents_bin

Read only

Former Member
0 Likes
785

Hi Vidhya,

You can use the cl_bcs class methods to send email with attachments. to send a .XLS or .DOC type files as attachment you need to have your data in BINARY format.

Refer to my article below which has the code snippet of the same -

http://www.divulgesap.com/blog.php?p=ODI=

Hope it helps.

Regards,

Ravikiran

Read only

0 Likes
785

Thanks.

solved