‎2006 Jan 18 10:37 AM
Hiiiii Every1,
I m sending e-mail in Html format using the above mentioned FM.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
commit_work = 'X'
document_type = 'HTM'
document_data = doc_chng
put_in_outbox = 'X'
TABLES
object_header = objcont
object_content = objcont
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
and sending it automatically using
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
What the error is that when i send e-mail what i have to check is that weather the the E-mail is sent from SOST or Not..If the Status of that e-mail is Delivered then i have to set a flag for sucess.
Else..Error Message.
How i can check weather is mail is delivered to recipent or Not even if SMTP is creating problem or due to any reason mail is not sent. I have to check.
Plz do reply as soon as Possible.
Thanks & Regards
-
Sachin Dhingra
‎2006 Jan 18 10:41 AM
Hi sachin,
Check for the following field in receivers table.
RETRN_CODE
When the recipient has received the document, the function module enters the value '0' in this field. If the document is not successfully received, a value unequal to '0' is entered in the field.
REgards,
Ravi
‎2006 Jan 18 11:16 AM
hi Ravi
I m using this FM in meathod for a class.
Earlier i was able to send mails by using this retrn_code.
but i think it gives value 0 when it is just send to Job Queue in SOST.
But i m scheduling the Jobs by sending it automatically using
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
Now what This Program Returns that after sending jobs from SOST.
In my case it still give some error for example:
Status - RED ICON
Msg. 808 :- No delivery to , as no route known
Or ny of the error having RED ICON weather it is due to SMTP problem or ny problem. For this error Status i have to set flag....the email is not sent..
When a green ICON is displayed for status of Email i have to set a flag for Sucess.
Hope this will clear the scenario..
Thanks & regards
-
Sachin Dhingra
‎2006 Jan 18 11:12 AM
‎2006 Jan 18 11:44 AM
Hi Sachin,
After using FM. Check Sy-subrc.
Sample code:
case SY-SUBRC.
when 0.
message S999(YF01) with 'Mail sent with attachment'.
when 1.
message E999(YF01) with 'No authorization for sending to the specified number of recipients'.
when 2.
message E999(YF01) with 'Document could not be sent to any recipient'.
when 4.
message E999(YF01) with 'No send authorization'.
when others.
message E999(YF01) with 'Error occurred while sending'.
endcase.
If u get sy-subrc = 0 then goto SCOT to check ur mail status. Most probably this transaction is sheduled by basis person. So, after execution of ur FM mail will sent to the respactive person.
Regards,
Digesh Panchal
‎2006 Jan 18 2:45 PM
Hallo,
I think I understand what you mean. You need the end status of the document after the send process has finshed.
Please try the following way:
After calling
SO_NEW_DOCUMENT_SEND_API1check the Export parameter:
NEW_OBJECT_IDIt will cointain the new object ID wich is created.
After submiting the send process manually (usually this is not recommended...) the status of the document is updated in the DB Table:
'SOST'.In this you can look for the object by:
OBJTP
OBJYR
OBJNO
(This can be found in the NEW_OBJECT_ID ).
The fileds:
MSGID
MSGTY
MSGNOof the table
SOSTwill contain the information you requiere.
I hope this helps you.
Regards.