Sending remainder mail in Workflow
Hi All,
Please tell me How to send a remainder mail to employee for after every 5 days.
Thanks,
Kumar.
Hi Raju,
<li>Develop one Z* program to send mail what matter you want to send.
<li>You can schedule job with job frequency 5 days in Tcode SM36.
<li>program to send mail
<font color=blue><b><pre> REPORT zvenkat_mail_simple.
"Variables
DATA :
g_sent_to_all TYPE sonv-flag,
g_tab_lines TYPE i.
"Types
TYPES:
t_document_data TYPE sodocchgi1,
t_packing_list TYPE sopcklsti1,
t_attachment TYPE solisti1,
t_body_msg TYPE solisti1,
t_receivers TYPE somlreci1.
"Workareas
DATA :
w_document_data TYPE t_document_data,
w_packing_list TYPE t_packing_list,
w_attachment TYPE t_attachment,
w_body_msg TYPE t_body_msg,
w_receivers TYPE t_receivers.
"Internal Tables
DATA :
i_document_data TYPE STANDARD TABLE OF t_document_data,
i_packing_list TYPE STANDARD TABLE OF t_packing_list,
i_attachment TYPE STANDARD TABLE OF t_attachment,
i_body_msg TYPE STANDARD TABLE OF t_body_msg,
i_receivers TYPE STANDARD TABLE OF t_receivers.
PARAMETERS:p_mail TYPE char120.
"start-of-selection.
START-OF-SELECTION.
"Subject of the mail.
w_document_data-obj_name = 'MAIL_TO_HEAD'.
w_document_data-obj_descr = 'Simple mail using SAP ABAP'.
"Body of the mail
w_body_msg = 'Hi,'.
APPEND w_body_msg TO i_body_msg.
CLEAR w_body_msg.
w_body_msg = 'This is body of the mail.'.
APPEND w_body_msg TO i_body_msg.
CLEAR w_body_msg.
"Write Packing List (Body)
DESCRIBE TABLE i_body_msg LINES g_tab_lines.
w_packing_list-head_start = 1.
w_packing_list-head_num = 0.
w_packing_list-body_start = 1.
w_packing_list-body_num = g_tab_lines.
w_packing_list-doc_type = 'RAW'.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
"Fill the document data and get size of attachment
READ TABLE i_body_msg INTO w_body_msg INDEX g_tab_lines.
w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_body_msg ).
"Receivers List.
w_receivers-rec_type = 'U'. "Internet address
w_receivers-receiver = p_mail.
w_receivers-com_type = 'INT'.
w_receivers-notif_del = 'X'.
w_receivers-notif_ndel = 'X'.
APPEND w_receivers TO i_receivers .
CLEAR:w_receivers.
"Function module to send mail to Recipients
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_document_data
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = g_sent_to_all
TABLES
packing_list = i_packing_list
contents_txt = i_body_msg
receivers = i_receivers
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 .
MESSAGE i303(me) WITH 'Mail has been Successfully Sent.'.
ELSE.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN.
ENDIF.</pre></b></font>
Thanks
Venkat.O
Similar Messages
-
How to send a mail in workflow keeping 1 receiver in CC and the other in TO
Hi,
Can anybody tell me how to send a mail in workflow keeping 1 receiver in CC and the other in TO.
I need to send a mail to an employee keeping his/her manager in CC through workflow.
Regards,
LavanyaHi Lavanya,
I dont think its possible using Send mail step type.
But it can be done by using the FM SO_NEW_DOCUMENT_SEND_API1. Just create a method and Call this FM accordingly.
Thanks,
Viji. -
Better way of Sending E-Mail Notifications -- Workflow or Function Module ?
Hi All,
I have an implicit enhancement written in a t-code and based on some conditions I am creating event which inturn will trigger the workflow which inturn send e-mail notification via send mail step.
My question is:
Which one of the ways is better in terms of performance or overhead to send an e-mail notification. (There are no Approval processes in the workflow.. Just One Step E-mail Notification).
1) In the Implicit Enhancement, Trigger an event which inturn will trigger the workflow and e-mail is sent via send mail step.
2) In the Implicit Enhancement, Send the e-mail notification via standard function modules available... such as
"SO_OBJECT_SEND", "SO_DOCUMENT_SEND_API1".........
Would be grateful if someone can post the Advantages and Disadvantages in the above 2 ways of sending e-mail notifications..
Regards,
PR.Just to throw in some additional factors, consider exception handling:
An event-based send mail step is decoupled and thus independent of your application. This means your exception handling is separate. It means you do not need to hold up the transaction if there is a failure. All this depends on how important the mail is. You could of course add validation code to ensure the mail address is valid and send it elsewhere if not.
Regarding performance, consider how often this happens. If it's an infrequent occurrence then I wouldn't worry about performance. Hundreds or thousands a day is a different story.
So the answer is:
Workflow for low-volume scenarios (low performance impact) that are important (better error handling in WF),
Direct mail for high volume and noncritical
In between these, use whatever you like
One more thing to perhaps consider the future. What are the chances of the mail being replaced by a work item in furture? Sometimes it's only by observing a process after go live that you can identify the best solution. e.g. you may decide to replace the mail with a "Please go fix this" work item because you need deadline monitoring -
Sending OUTLOOK mail from Workflows
HI ,
Please help me in getting out of this error encountered during a sample workflow thing.
Here is the requirement I need to send a OUTLOOK mail from SAP.If the user accepts the workflow task then mail need to send a recipient ,stating that he accepthed the request.
Below I designed that task.
In send Mail step I added the recipent thing as stated below.But I was unable to send mail to OUTLOOK .In this I am not even getting notification in my SBWP in SAP INBOX.
How should i send the mail to OUTLOOK from SAP.Hi Ranjith,
Here's some friendly advice for you:
- don't post the same question twice
- if you get a specific error message ('wait for communications service'), try investigating it yourself by googling it.
In this case, your issue is almost certainly with your mail setup - you can confirm this by trying to send a mail from SBWP to an external address. If so, it's a Basis issue, not workflow. You can safely hand it off to your Basis team.
cheers
Paul -
Problem in sending e-mail from workflow task
I configured the TS20000095 for sending a mail to PERNR when his trip was approved. I generated the auto binding for the task. But I am getting error in task saying "Work item 000000393101( work item id): Object 000000393101 method SENDTASKDESCRIPTION cannot be executed" and help says check the binding between the task container and the method container. What I need to do in method container. Please help me.
the trip number is coming correctly and employee details.
The binding is like this
CONTAINER => METHOD
&ADDRESSSTRINGS& = &ADDRESSSTRINGS&
&EXPRESS& = &EXPRESS&
&RECEIVERS& = &RECEIVERS&
&TYPEID& = &TYPEID&
&LANGUAGE& = &LANGUAGE&
&ATTACHMENTS& = &ATTACHMENTS&
&LINEWIDTH& = &LINEWIDTH&
And I have added the initial values for the container elements in the standard task. When I tested in SWUD these values are carried .. but when I trigger the event BUS2089 - APPROVED the task is triggered but the initial values are missing so getting error. Please let me know what to do. -
Custom Workflow for sending Remainder mail in MS CRM 2013/2015 online
Hi All,
We have a requirement to send a remainder email before 5 days,3 days and on the same day of the M/TC date in lead form. To achieve this we tried using Custom Workflow. Below is the logic tried but in the highlighted line
not able to retrieve the "M/TC date" value, this results in no output.
Kindly suggest where we are going wrong or a best approach to do this.
Parameters:
[RequiredArgument]
[Input("InputEntity")]
[ReferenceTarget("lead")]
public
InArgument<EntityReference>inputlead
{ get;
set; }
[Output("TaskCreated")]
[ReferenceTarget("task")]
public
OutArgument<EntityReference>
taskCreated { get;
set; }
code:
try
Entity lead
= (Entity)service.Retrieve("lead",
context.PrimaryEntityId, new ColumnSet(newString[]
{ "new_mtcdate" })); // (unable to
retrieve the mtcdate)
Guid leadId
= this.inputlead.Get(executionContext).Id;
if(lead.Contains("new_mtcdate"))
{ DateTime date
= DateTime.Now;
DateTime mtcdate
= (DateTime)lead["new_mtcdate"];
TimeSpan elapsed
= date.Subtract(mtcdate);
double days
= elapsed.TotalDays;
Entity task
= new Entity();
task.LogicalName = "task";
if (days
== 5)
{task["subject"]
= "Five days more for the Meeting";
task["regardingobjectid"]=new EntityReference("lead",leadId);
Guid taskId
= service.Create(task);
this.taskCreated.Set(executionContext,new EntityReference("task",
taskId));}
if (days
== 3)
{task["subject"]
= "Three days more for the Meeting";
task["regardingobjectid"]=new EntityReference("lead",leadId);
Guid taskId
= service.Create(task);
this.taskCreated.Set(executionContext,new EntityReference("task",
taskId));}
if (days
== 0)
{task["subject"]
= "Today you have Meeting";
task["regardingobjectid"]=new EntityReference("lead",leadId);
Guid taskId
= service.Create(task);
this.taskCreated.Set(executionContext,new EntityReference("task",
taskId));
Regards, Rekha.JHi,
Try with replacing
Entity lead = service.Retrieve("lead", context.PrimaryEntityId, new ColumnSet(new string[] { "new_mtcdate" }));
also make it confirm, you are getting EntityId.
Also check Link -
Reminder mail for workflow approval
Hi All,
We have a scheduled task which sends Reminder mails for workflow approval which has been pending for more than 5 days.
Recently I created new workflow definitions and reminder task stopped sending mails.
I checked task and it has IapiTaskIfc Class com.frictionless.custom.wkfreminder.sendWorkflowReminder.
How to check this class and do i need to make changes somewhere else to send reminder mails?
Regards,
PrabhatHi Prabhat,
I am working on creating a scheduled task for sending reminder emails. I need help on IapiTaskIfc Class com.frictionless.custom.wkfreminder.sendWorkflowReminder. Can you please share sendWorkflowReminder class to me, so that I can get idea about the code written for sending reminder emails? It would be great help.
To check the class, you need to get the jar from server and decompile it. You can get some idea by looking at the java class file then.
Thanks,
Saloni -
Hi guru
We used SAP MDM 5.5 SP 6 (64.92)
In workflow we use e-mail notification, when SAP MDM Server work without LDAP e-mail is sending.
When we load SAP MDM Server with LDAP, every time when we send e-mail we get error "Could not send e-mail "
Sender and Receiver Users and their e-mail adress is exist in LDAP and right.
Moreover, we test sending e-mail from Server(where installed SAP MDM) through telnet for the same users and same e-mail adress(which precent in LDAP) - all work OK.
Question:
How we should configure SAP MDM Server for e-mail notification work correctly when it work through LDAP?
Regards
Kanstantsin ChernichenkaHi Vinay M.S
Thank you for your answer, but
Really, in our case mail server attribute was named as "mail" and it exist in mds.ini (but that is not standart name for all ADs)
My another question: Why e-mail notification doesn't work from workflow in LDAP for all users?
Additiona information:
We have ~30000 users in AD but in MDM we used only ~500 from it.
For test we created 3 simple workflows with e-mail notification block:
1.Launcher set as user which name starting from symbol "B"
2.Launcher set as user which name starting from symbol "P"
3.Launcher set as "Launcher"
We set as receiver the same user for all workflows.
In 1 case e-mail notification is OK
In 2 case e-mail notification isn't work and we got error "Could not send e-mail" in workflow report. but username and sender receiver e-mail is right
In 3 case e-mail notification from user which we started workflow is OK (and for user which name starting from symbol "P")
Any ideas?
Regards
Kanstantsin
Edited by: Kanstantsin Chernichenka on Oct 2, 2009 1:35 AM -
How to send E-Mail Notification executing through workflow?
hi All
I want to send E-Mail Notification executing through workflow in MDM Data Manager?
I have tried it, But still i am unable to send E-Mail Notification?
i will explain, how i have tried?
1) I have created the simple workflow with the following components
they are in sequence
start--> process-> notify--->stop
2) owner of the workflow is Admin and launcher of the workflow is Admin and i have given email id to the Default Admin user in the console.
3) i have created another user (i.e. User2) with default roles as like as Admin and i have assigned User2 to the process component in workflow and I have created e-mail address for the User2 in the console.
4) i have created another user(i.e.User1) with default roles as like as Admin. and give e-mail address,under the notify component User1 is selected in To Field.
5) stop component as usual
coming to configuration part about the SMPT server in MDS.ini file
1) in mds.ini file for the MailServer=, I have given SMTP Server name once and restarted the server and executed the workflow, but not worked
2)in mds.ini file for the MailServer=, i have given SMTP Server IP Address and checked the port,and we have configured the host file also and restarted the server and executed the worflow , but not worked
In all the ways i have executed and tried to send E-Mail Notifications through workflow, But I didn't
can any one help where i have went wrong, so i can rectify it
what actually we have to give in mds.ini file? is any other cofiguration required for it?
if any one have any solution for it , can you please explain me in step by step
Thanks in Advance
bharat.chinthapatlaHi Bharat,
your steps seems to be correct. Just try to ping your mail server, to verify if your mail server is running up, besides note that mdm go throw port 25 for sending emails, so please check if you are able to send emails using port 25 in your network.
Regards,
Vito -
Workflow for sending reminder mail to approve pending PO in me28
Hi Experts,
I have a requirement wherein I have to design a workflow to send a mail to the approver if he has not approved the PO in me28.
I don need a workflow for PO approval . Only in the case he forgets to approve a PO for one day he needs to get a mail .
Kindly guide me . Quick help is appreciatedHello,
Design a workflow template which is triggered when the PO is created. Make the template wait for the event 'RELEASED' which is to be triggered once the PO is released. If the event is received, complete the workflow or else, design the deadline monitoring to send a mail to the concerned person if PO is not released.
You need to take care of the event creation after the PO is released and deadline monitoring of the step in the workflow template.
If this is not possible, you can create a program which collects all the POs which are not released within a day of creation and send a mail to the concerned people from the program itself. You have to schedule this program daily at a particular time to send the mail. You do not need a workflow for this.
Hope this will help.
Thanks,
Samson -
Workflow : Could not send e-mail [10014 : email ...
hi,
i am trying to send email notification via workflow, but i am not able to do so. anyone can help to troubleshoot this?
below are the steps i have carried out for email configuration:
1. i have added the mail server on mds.ini, MDS is restarted after every changes.
2. requester and approval has correct email setup at console.
3. a notification is added in workflow.
4. telnet ping to mail server with port 25 is fine.
when i check the log, i have the error :
"Could not send e-mail [10013 : email : Notify] [Mail server:xxxxxxxxx] [From address:xxxxxxxx] [To address:xxxxxxx
i know the guidelines and steps for configurations, but apparently it does not workout, so any troubleshoot guideline will be more appreciated.
Thanks!
ShantiHi Shanti,
I am sure you must have checked all this but then again would you please check following things and let us know ?
1) Please check the SMTP Server Name in your Outlook Express if you are using Outlook
2) Please log into MDS file and go under that particular Repositoy and check what details you have given for Mail Server
3) Please give SMTP address in mail server line
4) Log into Console and check if you have alligned Users and Roles to each other correctly or not.
5) log into Data Manager and open the workflow and check the properties of Mail notification stencil and check if correct proertise are set ot not.
Once you have made the changes at server level please restart the server again and then please let us know if this problem exist or not, may be we can more troubleshoot it further.
Thanks and Regards
Praful. -
How to send a mail with copy to some other receipients thorugh Workflow
Hi,
I need to send a mail to one Recipient and also copy some other Recipients throught workflow. I've set up a mail step in my workflow and that sends a mail perfectly. But is there a way to add CC to that step so that when the Recipients get a mail they know that they only have been copied.
Thanks in advance.Hi,
Find the following link.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/sendanExternalmailthroughSAPBusinessWorkflowandRecieversaddressin+CC
Thank you,
Sekhar. -
Problem in sending mail through workflow
Hi All,
I am trying to create a workflow. I created a workflow and once document is made, this workflow trigerrs and i am able to get user decision to my user id. once if i click on approve, mail should be triggered to my mail id. but mail is not coming to my mail id. i checked in SOST transaction, <b>mail status set to Transmitted.</b>, and not as sent .
But i tested a sample test message from sbwp to my mail id and it is working fine. Only through workflow, sending message to outlook is not working. i checked my user in the system in SU01 transaction also, there also mail id is mentioned. what could be reason for not able to send mails through workflow.?
Its urgent.
Points will be awarded to all.
Regards,
vinothHi,
Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
thank You -
Workflow - SWDD scenario to send a mail
Hi Experts,
I am developing a simple workflow scenario using SWDD just to send a mail to inbox(SBWP) to accep & reject items.
This scenario does not require an event to start with.
I had created the User decison steps & steps for Approval and Reject with samle subject lines only. But after doing everything i found that in my SBWP, there are no items i.e everything is balnk.
Workflow is error free and activated properly.
I am working in ECC 6.0 ..Please tell me if i am wrong somewhere?
Thanks
DAnyHi Satyesh T,
I had done the same.. But no luck.
Any more suggestions please.
Hi A@r,
I am doing the same link..but seems to be useless.
thanks
Dany -
How to send External mail in sap HR workflow
Hi experts,
Anybody con tell me how to send External mail in sap HR workflow ?
Regards,
Umesh.Hello,
Check the workflow builder. There is a step type of "Send mail". Just put that into your workflow definition, and your workflow will send mail.
Regards,
Karri
Maybe you are looking for
-
Field in portal table for the text contained in an uploaded file
I have uploaded a file of base item type file into release 2 of the portal. Does anyone know which table the clob field for the text contained in the uploaded file is stored? Thanks, Suzanne
-
Remotely invoke DS job and wait for job
Hi, We are running DS 4 SP2 on Linux and have generated our job script from the console. We need to be able to invoke a DS job from scheduler (autosys) running on AIX and wait for the DS job to complete so the return status is passed back to autosys.
-
Burning music from $1.99 itunes video
I bought my daughter an ipod video for Christmas - in anticipation of this I bought a Christmas song that had a video with it -- I really like the song itself and just want to put it on a CD, but iTunes tells me it cannot burn it because the song is
-
Under about in setting iPhone says I have 985 pictures but under photos app it says 534!
So under settings>about>photos the iPhone is telling me that I have 985 photos on the phone. If I go to my photos app or the camera roll it is telling me there are only 534 photos on the phone. Where is the remainder of the photos possibly being st
-
SAP Menu Travel Management is missing
In our production server, the default sap men "Travel Management" is missing for all the users. i went to PFCG in Logon Tab, in SAP Menu, i tried to add the Travel management menu but it is not showing there also. I maintained ssm_users thru sm30, "