‎2007 Jan 20 11:52 AM
Hi all,
I am using SO_NEW_DOCUMENT_ATT_SEND_API1 this FM for sending mails but I am having small problem... When i am running a RFC which is having this FM first time it is sending mail without any attachment..... But when i am executing second time the same RFC i am getting an attachment ....
Can any one tell me what is the problem.
Murthy
‎2007 Jan 20 12:15 PM
Hi Murthy,
Check out are you passing all below mentioned parameters or not. If yes put a break-point before this function module & check weather data is populated in all the structures & tables or not. If not there may be some problem with filling the structures.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_pcklist
contents_txt = it_mess
contents_hex = it_table
receivers = it_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.
Ashven
‎2007 Jan 20 12:21 PM
Hi Ashven,
Thanx.
It is the same way which i have given all the inputs to the FM but Still i am getting an attachment ...... For the first time i am not getting the attachment if i am running the RFC for the second time Then it is display an attchment.....
Murthy
RECLIST-RECEIVER = INITIAL.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
RECLIST-RECEIVER = AUTHORITY1.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
cALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
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.
if sy-subrc = 0.
submit rsconn01 with mode = 'INT' and return.
endif.
Message was edited by:
Ramana Murthy