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

Error in sending mail

Former Member
0 Likes
1,144

Hi all!

I am send an email using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" , i am getting the sy-subrc = 2. (i.e) document not sent. Anybody can advice why subrc getting 2 and is the any configuration issues there? plz advice.

Note:

when i am executing the same prg in my sanbox its running fine and sending mail.

Thx.

-Palani

Hi all!

I am send an email using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" , i am getting the sy-subrc = 2. (i.e) document not sent. Anybody can advice why subrc getting 2 and is the any configuration issues there? plz advice.

Note:

when i am executing the same prg in my sanbox its running fine and sending mail.

Thx.

-Palani

9 REPLIES 9
Read only

Former Member
0 Likes
1,108

what are the parameters you are passing to the Function module.

can you show how you are calling..

regards

vijay

Read only

Former Member
0 Likes
1,108

SY-SUBRC 2 means document is not sent . Seems your internet node is not setup correctly . Check in tcode SCON for the setup of internet node ( comapre the two systems ). Many a times basis disable mailing from test / production server to stop unnecessary mails from going out . You can also check in SOSB / SOST , all the error records can be seen here and this will give more info on why mailing is not working . Try sending a test mail from SOST and see if it works correctly .

Cheers.

Sanjay

Read only

Former Member
0 Likes
1,108

Hi,

configure your Sap mail using s012.

Regards

Amole

Read only

Former Member
0 Likes
1,108

Hi palani,

1. Take help of your basis team.

They will check/modify SCOT settings.

regards,

amit m.

Read only

Former Member
0 Likes
1,108

Hi Palani,

As far as I know this exception had nothing to do with the code. Try contacting Basis and find out if there is anyother issue at their end.

Regards,

Srikanth

Read only

0 Likes
1,108

Read this post:

Read only

0 Likes
1,108

hi

two thinks to do:

TCODE = SICF : activate Service "SAP connect"

TCODE = SCOT : below the node "INT(Internet)"

create a new one "SMTP" (Mail Server)

check point "node at work"

enter mail-port and mail-host

check "internet" at the bottom

after this you have to enter a

Default Domain ( for example "*" )

make a routing test.

i hope it was helpful

Read only

0 Likes
1,108

Thanks Gero , I'm going to test and let you know.

Regards,

Tokio

Read only

Former Member
0 Likes
1,108

Thanks problem resolved