07-20-2009 2:09 PM
Hi Forum,
I am using the standard function module for sending mails.
** To Trigger a mail **
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_objtxt
receivers = lt_reclist.
lt_reclist contains two recoreds
1) RECEIVER requestor's mail id
REC_TYPE U
COPY X
2)RECEIVER approver's mail id
REC_TYPE U
The mail is trigered from requestor's inbox.
The problem here is that neither the approver is recieving the mails in his inbox nor the requestor is recieving a copy of mail in his inbox but there is a copy of this mail in requestor's outbox.
I am testing all this in business workplace inbox as there is no provision of trigering mail in the development server.
Please help me on this.
Regards,
Anubhav
07-21-2009 8:28 AM
hi
use T.Code SOST...and check whether mail is coming in INBOX....if its coming then your program is working fine..u can select mail and select display option to see the contents of mail whether everything is in proper format in mail....and then wht all you require is proper internet settings which would be done by BASIS consultant..
regards
DHRUV KAKKAR
07-20-2009 2:11 PM
Hi Anubhav,
Chk in SBWP the status of the mail.Chk whether it is SUCCESS or Waiting For communications service.
Check SOST once.
regards,
Lakshman.
07-20-2009 2:12 PM
HI,
Have you submitted the Prgram RSCONN01 after The FM?
Instead of FM, If you could use BCS* Classes.. You could check the numerous examples at ABAP Editor with BCS_*
07-20-2009 2:21 PM
Hi Anubhav,
Try catching the exceptions of the Fm and check if there is any exception getting raised by the FM.
** To Trigger a mail **
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_objtxt
receivers = lt_reclist
exceptions
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
others = 99.
Hope this helps!
Regards,
Saumya
07-20-2009 2:26 PM
Hi,
Check the SOST Tcode..if you can see the email sent by program then add the below code
After the FM Call write this code..
** To Trigger a mail **
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_objtxt
receivers = lt_reclist.
IF SY-SUBRC EQ 0.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = ''
AND RETURN.
ENDIF.
Still you face contact you basis guy for SMTP settings
07-21-2009 7:12 AM
Hallo everyone,
Please go through the following observations...
Case1)
** To Trigger a mail **
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
SY-SUBRC EQ 0
Available in Requestoru2019s outbox , CC not coming in requestoru2019s inbox.
Not available in approver;s inbox
In transaction SOST it shows..
Status -->Waiting for both records
Case2)
**To Trigger a mail **
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = lc_x
commit_work = lc_x
TABLES
packing_list = lt_objpack
contents_txt = lt_objtxt
receivers = lt_reclist.
IF sy-subrc EQ 0.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = ''
AND RETURN.
ENDIF.
In requestor's login in SOST transcation a popup comes up with following message
Express document "Send status for document:" received from author "REQUESTOR"
Express document "Send status for document:" received from author "REQUESTOR"
The title of inbox of requestor changes to
Cannot be sent: Send status for document:
If you see detail message it shows
Status received for this document:
Send status for document:
Sent on:
20.07.2009 19:13:32
Sent by:
Requestor
Status for Recipient horizon Anubhav:
Cannot process message, no route from Requestor to Approver
No copy in requestoru2019s inbox nor a mail in approveru2019s inbox.
After a few minutes the status of all mails change to Error in SOST .
What is the problem in sending mails...?
Thanks a lot,
Anubhav
07-21-2009 7:53 AM
Hi,
check whether the Recipients email ids are configured in SCOT.
Regards,
Keerthi
07-21-2009 7:50 AM
Hi Anubhav,
As our friends have suggested correctly, submit program "RSCONN01" after calling FM.
And ideally your Basis people should schedule a job for this program with 1-3 minutes frequency.
Thanks & Regards,
Anil Salekar
07-21-2009 7:56 AM
Hi Anubhav,
Apart from coding part from ABAP point of view there are specific settings which the basis team has to taek care like the message server and sending job scheduling. This sending job is responsible to send the mails in waiting status to the reciepients by trigerring the RSCCONNECT program. So check if you have any sending jobs in SOST transaction.
Cheers,
Raghav
07-21-2009 8:28 AM
hi
use T.Code SOST...and check whether mail is coming in INBOX....if its coming then your program is working fine..u can select mail and select display option to see the contents of mail whether everything is in proper format in mail....and then wht all you require is proper internet settings which would be done by BASIS consultant..
regards
DHRUV KAKKAR
07-21-2009 1:05 PM
Hallo Experts,
As pointed out in the posts , the users were not maintained in the mailing list in transcation SOST .
After maintainig the mailids mails are trigering .
The mails are going to outlook inbox bu are not visible in business workplace i.e. SAP Inbox of the users to whom it was sent but available in outbox of the user from whose ID mails are sent.
Is workflow settings required for mails coming to SAP Inbox?
Thanks a lot,
Anubhav
07-21-2009 1:20 PM
Hi,
For getting the mail in the user's SAP Inbox, you need to send it to the SAP user id (Recipient type B). Are you doing this in the code
For Internet address (Recipient type U) which you have already done and working
For users to whom you want the entries in SAP inbox use
RECLIST-RECEIVER = 'DEVELOPER1'. "SAP user ID
RECLIST-REC_TYPE = 'B'.
APPEND RECLIST.
Add this to the receivers list
Regards
Edited by: Rajvansh Ravi on Jul 21, 2009 2:25 PM
07-21-2009 1:29 PM
Hi Anubhav,
Are you passing the recipient as the emial ID of the user?
If yes, then it would go to the extenal ID only.
Please state what value are you passing for recipient to send mail to the SAP inbox.
Regards,
Saumya
07-21-2009 1:36 PM
Hai,
Did to try the transaction SCOT. Go to the transaction SCOT and theres an Execute button press it and enter INT in the input box and press ENTER. This should trigger the mails.
Best Regards,
rama
07-21-2009 1:56 PM
Hi,
<li>You might be passing this to send mails to external mails ids
<li>Pass the SAP Login id for corresponding persons also like below.
"Receivers List.
w_receivers-rec_type = 'U'. "Internet address
w_receivers-receiver = 'xyz_at_gmail_dot_com'.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO i_receivers .
CLEAR:w_receivers.
Thanks
Venkat.O
"Receivers List.
w_receivers-rec_type = 'B'. "SAP Inbox
w_receivers-receiver = 'SCSVENKAT'.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO i_receivers .
CLEAR:w_receivers.