Skip to Content
avatar image
Former Member

sending email of invoice to more than one receipient

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 15, 2008 at 07:37 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 15, 2008 at 07:46 AM

    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

    Add comment
    10|10000 characters needed characters exceeded