‎2010 Aug 16 5:02 AM
Hello Experts,
My requirement is to send email to multiple email id from my abap program.every thing is working fine for me, i'm using the function module 'SO_NEW_DOCUMENT_ATT_SEND_API1' but the only problem i'm facing is i'm not able to send mail to multiple id's. I can only do it for single email id.
I'm populating the it_receivers internal table as below:-
clear it_receivers.
refresh it_receivers.
it_receivers-receiver = 'EMAILID'.
it_receivers-rec_type = 'U'.
it_receivers-com_type = 'INT'.
it_receivers-express = ' '.
it_receivers-notif_ndel = 'X'.
append it_receivers.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
exporting
document_data = gd_doc_data
put_in_outbox = 'X'
commit_work = 'X'
importing
sent_to_all = gd_sent_all
tables
packing_list = it_packing_list
contents_txt = it_message
receivers = it_receivers
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
Please let me know how can I pass multiple email id's here.
Thanks,
Naveen
‎2010 Aug 16 5:29 AM
Hello,
You can send to multiple email ids. Set the parameter,
SENT_TO_ALL = 'X'
This should help you to send to multiple users.
Regards,
Anila
‎2010 Aug 16 5:29 AM
Hello,
You can send to multiple email ids. Set the parameter,
SENT_TO_ALL = 'X'
This should help you to send to multiple users.
Regards,
Anila
‎2010 Aug 16 6:04 AM
Hi Anila,
How do i define this parameter, i'm getting the error as below.
Function module "SO_NEW_DOCUMENT_ATT_SEND_API1" was called
with the parameter "SENT_TO_ALL".
This parameter is not defined.
Thanks a lot,
Naveen
‎2010 Aug 16 6:06 AM
Hi,
If you want to send to multiple Email id's., You need to append all those Email id in the RECEIVERS table.
clear it_receivers.
it_receivers-receiver = 'EMAILID'.
it_receivers-rec_type = 'U'.
append it_receivers.
clear it_receivers.
it_receivers-receiver = 'EMAILID1'.
it_receivers-rec_type = 'U'.
append it_receivers.
clear it_receivers.
it_receivers-receiver = 'EMAILID2'.
it_receivers-rec_type = 'U'.
append it_receivers.
Thanks
Arul