Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Document Not Sent Exception when sending mails

Former Member
0 Likes
1,792

Dear Experts,

I am not able to send the mail in the Production server using the function module "SO_DOCUMENT_SEND_API1" or "SO_NEW_DOCUMENT_ATT_SEND_API1" and get the Exception "DOCUMENT NOT SENT". But it works in Dev and Quality. When searched in SCN for the solution, i found few suggestion like COMMIT WORK, SCOT, SOST.

I have already set the Commit work in the FM. I am able to send test mails from SBWP. So i guess there is no problem with the SCOT settings also.

I know that you might suggest to use CL_BCS class for sending mails as SAP suggests but this is already developed using FM and need your suggestions to solve this.

Thanks,

Ayyamperumal

1 ACCEPTED SOLUTION
Read only

jozsef_hegyi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,603

Dear Ayyam

there is an example report in sap note 190669 here you can see how to call this fm correct

Best regards

Jozsef

8 REPLIES 8
Read only

Former Member
0 Likes
1,603

Hi,

     Its possible that the FM is being called with no data in receivers table. Make sure that the receiver IDs are given while calling the FM.

Hope this helps,

~Athreya

Read only

0 Likes
1,603

Hi Athreya,

Thanks for the quick response. Even this i checked in the debugger before posting the thread itself but missed to mention it. The recipients are filled and the same FM works in Dev and Quality for the same recipients but not in the Production..

Read only

former_member209120
Active Contributor
0 Likes
1,603

Dear Perumal,

Pl. share your code to under stand your problem..  other wise please check this link

http://wiki.sdn.sap.com/wiki/display/Snippets/Send+external+email+from+within+ABAP+program

Regards,

Ramesh.T

Read only

Former Member
0 Likes
1,603

- Are the sender and recipient address wwll maintained?

- Is SCOT well configured, I mean is there a route from the sender to the recipient domain?

Cheers!!

Abhinab

Read only

0 Likes
1,603

Hi Abhinab,

- Are the sender and recipient address wwll maintained?

yes they are maintained appropriately..

- Is SCOT well configured, I mean is there a route from the sender to the recipient domain?

ya i checked that also. they do have the routes. even checked by sending mails from Business Workplace and they work. But using the function modules, i am not able to get the mails also in the Business Workplace and when checked via debugger, got the exception in the fm DOCUMENT NOT SENT with sy-subrc = 2.

Read only

jozsef_hegyi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,604

Dear Ayyam

there is an example report in sap note 190669 here you can see how to call this fm correct

Best regards

Jozsef

Read only

0 Likes
1,603

Hi Jozsef,

Thanks for sharing the SAP Note. Actually i have used the Char data type (SOLI) instead of RAW (SOLIX) as referred in the note. May be i will try changing them and let you know the result.

But i also wanted to know the reason that, why this problem occurs only in the Production System and not in the Dev and Quality??

Read only

jozsef_hegyi
Product and Topic Expert
Product and Topic Expert
0 Likes
1,603

Hi Ayyam

this can be because sp differences between the systems, or number-range problem. In this case please try the report RSBCS_NUMBER_RANGE. But at first please chekc if the report from the note is working or not.

Best regards

Jozsef