‎2008 Oct 13 7:01 AM
Hi,
I need to send an e-mail to multiple addresses.
Can the Function module SO_NEW_DOCUMENT_SEND_API1
be used to send email to MULTIPLE e-mail addresses ?
‎2008 Oct 13 7:05 AM
Hi,
Yes you can..You can add any no. of email ids to the table parameter 'RECEIVERS' of the function module. You can create a distribution list and then add the ids to that dist. list.. use so23 to create the dist. list..
eg..
Receiver details
The distribution list has the email ids.
wa_reclist-receiver = p_dist.
Receiver type is 'internet mail'.
wa_reclist-rec_type = 'C'.
Express mail activated
wa_reclist-express = 'X'.
APPEND wa_reclist TO it_reclist.
CLEAR wa_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docdata
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = it_objpack
OBJECT_HEADER =
CONTENTS_BIN =
contents_txt = it_objtxt
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = it_reclist
‎2008 Oct 13 7:04 AM
‎2008 Oct 13 7:05 AM
Hi,
Yes you can..You can add any no. of email ids to the table parameter 'RECEIVERS' of the function module. You can create a distribution list and then add the ids to that dist. list.. use so23 to create the dist. list..
eg..
Receiver details
The distribution list has the email ids.
wa_reclist-receiver = p_dist.
Receiver type is 'internet mail'.
wa_reclist-rec_type = 'C'.
Express mail activated
wa_reclist-express = 'X'.
APPEND wa_reclist TO it_reclist.
CLEAR wa_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_docdata
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = it_objpack
OBJECT_HEADER =
CONTENTS_BIN =
contents_txt = it_objtxt
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = it_reclist
‎2008 Oct 13 7:07 AM
Hi,
Yes you can send to multiple Recepients. Make use of the Parameter 'RECEIVERS'.
‎2008 Oct 13 7:09 AM
hi ,
yes u can do it just loop through the address table and pass the values to RECEIVERS in the Tables of the function module .
w_receivers-receiver = ld_email.
w_receivers-rec_type = 'U'.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO t_receivers.
HOPE IT HELPS,
Regards,
Vikram.S