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

Send an e-mail with attachment

Former Member
0 Likes
970

Hello Experts

I have created one ALV report.

Now, my requirement is that

1. While selecting one checkbox (Send e-mail), I want to send e-mail while running this report in background.

2. Report should be Excel or text as an attachment of e-mail

Can we do that?

Points will be awarder immediately.

Regards

n.master

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
919

hi,

the following threads will help you

/thread/98781 [original link is broken]

regards,

pavan

Hello Experts

I have created one ALV report.

Now, my requirement is that

1. While selecting one checkbox (Send e-mail), I want to send e-mail while running this report in background.

2. Report should be Excel or text as an attachment of e-mail

Can we do that?

Points will be awarder immediately.

Regards

n.master

7 REPLIES 7
Read only

Former Member
0 Likes
920

hi,

the following threads will help you

/thread/98781 [original link is broken]

regards,

pavan

Read only

Former Member
0 Likes
919

Hi,

you can do so using the function module

'SO_NEW_DOCUMENT_SEND_API1'

Regards,

siva chalasani.

Read only

Former Member
0 Likes
919

Hi,

1.First download ur result into a file in required format specify the file type.

2.Then use FM 'Z_SAP_MAIL_TO_SMTP_ATTACHEMENT'

to send the OP of Report as an attachment of e-mail,

Specify The DLI name(Distribution List).

i_filewithpath = Downloaded file name.

Thanks,

Kishore

Read only

Former Member
0 Likes
919

Create spool in background using Print On and print Off statements.

In same program

Use FM

CONVERT_ABAPSPOOLJOB_2_PDF

to convert spool to PDF file or use FM RSPO_SPOOLDATA_TO_TEXT to convert spool to text file.

For sending an email, it will depend on your system how it has been configured to send outbound emails.

example : Few systems has UNIX script running at regular time interval which will check all files in specific format on Application server and send it externally. This requires you to write files on application server in specific format. (Need to make entry in table T9AOEMAIL)

Read only

0 Likes
919

I have solved this question.

Read only

Former Member
0 Likes
919

Hi dear,

In u r report program call "ZSND_AGN_EMAIL"

this function module directly. It will take careof

sending the email.

If it is appropriate reward me the points.

Regards

Ashok.

Read only

Former Member
0 Likes
919

Thanks