on ‎2016 Jun 11 11:24 AM
Hello experts,
I am modifying an existing workflow. It has a Send Mail standard task. I would like to get the result of this task (error or success) and insert it in a Z dictionary table before it is totally completed. I am using a method in Program Exit of Mail Send task after creation and after execution but I am not able to know if the email is sent successfully until the task is completely finished. Therefore, my method is useless.
Here comes the question, is there any way of knowing if the email is sent successfully before finishing the task? I want to save the result of the standad task in a Z dictionary table.
I place my simple workflow just in case. The taks I talk about above is the circled one.
Thanks in advance.
PD: I have already read examples Program Exits In Workflow - ABAP Development - SCN Wiki and
Request clarification before answering.
Hi,
If the users have a valid email address and they are set up correctly then the email should go to their inbox.
You could, as an extra precaution, check if the user has a valid email address and if not, send the email to a global inbox something like approvals@yourcompany.com.
Or you can just set up SCOT so that it records errors when sending out emails and monitor SOST.
In a normal world incorrect emails, or non-existing emails is not something that happens regularly; monitoring and ad-hoc decisions should be enough.
Kind regards, Rob Dielemans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
"I would like to get the result of this task (error or success) and insert it in a Z dictionary table before it is totally completed."
Why????? You can read the status from workflow (using SAP_WAPI* function modules).
But anyway, if it isn't "totally completed" then how can anyone possibly know if it's going to be error or success?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You didn't answer the "Why???".
Yes, that should be possible, try using fm SAP_WAPI*GET*DETAILS* on a workflow where the mail was sent and see if you can detect it.
Or you could change the process so that it detects whether the Send Mail part was successful before continuing. If in error then stop, or return an error.
I see no reason to try to do this while the process is running, wait until it finishes.
And, as always, don't use a Z table!! (unless you have no other choice)
regards
Rick
Hello,
"I would like to get the result of this task (error or success) and insert it in a Z dictionary table before it is totally completed."
I wanted to do as I said above because I would have liked to be sure that the task is completed successfully or wrong.
Anyway, I am going to do as you say. I am going to wait until the task is totally finished. Detecting send email part in the standard task or changing the process would be amore complex task.
Thank you for your help!
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.