Application Development 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: 

Emailing the report to external email - Background job

Former Member
0 Kudos

HI

We are creating background job for running the report in background...but i want the output(report) to send an email in Excel format after the job run successfully...

Here the email is External email not SAP inbox..

Do you have any idea how to achieve this? any user-exit or even handling will help this?

Please let me know

Thanks

Govi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I was also having the similar requirement to send the output of the report in Excel format from SAP standard report, But as I was not sure how to send directly SAP report to external Mail Id, I have copied the SAP standard report as Zreport and then inserted the necessary coding, and then it went well,

What I feel is that our requirement is got fullfilled, so you may think for copying SAP report to Zreport and do the necessary modification so that user can get the report on their external Mail ID

May this help you.

Rani

18 REPLIES 18

Former Member
0 Kudos

Hi,

You can easily send email to any mail id , for this configuration needs to be done through SCOT transaction.

The FM use to send mail with attachment is SO_DOCUMENT_SEND_API1. Search the SDN you will find many post on how to use this FM.

Regards

Anurag

0 Kudos

Iam not using custom program to send the email...I know about the FM SO_DOCUMENT_SEND_API1...to send email.

My requirement is to send email to user the report in Excel after the background job runs.

we will define the job in SM36 with variant for the report with program name and variant.

after the job runs the spool request will be created and we can also setup the output of the report to be sent to SAP inbox.

my question is to how to send the output of this report in Excel format to external email i.e. Gmail, yahoo etc...

I hope u r clear now...

Please let me know if you know the answer.

Thanks

0 Kudos

Could you please let me know if you know the solution???

0 Kudos

Is the report you are running a custom report? If so, take a look at program BCS_EXAMPLE_7 and use it accordingly.

If it is a standard report that you are executing in the background, you can in most cases print off the output from the spool.

0 Kudos

Iam using the Standard SAP report...

Does it mean its not possible to send email?

Thanks

Govi

Former Member
0 Kudos

Hi,

I was also having the similar requirement to send the output of the report in Excel format from SAP standard report, But as I was not sure how to send directly SAP report to external Mail Id, I have copied the SAP standard report as Zreport and then inserted the necessary coding, and then it went well,

What I feel is that our requirement is got fullfilled, so you may think for copying SAP report to Zreport and do the necessary modification so that user can get the report on their external Mail ID

May this help you.

Rani

0 Kudos

Thanks for your reply rani

Copying standard SAP report to Zreport is an obvious choice..but we don't want to do that..

All i want to know is there any way we can do this or not..

I will wait for some more answers...if it not possible then i close this question..

Thanks

0 Kudos

you better contact this person

Best of luck

Sas

0 Kudos

Interesting...

In SM36, under the 'General Data' area, the answer is right there. Click on the Spool list recepient button and place the e-mail recepient in the box. It looks like only one entry can be entered there so you may want to have a distribution group setup accordingly for multiple recepients.

Works well for me.

0 Kudos

Thanks for your reply

We are almost there....i checked it ...its sending for only one email address....but thats ok...

The only problem is the attachemnt in the email we are getting it as HTML (filename.htm)

So is there any way we can get this as Excel or CSV attachment?

Thanks

0 Kudos

.....Are link mines and points his Bad

SAS

Former Member
0 Kudos

solved

0 Kudos

Hi Govi,

I am glad that you solved your problem.

Could you please explain me how you could send excel file to the external email id?

I too had similar requirement of running ALV report in background and sending an excel file to email.

Thanks & Regards,

RV

0 Kudos

Hi Govi,

How did you solved your problem?

Thanks!

Former Member
0 Kudos

Hi Govi,

I am having the similar requirement of sending email to user the output of a standard report in Excel after the background job runs.Could you please share with me how you could solve your issue.

Thanks in advance.

Tiki

0 Kudos

Hi, I have a similar request but I would like to send an HTML mail of a certain template. The template I would like to store at SAP ERP . While running a mail sending program nice and shiny mails should be send. In the mail template we would have some variables which need to be replaced by certain values.

Something like this existing?

Or always a Z-program?

I know reports RKSCMAMAIL* but I look for something much nicer.

Regards

Thomas

Former Member
0 Kudos

Hi,

Can you please tell us the solution for the above requirement.

0 Kudos

what was your request? Thomas