‎2011 Mar 30 9:38 AM
Hi Experts,
We are using one custom program to send mails to users using SO_DOCUMENT_SEND_API1 function module.
upto last week it was working fine.
my network team had changed the port for mail server last week.after that this program is not working.
i have checked with Basis teeam , they have tested in SAP Business workplace.
mails are going perfectly.
Can you please help me with some inputs.
We are using 4.6C system.
Thanks
Sai
‎2011 Mar 30 10:46 AM
Hello Sai,
you did already check the SAPConnect-Setup??? If yes, can you please send the failure code or something?
Greetz Gollmer
Edited by: GollmerBZ on Mar 30, 2011 12:13 PM
‎2011 Mar 30 1:35 PM
Hi Gollmer,
I have no idea how to check SAP Connect setup. can you guide me.
My Basis team has checked all the settings and tested in SAP business workplace , sent a mail to external mail address.
mails are going to external email ids.
using program it was failing.
Thanks
Sai
‎2011 Mar 30 1:39 PM
Hi Sai,
first of all - is there no reply of the program concerning what the hell is going wrong ???
You can check the SAPConnect - Entries by using the Transaction SCOT. There must be node named "SMTP". This node has to be filled with the right information. At this note you can also see if your report creates any mails.
‎2011 Mar 31 2:06 AM
Hi Gollmer,
Program is not giving any error.
i have debugged the program after this function module run system is giving SY-SUBRC eq 0.
SCOT connections are maitained correctly.As i already said this program is not working since last week.
Please find the trace log from SCOT for successfully sent mail from SWBP .
SO_OBJECT_SEND Recipient in queue flagged
SO_OBJECT_SEND Structure: SOSCO
SO_OBJECT_SEND Status written for this recipient
SO_OBJECT_SEND Structure: SOST
SO_OBJECT_SEND Queue updated
SO_OBJECT_SEND Status updated
SO_OBJECT_ID_FOR_SEND_GET Structure: SOSC
SO_OBJECT_ID_FOR_SEND_GET Object ID returned
SX_OBJECTS_SEND Document type: M. Send attribute class: 1. No. of recipients: 1
SX_OBJECTS_SEND Call of SX_PERFORM_RFCSEND with SMTP M SESA125992
SO_CONVERTED_VERSIONS_GET Versions returned
SX_PERFORM_RFCSEND Formats supported: *
SX_OUTGOING_VERSION_BUILD Read contents of document RAW36000000000203
SO_OBJECT_DATA_FOR_SEND_GET Object transferred
SO_OBJECT_PREPARE_FOR_SEND Object prepared for transmission
SX_SEND_DATA Structure: SXRECINFI1
SX_SEND_DATA Structure: SXEXTRECI1
SX_SEND_DATA Structure: SXPCKLSTI1
SX_SEND_DATA Structure: SXDOCCHGI1
SX_PERFORM_RFCSEND After call of function SX_OBJECT_RECEIVE Returncode: 0
SX_PERFORM_RFCSEND Structure: SXEXTRECI1
SX_PERFORM_RFCSEND Message transferred by node to communication system
SO_OBJECT_STATUS_UPDATE(synchr Message obj. does not exist - no event necessary
SO_OBJECT_STATUS_UPDATE(synchr Status set (synchronous)
below log is after running my program.
SO_OBJECT_SEND Recipient in queue flagged
SO_OBJECT_SEND Structure: SOSCO
SO_OBJECT_SEND Status written for this recipient
SO_OBJECT_SEND Structure: SOST
SO_OBJECT_SEND Queue updated
SO_OBJECT_SEND Status updated.
Thanks
Sai
Edited by: sai on Mar 31, 2011 6:57 AM
‎2011 Mar 31 6:06 AM
Hi sai,
I don't think that the problem is in your SAP system.
For our development and QA systems there is no mail service active in standard to avoi d test mails leaving that are looking like production mails.
If we want to test mails there is service to be started on a special server outside SAP. We have to order this by our service provider from our basis team.
Maybe this service is not started after port change or it must be reconfigured.
Regards,
Klaus
‎2011 Mar 31 6:23 AM
Hi Klaus,
Thanks for your input.
this issue is currently happening in my PRD system.
i have checked with my basis team on this.
They told that they have activated all the services and they are able to send mails to external id's using SAP Business workplace.
Thanks
Sai
‎2011 Mar 31 7:03 AM
Hi Sai,
then go to your basis team, call transaction SCOT, seclect "Overview of send orders" in "Utilities".
Can you find your send orders from fm there?
If you can find them, have a look on the last column "Msg".
In our case there is a "672" there. Clickinmg on it it tells "Wait for communications service".
Which Messages do you have? What's the message text?
Regards,
Klaus
‎2011 Mar 31 7:13 AM
Hi Klaus,
I did n't find any entries.
No entries are recorded for mails.
I have tested some mails using SBWP, those mail entries i can see there.
those are with message "Message transferred by node to communication system"
Thanks
Sai
‎2011 Mar 31 7:17 AM
Hi Sai,
did anyone check the mail-server connected to SAP ??? I don't think there is any problem, but you'll never know. If you're sending mails they have to be in the communication protocol of SCOT. It's seems to be real awful problem. Grose ?! =(
‎2011 Mar 31 7:21 AM
Hi Gollmer,
SAP system is connected to mail server.
I can send mails to external mail id's using SAP Business workplace.
Thanks
Gopi
‎2011 Mar 31 7:23 AM
Hi Sai,
ok i forgot. Phew, I'm at the end of my ideas. I don't know what's going wrong.
‎2011 Mar 31 7:37 AM
Hi,
if you call your custom program in batch mode please have a look on job log and system log (SM21). Are there any errors or messages?
‎2011 Mar 31 7:43 AM
Hi Klaus,
This custom program is interacative program.
first program displays some data after that user selects send mail option then the program will send emails to customers.
so this program can not be run in background.
in my previous post i have posted the log for sucessfully sent mail from SBWP and mail from from custom program.
based on that log can you give me some idea..
Thanks
Sai
‎2011 Mar 31 8:27 AM
Hi Sai,
although this is an interactive program you can look for system log entries in SM21. Maybe there are some hints to recognize the problem!
In addition you can try to debug the fm's SO_OBJECT_ID_FOR_SEND_GET and SO_OBJECT_SEND, which are listed in your trace above. Maybe system debugging is needed!
Regards,
Klaus
Edited by: Klaus Babl on Mar 31, 2011 9:28 AM
Edited by: Klaus Babl on Mar 31, 2011 10:17 AM
‎2011 Mar 31 6:49 PM
For our development and QA systems there is no mail service active in standard to avoi d test mails leaving that are looking like production mails.
If we want to test mails there is service to be started on a special server outside SAP. We have to order this by our service provider from our basis team.
A strange way to restrict sends from test systems but whatever works I guess. You have the ability to restrict the SMTP (or EMAIL/RFC for older systems) nodes by email address or domain and restrict access to SCOT/SOST as well. Test mails (and attachments) should always have '**TEST**' or something similar in the subject or body to identify them as invalid...just a suggestion for consideration.
As far as the issue goes for the poster, if the mails aren't showing in the queue, then just debug the function. It should be fairly easy to pinpoint the issue...
‎2011 Apr 01 12:10 AM
Hi Sai,
Try using explicit commit statement ( COMMIT WORK AND WAIT ) after FM call. Also, check if importing parameter COMMIT_WORK is marked as 'X' in FM SO_DOCUMENT_SEND_API1.
Hope it helps.
Cheers
Sandy