08-11-2014 12:19 PM
Hi Friends,
I am in bizarre situation. Please help me in solving this.
I had created a program to send mail using the class CL_BCS. When a mail is send, an excel attachment had to be added to that mail. This I had accomplished using string_to_solix method of the class CL_BCS_CONVERT(as explained in the example BCS_EXAMPLE_7).
This works fine for me when I am executing the program directly using a T.Code or it is executed from SE38(I am getting mail with attachment in both SAP Inbox as well as in my external mail ID). But my requirement is to schedule this as a periodic background job(say on every Monday at 9:00 am). When I create a job using SM36 for this program, I am getting a mail in both my SAP Inbox as well as in my external mail ID. But the problem is the excel attachment is missing.
I don't know what should I do. Is there anything additional to be done for the background scheduling(for attachment)? Please help me to find a solution for this.
Regards,
Abijith
08-12-2014 7:07 AM
Hi All,
Thanks for all your responses. The problem got solved. I haven't done any changes. The mail is not going from DEV only. May be some config issues. But it is working fine from other clients.
Regards,
Abijith
08-11-2014 12:36 PM
Hi,
Try submiting BCS_EXAMPLE_7 via background scheduling .
Is it working ? if yes find the difference .
Note that there is no GUI in BCS_EXAMPLE_7 .
Regards.
08-11-2014 1:00 PM
Good suggestion by Eitan, try this with the demo program. I think it is likely not string_to_solix that is causing the excel attachment not working, rather you are using another function before this, for example, SAP_CONVERT_TO_XLS_FORMAT, which is causing the file not to be created background in the first place let alone be emailed.
08-11-2014 1:23 PM
Hi Eitan,
I had tried this. BCS_EXAMPLE_7 will not send mail to the external ID, if you are scheduled via SM36. This is because, there is no sender. So what I had done was, I copied the same program and added the sender with SY-UNAME. Here also, the mail had gone but without attachment.
Regards,
Abijith
08-11-2014 2:18 PM
I'm able to get mail with excel attached from background job using demo program BCS_EXAMPLE_7.
Then you need to check mail configuration i think so
08-12-2014 7:07 AM
Hi All,
Thanks for all your responses. The problem got solved. I haven't done any changes. The mail is not going from DEV only. May be some config issues. But it is working fine from other clients.
Regards,
Abijith
08-12-2014 7:10 AM
08-12-2014 8:28 AM
Hi,
Please close this thread .
Mark your answer as correct since it was internal config problems.
I do not want people think that there is a problem with cl_bcs .
Regards.