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: 

How to create distribution list in order to send mail to a group of people.

Former Member
0 Kudos

Hi all,

I have been given the following requirement.Please suggest me how to handle as i am new to abap.

1. In the selection screen create New Field of distribution list so that

new support team Email IDs can be added in the variant

2.Program should send Job cancellation notice to outlook Inbox instead

of SAP Inbox .

Thanks and Regards.

syed

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Syed,

Please use this while looping on the selection field internal table.

int_reclist-receiver = 'ABCD@abcd.com'.

int_reclist-rec_type = 'U'.

int_reclist-copy = 'X'.

append int_reclist.

clear int_reclist.

in the Rec_type U refers to external email address.

and then call the function module.

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'

exporting

document_data = wf_doc_chng

put_in_outbox = 'X'

commit_work = 'X'

tables

packing_list = int_objpack

object_header = int_objhead

contents_bin = int_contents_bin

contents_txt = int_contents_txt

receivers = int_reclist

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.

Reward points if it helps.

Thanks,

Amit

3 REPLIES 3

Former Member
0 Kudos

Syed,

Please use this while looping on the selection field internal table.

int_reclist-receiver = 'ABCD@abcd.com'.

int_reclist-rec_type = 'U'.

int_reclist-copy = 'X'.

append int_reclist.

clear int_reclist.

in the Rec_type U refers to external email address.

and then call the function module.

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'

exporting

document_data = wf_doc_chng

put_in_outbox = 'X'

commit_work = 'X'

tables

packing_list = int_objpack

object_header = int_objhead

contents_bin = int_contents_bin

contents_txt = int_contents_txt

receivers = int_reclist

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.

Reward points if it helps.

Thanks,

Amit

Former Member
0 Kudos

Hi there is nothing to worry about.

Just create a field for e-mail addrees and name it as Distribution list. The intention was to not to change the e-mail address frequently when there are any changes in the people. If we use Distribution list then the people will be added and removed. But we need not change the program.

You need not create distribution list. that will be created and you have to use the mail-id.

Also as you are using email-id (internet mail like .com) that will go to the outlook inbox. Only SAP related things will sit in SAP inbox.

Former Member
0 Kudos

HI ,

On selection screen add the element with

select-option : s_receiver type SOOS1-RECNAM.

Use FM 'SO_OBJECT_SEND' to send mail to external system

do where used - try to find out where this Fm is used and see how it is called

u will get an idea to send the mail to external system.

Regards,

Mihir nagar.