cancel
Showing results for 
Search instead for 
Did you mean: 

sending email of invoice to more than one receipient

Former Member
0 Kudos

Hi All,

I have to send the email of the invoice to all the id's that are mentioned in the customer. As of now i am able to send the invoice (in pdf format) to only one person that is maintained in the customer master, but i have to send the invoice to all the persons whose email id is mentioned in the customer master.

Pls let me know how to meet this requirement.

Thanks,

Govind

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi dear

u can do 1 thing just make an internal table with three fields

cutomer number type kunnr

adress number type adrnr

email address adr6-smtp_adrr

write an select query for it with conditions where email address is not null

after that loop on this internal table

if possible also look to table adr6 it will be helpfull

Reward if Helpfull

thanks

Snehi Chouhan

Former Member
0 Kudos

Hi,

You can append multiple receivers to Receivers itab.

  • Add the recipients email address

CLEAR t_receivers.

REFRESH t_receivers.

t_receivers-receiver = Emailid1

t_receivers-rec_type = 'U'.

t_receivers-com_type = 'INT'.

t_receivers-notif_del = 'X'.

t_receivers-notif_ndel = 'X'.

APPEND t_receivers.

t_receivers-receiver = emailid2

t_receivers-rec_type = 'U'.

t_receivers-com_type = 'INT'.

t_receivers-notif_del = 'X'.

t_receivers-notif_ndel = 'X'.

APPEND t_receivers.

t_receivers-receiver = emailid3

t_receivers-rec_type = 'U'.

t_receivers-com_type = 'INT'.

t_receivers-notif_del = 'X'.

t_receivers-notif_ndel = 'X'.

APPEND t_receivers.

CALL FUNCTION 'SO_DOCUMENT_SEND_API1'

EXPORTING

document_data = w_doc_data

put_in_outbox = 'X'

sender_address = ld_sender_address

sender_address_type = ld_sender_address_type

commit_work = 'X'

IMPORTING

sent_to_all = w_sent_all

TABLES

packing_list = t_packing_list

contents_bin = t_attachment

contents_txt = it_message

receivers = t_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.

Regards,

Raj.