10-01-2008 7:22 AM
Hi All,
When iam using the function module SO_NEW_DOCUMENT_SEND_API1 it is giving the sy-subrc as 2 .iam using this code
*Collect the Email,Message type Message body present in the internal table to send an email
WA_MAILDATA-obj_descr = IS_BACKMON-Message_Subject.
*Collect the mailid and reciver type to send an email
WA_RECEIVER-receiver = 'Emailid'.
WA_RECEIVER-rec_type = 'U'.
WA_RECEIVER-com_type = 'INT'.
APPEND WA_RECEIVER to i_RECEIVER.
*Display the context of the message
is_contents_txt = 'Test'.
APPEND is_contents_txt to i_contents_txt.
clear i_contents_txt.
*Send an Email to a Particular person
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = WA_MAILDATA
document_type = 'HTM'
put_in_outbox = 'X'
commit_work = 'X'
tables
OBJECT_CONTENT = i_contents_txt
receivers = i_RECEIVER
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.
Please help me if you hav answer
10-01-2008 7:27 AM
WA_RECEIVER-receiver = l_email.
Here the variable l_email should contain the full email id.
10-01-2008 7:28 AM
10-01-2008 7:42 AM
change the document type to RAW
Regards
Anbu B
Edited by: Anbu B on Oct 1, 2008 8:45 AM
10-01-2008 7:46 AM
10-01-2008 7:52 AM
Hi,
Is it creating an outgooing email entry in my SAP outbox?
Regards,
Surinder
10-01-2008 7:54 AM
yes when iam using the same code in another cleint it is working fine but when iam using in my client it is not working and giving the sy-subrc as 2 . May be some settings need to be done in "SCOT' tcode
10-18-2012 6:51 AM
*Display the context of the message
is_contents_txt = 'Test'.
APPEND is_contents_txt to i_contents_txt.
clear i_contents_txt.
why you are clearing every time i_contents_txt.
then it is ok,change setting in scot may be your client is not connected with the mail server or it is using different port for sending mail.