Application Development 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: 

Send Mail to External Mail ID's for Multiple Users

Former Member
0 Kudos

Hi All,

I want to send mail from SAP to External mail ID's for multiple Users.The program is ok.

But I want to send this to Multiple external Mail id's. Where should I assign this receivers list. Pls advise.

What is the transaction to assign multiple receivers.?

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

DOCUMENT_DATA = GD_DOC_DATA

PUT_IN_OUTBOX = 'X'

COMMIT_WORK = ''

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.

Thank You.

Pranitha.

4 REPLIES 4

Former Member
0 Kudos

Hi

since you have as part of the parameters "IT_RECEIVERS" you can append multiple recipients using that. If you have a distribution list I think you need to use the function module SO_DLI_LIST_READ_XDL first.

Former Member
0 Kudos

Hi,

Populate 'IT_RECEIVERS' with the multiple mail ID's ..

loop at mail_list.

IT_RECEIVERS-RECEIVER = mail_list-mailid. " mail ID

IT_RECEIVERS-REC_TYPE = 'U'.

append IT_RECEIVERS.

endloop.

Regards,

Srini.

Former Member
0 Kudos

IT_RECEIVERS parameters needs to be passed as shown below.

wa_receivers-receiver = "..........External mail id".

wa_receivers-rec_type = 'U'.

wa_receivers-express = 'X'.

APPEND wa_receivers TO lt_receivers.

CLEAR wa_receivers.

Once mail is triggered to the external mail id's, check the mail is transferred from SAP or not using the tcode SCOT.

In SCOT,follow the path UTILITIES-> Overview of send orders.

Regards,

Satish Kanteti

Former Member
0 Kudos

Hi,

Assign receiving type as 'U' instead of 'B'. It will work definitely.

Ram.