‎2008 Jun 25 12:59 PM
Hi all,
I have to send the same message to five different mail ID's using the Function module MESSAGE_SEND_AS_MAIL
How to pass this five mail ID's in the Parameter Reciever of the Function module
Regards
Ajay
‎2008 Jun 25 1:25 PM
see if this helps
&----
REPORT Z_MESSAGE.
data receiv type standard table of SOMLRECI1 initial size 0.
data wa type SOMLRECI1.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
do so more more three
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = 'Z_ZZZ_CA_MESSAGES'
msgno = '000'
MSGV1 = 'material'
MSGV2 = 'MAT'
MSGV3 = 'MM'
MSGV4 = 'MMM'
tables
receivers = receiv[]
.
COMMIT WORK AND WAIT.
then u can go to SOST transaction and see that the mail has been or is yet to be sent. It worked for me. The message comes in an PDF form to the mail box.
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:28 PM
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:30 PM
‎2008 Jun 25 1:02 PM
hi,
create an internal table with structure SOMLRECI1.
fill your internal table and use it as parameter for the FM
call function MESSAGE_SEND_AS_MAIL
importing
msgid = sy-msgid
msgno = sy-msgno
msgv1 = sy-msgv1
tables
receivers = itab.
regards,
Peter
‎2008 Jun 25 1:04 PM
Hi,
Recievers is a tables parameter you can have as many recievers as u want try like this..
data it_recievers like table of SOMLRECI1 with header line.
it_recievers-RECEIVER = 'Name of the reciever'
it_recievers-REC_TYPE = 'o'. for sap mail(U for internet address)
it_recievers-REC_ID = 'email'
append it_recievers.
and pass this to the fm.
Regards,
Himanshu Verma
‎2008 Jun 25 1:10 PM
Fill the RECEIVER and REC_TYPE fields and append it to a internal table table type SOMLRECI1. RECEIVER contains the mail address and REC_TYPE contains the Adress type.Refer the domain so_ESCAPE for types. Pass the internal table to the Function module.
Regards,
Kiran Bobbal
‎2008 Jun 25 1:25 PM
see if this helps
&----
REPORT Z_MESSAGE.
data receiv type standard table of SOMLRECI1 initial size 0.
data wa type SOMLRECI1.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
wa-receiver = 'email address in caps'.
wa-REC_TYPE = 'U'.
append wa to receiv.
do so more more three
CALL FUNCTION 'MESSAGE_SEND_AS_MAIL'
EXPORTING
msgid = 'Z_ZZZ_CA_MESSAGES'
msgno = '000'
MSGV1 = 'material'
MSGV2 = 'MAT'
MSGV3 = 'MM'
MSGV4 = 'MMM'
tables
receivers = receiv[]
.
COMMIT WORK AND WAIT.
then u can go to SOST transaction and see that the mail has been or is yet to be sent. It worked for me. The message comes in an PDF form to the mail box.
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:28 PM
Edited by: Biswadeep Ghosh on Jun 25, 2008 2:30 PM