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

Problem with sending e-mail

Former Member
0 Likes
1,228

I have a custom program which can send account statements to the user by fax or e-mail as specified on the selection screen. I am facing a problem while sending e-mail.

When I call the End_form FM, if the ITCPP-TDIMMED (Print immediately) parameter is 'X', then it sends e-mails to all the customer properly, but it will give pop-ups to save the account statement as PDF on your pc for as many times as there are customers.

If I pass the ITCPP-TDIMMED as blank, then it won't give pop-ups but it will not send e-mail to all customers. This is because, inside the End_form FM -> FM RSPO_SR_OPEN, system function C_START_SPOOL_JOB is called. If the print_immediately parameter for this function is 'X' then it generates new spool number every time and so it sends mail to all the customers. If print_immediately is blank, then it will generate only one spool ID and so it will send e-mail to only one customer.

Functionality for fax is different. Spool is not generated for fax, so it sends fax correctly and does not give pop ups for saving the account statements.

My problem is, I want to avoid the pop ups for saving and send the e-mail to all cutomers properly.

Has anyone faced the same problem? Is there any work wround this situation?

6 REPLIES 6
Read only

vyende
Active Participant
0 Likes
998

Field ITCPP-TDNEWID determines if a spool is to be created or not. Make sure you pass the value you need (X for newspool BLANK prepends to the current open spool). More specifically you want to pass that value to parameter APPEND of FM RSPO_SR_OPEN. In this case 'X' = append to current open spool and BLANK = new spool.

As for the pop ups there MUST be message statement (or call screen) somewhere in your end_form. What exactly is the pop up message?

Read only

Former Member
0 Likes
998

Thanks for replying. But I cannot keep the value of ITCPP-TDIMMED as blank because it will then generate only one spool and will send mail to only one customer.

Basically the program e-mails or faxes the account statements in PDF format. So I have installed PDF creater and set it as my default printer.. The pop up it gives is for saving the generated PDF account statement on your pc.

Read only

Former Member
0 Likes
998

Hi,

Instead of using single mail id, if you use the group mail (which will be created by basis with all required mail ids) then i hope problem will be resolved.

Read only

vyende
Active Participant
0 Likes
998

"Instead of using single mail id, if you use the group mail (which will be created by basis with all required mail ids) then i hope problem will be resolved."

You cannot do this because the each mail recipient will receive all attachments

Read only

Former Member
0 Likes
998

The mail IDs are not fixed. It depends on the customers entered on the selection screen.

Read only

Former Member
0 Likes
998

/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher