‎2007 Sep 22 6:01 AM
Hi,
I am trying to send mail through FM SO_NEW_DOCUMENT_ATT_SEND_API1. But I don't want to send the attachements.
But the mail body text is also attached with the mail. Anybody will suggest me what I need to do for this??
‎2007 Sep 22 6:35 AM
data: maildata type sodocchgi1.
data: mailtxt type table of solisti1 with header line.
data: mailrec type table of somlrec90 with header line.
start-of-selection.
clear: maildata, mailtxt, mailrec.
refresh: mailtxt, mailrec.
maildata-obj_name = 'SAPRPT'.
maildata-obj_descr = 'Test'.
maildata-obj_langu = sy-langu.
maildata-sensitivty = 'F'.
mailtxt-line = 'This is a test for mail sending'.
append mailtxt.
mailrec-receiver = 'abc@xyz.com'.
mailrec-com_type = 'INT'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
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 eq 0.
commit work.
endif.
*
*
wait up to 2 seconds.
if gd_error eq 0.
submit rsconn01 with mode = 'INT'
with output = 'X'
and return.
endif.
regards
shiba dutta