on 12-17-2008 8:44 AM
Hi Experts,
We are sending smartform pdf via email using these FM's to single email id.
'ADDR_GET_NEXT_COMM_TYPE'
'CONVERT_COMM_TYPE_DATA'
Now I want to send same pdf to multiple recepients, Can we achieve this using above FM's ? Please let me know if possible.
Regards,
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DATA: reclist type table of somlreci1 WITH HEADER LINE.
reclist-rec_type = 'B'. "if the user is sap user
reclist-receiver = <PASS Email address1 >.
APPEND reclist..
reclist-rec_type = 'A'. " For external address
reclist-receiver = <PASS Email address 2>.
APPEND reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = sent_to_all
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/smartformtoMailasPDF+attachment
use below f.m
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_RECLIST -
>here u can pass multiple 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.
IF SY-SUBRC <> 0.
WRITE:/ 'Error When Sending the File', SY-SUBRC.
ELSE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.