05-12-2009 10:59 AM
Hi All,
I have send the smartform output to email addresses as attachment. But I am not able to monitor the status of those emails whether the mail address is correct or not. or whether the email have gone or not.
How to check that?
Is there any way so that I can access the data of SOST transaction
Thanks in advance.
Rgds,
Madhuri
05-12-2009 11:12 AM
Hi Madhuri,
Yes you can check in SOST transaction and if you are using FM SO_DOCUMENT_SEND_API1,
In the tables parameters list, you find a parameter called as RECEIVERS
which uses the structure type SOMLRECI1.
This structure contains fields like RETRN_CODE, NOTIF_DEL, NOTIF_READ,
NOTIF_NDEL.
Check for these fields if you get some values in it after the FM is
executed.
05-12-2009 11:10 AM
Hi,
GO through the program 'RSSOSOSTSTAT' there you can able to find what are the tables used.
The FM which is used for sending the email, check sy-subrc which will give valid reasons, why your mail has not been sent
05-12-2009 11:12 AM
Hi Madhuri,
Yes you can check in SOST transaction and if you are using FM SO_DOCUMENT_SEND_API1,
In the tables parameters list, you find a parameter called as RECEIVERS
which uses the structure type SOMLRECI1.
This structure contains fields like RETRN_CODE, NOTIF_DEL, NOTIF_READ,
NOTIF_NDEL.
Check for these fields if you get some values in it after the FM is
executed.
05-12-2009 12:37 PM
Hi Anup,
The RETRN_CODE has always value 0 for correct email address as well as wrong email adress whereas NOTIF_DEL, NOTIF_READ,NOTIF_NDEL are blank in both cases.
please help
Rgds,
Madhuri
05-12-2009 1:02 PM
Hi Madhu,
Please check below this
SCOT > Setting>Default Domain and also
SCOT > Utilities> Overview of Send Orders (nothing but T-code:SOST)
Regards,
Venkat M.
05-12-2009 1:10 PM
Hi,
I want to check the statud through my program in which I send the emails using FM :
SO_NEW_DOCUMENT_ATT_SEND_API1.
and I want to generate the log file in which I need to mention whether the mail has actually send to the concerned email address or isthere any error while sending such as wrong email address.
Thanks
Madhuri
05-12-2009 2:03 PM
Hi Madhuri,
Once the FM SO_NEW_DOCUMENT_ATT_SEND_API1 is executed, immediately the sy-subrc will set to 0 or 4. Accordingly all the messages will be stored there if the sy-subrc <> 0.
Log those messages into one internal table and display the same.
Regards,
-Syed.
05-12-2009 2:09 PM
Hi Wahid,
I am doing that only right now. But it doesn't picked up the actual status whether that email ACTUALLY has gone or not. like we get the mail delivery failure in other servers such as yahoo gmail, like that I want to capture the status and create the log file.
Rgds,
Madhuri
05-13-2009 5:36 AM
Hi Madhuri,
You can pick the status from SOST table itself. Check the sy-subrc whether it is 0 or 4. If it is other than 0, then try to pick the log from SOST table.
I could not reply back y'day, don't mind for the delay.
Regards,
-Syed.
Edited by: wahid hussain syed on May 13, 2009 6:37 AM
05-14-2009 6:55 AM
Hi Sayed,
Thanks for the reply. Thats very helpful to me. Are there any other tables related to the SOST tcode ? I got much info from SOST table but need some more.
Thanks once again
Rgds,
Madhuri
Edited by: madhuri sonawane on May 14, 2009 11:25 AM
05-14-2009 7:09 AM
Hi Madhuri,
That was my pleasure. In SOST transaction, you can see the failure requests. Double click on the red button and click on the Log button. You can see the log which SAP has used and retrieved from SOST table.
Hope this is helpful,
Regards,
-Syed.
05-14-2009 7:29 AM
Thanks Sayed,
One more question. Can I change the email address coming in the 'send from' in the email I have send to the paricular address?
I mean its now taking the SAP user id'd email address who is running the transaction to send the emails.
I want that to be hard coded and sent from my custom program.
I am using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending emails.
thanks for reply.
Rgds,
Madhuri
05-14-2009 7:54 AM
Hi Madhuri,
Please check the code below:
*----- List of Users
DATA: lt_user TYPE STANDARD TABLE OF str_agrs,
lt_user_wa LIKE LINE OF lt_user.
*----- For object data
DATA: lt_obj_data TYPE STANDARD TABLE OF sodocchgi1,
lt_obj_data_wa LIKE LINE OF lt_obj_data.
*----- For receiver
DATA: lt_rec TYPE STANDARD TABLE OF somlreci1,
lt_wa LIKE LINE OF lt_rec.
*----- For the text
DATA: lt_text_itab TYPE TABLE OF solisti1,
lt_text_wa LIKE LINE OF lt_text_itab.
*----- Data Declaration for Email Address Get
DATA: lv_email TYPE string,
lv_subrc TYPE sy-subrc,
lt_error TYPE STANDARD TABLE OF rpbenerr.
*---- Get the users list
CALL FUNCTION 'ESS_USERS_OF_ROLE_GET'
EXPORTING
role = 'SAP_ALL' "{color:green}Role can be anything depending on your requirement{color}
TABLES
role_users = lt_user.
*----- Pack data inside the table
READ TABLE lt_user INTO lt_user_wa INDEX sy-tabix.
*----- Get the address using User ID
CALL FUNCTION 'HR_FBN_GET_USER_EMAIL_ADDRESS'
EXPORTING
user_id = lt_user_wa-uname
reaction = 'S'
IMPORTING
email_address = lv_email
subrc = lv_subrc
TABLES
error_table = lt_error.
*------ Receiver Details
lt_wa-receiver = lv_email.
lt_wa-rec_type = 'U'.
lt_wa-com_type = 'SOTR'.
APPEND lt_wa TO lt_rec.
CLEAR lt_wa.
*------ Call method to send the mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = lt_obj_data_wa
document_type = 'RAW'
commit_work = 'X'
TABLES
object_content = lt_text_itab
receivers = lt_rec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
<log>
ENDIF.
Try this,
Regards,
-Syed.
Edited by: wahid hussain syed on May 14, 2009 8:55 AM
05-12-2009 11:16 AM
Hi Madhuri,
First of all, check with your basis team, whether they have done the smtp configuration under SCOT transaction for which you don't have authorization. If not done request them to do it ASAP and then the server needs the restart which will hardly take 10 mins.
For your information, to check the email whether it is correct or not, you need to check the user in SU01 and its details.
After this, you can check in SOST with the options available there.
Regards,
-Syed.
Edited by: wahid hussain syed on May 12, 2009 12:17 PM
Edited by: wahid hussain syed on May 12, 2009 12:18 PM
05-12-2009 11:19 AM