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

FM SO_DOCUMENT_SEND_API1 returning exception document_not_sent

Former Member
0 Likes
1,271

Hi Experts,

We are using FM SO_DOCUMENT_SEND_API1 to send mail. Mail is triggering successfully in development system. But it is not triggering in testing system. Getting exception "document_not_sent"(sy-subrc = 2).

Kindly help us in resolving this issue.

Any help is appreciated.

Regards,

Veena

1 ACCEPTED SOLUTION
Read only

0 Likes
1,189

Check if the SMTP Node settings are correctly set in SCOT transaction.

9 REPLIES 9
Read only

0 Likes
1,190

Check if the SMTP Node settings are correctly set in SCOT transaction.

Read only

0 Likes
1,189

are there other mails that work? or is this your first try to send mails in your system?

did it use to work in the past? did you make changes? is it a new programm? (for new programms use cl_bcs-class)

how did you fill the parameters of this fm?

LG

Stefan Seeburger

Read only

0 Likes
1,189

Thanks Stefan.

This FM is working proper in development environment. But in Staging system it is not working. All the reports that are using this particular FM is not triggering mail and returning sy-subrc value as 2.

Regards,

Veena

Read only

0 Likes
1,189

@CoderX: Thank you.

I also had the same doubt. I checked with BASIS folks. They said the process is such that the mail should come to SOST first then only it should trigger to SCOT.

These reports were working fine a month ago. Not sure all of a sudden it is returning error.

Regards,

Veena

Read only

0 Likes
1,189

Did you get same error with cl_bcs or using transaction SBWP to send a mail, if yes that's not an Abap but a Basis problem.

Also did you ask basis for recent notes implementations (e.g. security notes) or some update in actual mail server (e.g. Exchange or the like) or network security/mapping?

Regards,

Raymond

Read only

0 Likes
1,189

Thanks Raymond.

I tried to send mail in SBWP. I am getting the error.

"You do not have a sender address in the chosen communication method."

Regards,

Veena

Read only

0 Likes
1,189

Do you have an email address assigned to your user profile? Also, check if the sender address is populated before the FM is called in your program.

If the above doesn't help; send the message text you get from the exception, that will help locating the problem.

Read only

0 Likes
1,189

Add a mail address to your profile with SU01 (or ask admin) and it is not a bad idea to check if some user mail addresses were cleared in this system.

Regards,

Raymond

Read only

Former Member
0 Likes
1,189

Thank you Raymond.

Issue is resolved. We maintained communication id in SU01 and it worked !!!

Regards,

Veena