on 01-30-2011 12:55 PM
Hi Gurus,
I have requirement for sending mail for customer's multiple mail id's through VF03 transaction.
i have created ZRLB_INVOICE for this and internally smartform is called.
PERFORM set_print_param USING ls_addr_key ls_dlv-land
CHANGING ls_control_param
ls_composer_param
ls_recipient
ls_sender
cf_retcode.
As per my understanding, ls_recipient always get one mail ID, which is internally passed to smartform.
However, i want to know where exactly i can debug to find the mail code .
The sample code will be highly appreciated...as i have seen multiple thread's but can't find the solution to implement.
Mail to :
Hi All,
I hv called the BCS mailing option for triggering mail to acheive solution.
However i have called smartform and converted to PDF and then send the mail using BCS.
Guys it may help you,although you would have ur own ways.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have a Z-program, why don't you handle the email process yourself with class CL_BCS? It's far more flexible than the old macros that smartforms uses and you'll be able to use more than one email ID. You can find the smartform email code by following the parameters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brad,
I agree with your comments for BCS class.
However i would like to change the existing YRLB_INVOICE which also calls smartform where ls_reciptents fields gets always one mail id...
Do you have any suggestion how i can i change the existing logic for achive my requirement for sending muliple mails?
Any sample code is welcome.
Thanks!
Hi,
I had a similar scenario to implement.
What I did is instead of populating the ls_receipient as mentioned in ur post above, I have added another logic and mentioned below:
I have declared an internal table -
DATA: BEGIN OF g_t_emailid OCCURS 0,
smtp_addr LIKE adr6-smtp_addr,
END OF g_t_emailid.
I have fetcehd the multiple emailids thats need to eb emailed into this internal table. Then before calling FM - SO_DOCUMENT_SEND_API1 , i have populated the t_receriver table passed to the FM.
LOOP AT g_t_emailid.
t_receivers-receiver = g_t_emailid-smtp_addr.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
ENDLOOP.
*FM to send the email
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.
Hope this helps.
Cheers,
Varna
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.