Skip to Content
Technical Articles
Author's profile photo Rosaria Dipaola

How to Set Up the Email Notification for Flexible Workflow in SAP S/4HANA Cloud

Background

SAP has provided a Standard Solution to notify the users about new work items generated by flexible workflow and displayed in the ‘My Inbox’ app.

Introduction

The default notification in SAP S/4HANA Cloud is through alerts that are displayed in the SAP Fiori Launchpad, but it is also possible to configure the system to notify users via email about new work items in their inbox.

Moreover, it is possible to configure the system to send notification for approval or rejection of requests.

In this blog the steps to set up the email notification for the Release of credit memo request will be shown.

Pre-requisites

  • The Flexible workflow has been already configured (not covered in this blog)
  • Sender email address must be setup in the system.

How to set up the email notification

For the setup of the email notification and customising of the email workflow messages, we will use the “Maintain Email Templates” app:

Fig.%201%20Maintain%20Email%20Template

Fig. 1 Maintain Email Template

 

From the pre-delivered tab, search for the ‘SWF_CRT_NOTIFIY_RECIPIENTS’ email template (Fig. 2):

 Fig.2

Fig.2 Pre-delivered email templates

 

Create a copy of the template following the pattern specified in the standard email description <YY1>_<Scenario_id>_CRT_ALL or <YY1>_<Scenario_id>_CRT_<ACTIVITY_NODEID>.

For the notification about the approval or rejection we will use the pre-delivered template SWF_WORKFLOW_COMPLETE_NOTIFY with the following pattern:

  • <YY1>_<Scenario_id>_COMPLETE_POSITIVE
  • <YY1>_<Scenario_id>_COMPLETE_NEGATIVE

 

The scenario ID is the WS number linked to the flexible workflow. It can be found in the app “Manage Workflow Scenario”(Fig.3):

Fig%203

Fig. 3 Workflow scenario ID for Credit Memo Requests

 

This info is provided also by the standard cds view I_WorkflowScenarioDefText:

Fig

Fig.4 Scenario ID

Alternatively, we can access to the ‘Support Information” option of a selected work item in the ‘My Inbox” app:

fig5

Examples:

  • For the overall release of regular purchase requisitions, the scenario ID is 02000458 and the activity node ID is 19, so we will use YY1_02000458_CRT_19.

 

  • For the item-level release of regular purchase requisitions, the scenario ID is 02000471 and the activity node ID is 20, so we will use YY1_02000471_CRT_20.

 

  • For the Credit Memo the scenario ID is 02000029, so we will use YY1_02000029_CRT_ALL.

 

The copy of the email template for the Credit Memo Request will look like the following (Fig.5).

f

Fig.5 Credit Memo Request email template

The following are the available fields that can be used to pass the values in the email subject and body:

f

 

We can customise the email subject and the body. In our case, we also added the URL to navigate to the work item. The receiver will click on the link that will open the related work item directly in the ‘My Inbox’ app (Fig. 6 ):

Fig. 6 Custom email template body

 

f

Fig. 7 Email sent with the link to work item

 

Configure the default system email address

As prerequisite to be able to send email notifications, the sender email address must be setup in the system.

Via Manager your Solution -> Application Platform and Infrastructure -> Output Management -> System Administration -> Define Default Email Sender Address

f

Fig. 8 Define Default Email Sender Address via Manager Solution

In CBC, go to “Define Default Email Sender Address’:

f

Fig. 8 Define Default Email Sender Address via CBC

 

Conclusion

This blog demonstrates how to setup the system sender address via ‘Manage your Solution’ and CBC and how to setup Email Notification for Flexible Workflow in SAP S/4HANA Cloud.

We created custom email templates as copy of the pre-delivered ‘SWF_CRT_NOTIFIY_RECIPIENTS’ email template and found the scenario ID info needed to adhere to the specific pattern as suggested in the email template description.

 

If you’d like to ask questions, share feedback and thoughts, please use the comment section and/or post questions in the SAP S/4HANA Cloud community and follow me for further blogs.

 

Thanks,

Rosaria (Rosie)

Assigned Tags

      27 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ole Floegel
      Ole Floegel

      Hi Rosaria,

      thanks a lot for this blog.

      Do you know if there exists an overview of the activity node IDs? Or where did you get them from?

       

      Thank you very much in advance.

      Author's profile photo Rosaria Dipaola
      Rosaria Dipaola
      Blog Post Author

      Hi Ole Floegel

       

      you can find some of the activities node IDs at the following link in section "Mandatory: Define step names and decision options in My Inbox"

      https://help.sap.com/viewer/af9ef57f504840d2b81be8667206d485/2021.000/en-US/copyea6b8eb4b5964ba487c7fab02044e58d.html

       

      Regards

      Rosaria (Rosie)

      Author's profile photo Rob Howery
      Rob Howery

      Hi Rosaria,

      Thanks so much, this was extremely helpful.  I have a question - how to link the template with the specific flexible workflow we are using?  Is it only the naming convention that provides the link, or is there anything else needed?

       

      Thanks,

      Rob

      Author's profile photo Rosaria Dipaola
      Rosaria Dipaola
      Blog Post Author

      Hi Rob,

      the Template to inform task recipients is SWF_CRT_NOTIFY_RECIPIENTS.

      It can be used to send notification mail to the recipients of the work item. The custom templates has to follow the pattern: <YY1>_<ScenarioId>_<CRT>_<ACTIVITY_NODEID> or <YY1>_<ScenarioId>_CRT_ALL.

      The scenario ID is the "link" between the template and the flexible workflow. In Fig.3 and Fig.4 above you can find how to retrieve the correct scenario ID.

       

      Regards

      Rosaria(Rosie)

       

      Author's profile photo Vaibhav Kumar
      Vaibhav Kumar

      Dear Rosaria,

      I have developed one custom flexi workflow but facing challenges. I have followed steps mentioned in the blog and can send email to approvers. But there is a requirement to send email to CC and BCC who are not approvers. So I cannot use a USER decision activity step in Flexi.

      Could you please guide how it can be achieved?

      We already crossed the dead line and planning to redevelop all in classic WF.

       

      Regards,

      Author's profile photo Dhanesh M
      Dhanesh M

      Hi Rosaria,

      Your blog is very much Informative and helpful.

      I was successfully able to setup flexible email for PBD approvals. However we have a requirement where we need to attach PBD output PDF in flexible workflow, also the approver should have the option to approve/reject via email. Is this possible, if so how can we achieve this ??

      If you can suggest , it will help us a  lot.

       

      Thanks,

      Dhan

      Author's profile photo Arun Kumar Mishra
      Arun Kumar Mishra

      Hi Rosaria,

       

      Sender id is showing DDIC in sost. How I can change to another id .

      Author's profile photo J. van den Wittenboer
      J. van den Wittenboer

      Hi Rosaria,

      Thanks for the clear explanation.

      Is there a possibility to make the URL to navigate to the work item dynamic? So having different url's for test and productive systems?

       

      Thanks in advance,

      Joos

      Author's profile photo Rosaria Di Paola
      Rosaria Di Paola

      Hi Joos,

       

      the URL must be set to point to the correct system as the work item is specific for the system.

       

      Regards

      Rosaria(Rosie)

      Author's profile photo Wagner Peres
      Wagner Peres

      Hi Rosaria,

      Thanks for the clear explanation.

      I didn't understand if the notification is active by default or if this configuration is needed to send by e-mail?

      I configured the flexible workflow but it is not in the SBWP. Is there any configuration needed to activate?

      Author's profile photo Minh Tran Nguyen Ngoc
      Minh Tran Nguyen Ngoc

      Hi Rosaria,

      Thanks for the clear explanation.

      I'm in S/4HANA (not cloud), i want to change the default user or email sender, can you please help me.

       

      Thanks.

       

      Author's profile photo Sterling Wu
      Sterling Wu

      I have the same question

      Author's profile photo Minh Tran Nguyen Ngoc
      Minh Tran Nguyen Ngoc

      Hi Sterling Wu

      Please useSE38 -> Program BTC_MASS_JOB_CHANGE

      Job: SAP_WORKFLOW_OUTPUT_MANAGEMENT

      Change user in job.
      Author's profile photo Pawan Kumar
      Pawan Kumar

      Hello Rosaria,

      Thank you for the detailed blog.

      We implemented the email notification for Condition Contract flexible workflow using the above steps in our OP version, but it is not showing up in SOST.

      Do we need to do any separate configuration for OP systems apart from the steps suggested above?

      Regards,

      Pawan

      Author's profile photo Diego Furrer
      Diego Furrer

      Hey Pawan
      You may have not planned the following Programm as a job: RSWF_OUTPUT_MANAGEMENT

      Regards

      Diego

      Author's profile photo Diego Furrer
      Diego Furrer

      Hello Rosaria

      You need the correct naming convention to send emails successfully.
      So why is there a tab in the flexible workflow where you could assign the e-mail templates.
      The assignment then seems to have no effect? You know something about it?
      
      Example in the Sales Quotation
      
      
      

       

      Author's profile photo Former Member
      Former Member

      Hi Everyone ,

      I have created an Email template for PR release approval process and its working fine. The Problem is email template is also triggering for Auto Approval for PR release . This should not be trigger .Anyone have idea how to restrict the mail process for that.

      Thanks

      Dinesh Kumar

      Author's profile photo Shubhanshu Agrawal
      Shubhanshu Agrawal

      Hi,

      In my case, SLG1 log says template created by us has been used and mail has been processed for PO flexible workflow task WS00800238. SBWP has the correct email content as configured in template and same with SWIA. However, mail generating in SOST is having totally different content from the SBWP.

      SBWP has "Approval of Purchase Order XXXXXXXX" ,however SOST is getting " Task 'Workflow for Article Outbound' has been created'". I am not sure why it is happening.

      Thanks in advance

      Shubhanshu

      Author's profile photo Ankit Shirsat
      Ankit Shirsat

      Hi Rosaria,

      In FIORI I am unable to use manage your solution application, is there any other possible way to configure the default system email address ?

      Thanks in advance,

      Ankit Shirsat

      Author's profile photo Rosaria Dipaola
      Rosaria Dipaola
      Blog Post Author

      Hi Ankit,

       

      you should access via CBC to setup te default system email address.

      Author's profile photo Anil Grandhi
      Anil Grandhi

      Hi Rosaria, Thanks for the detailed blog! I would like to know, how you have inserted the URL to navigate to the work item ? The picture you have attached, custom email template body is not clear. I tried by zooming in, but no luck. Could you please help me to understand, how you have achieved it?

      Author's profile photo vijaya more
      vijaya more

      Hello Rosaria

       

      I setup the process but still email notifications are not getting triggered. Can you please guide me how to check logs or error? or what else I need to check so emails will be triggered

       

      Regards

      Vijaya

      Author's profile photo Claire Neale
      Claire Neale

      Can reminders be triggered if the workflow has not been actioned?

      Author's profile photo Sivaganapathy Subramanian Ramalingam
      Sivaganapathy Subramanian Ramalingam

      Hello Rosaria,

       

      Can we add a PDF attachment to the mail template?

       

      Regards,

      Siva R

      Author's profile photo Sivaganapathy Subramanian Ramalingam
      Sivaganapathy Subramanian Ramalingam

      Hello Rosaria,

       

      Can we add the PDF attachment to the mail template?

       

      Regards,

      Siva R

      Author's profile photo Rajesh Prajapati
      Rajesh Prajapati

      Hi @Rosaria Dipaola

      First of all thanks for sharing such a knowledgeable document. i need little bit more guidance on this.

      I am sucessfully, able to use the below template

      WF_CRT_NOTIFIY_RECIPIENTS’

       

      But struggling on below , i am trying to use below template for Approval and Rejection Confirmation mail but not able to succeed.

      SWF_WORKFLOW_COMPLETE_NOTIFY with the following pattern:

      • <YY1>_<Scenario_id>_COMPLETE_POSITIVE
      • <YY1>_<Scenario_id>_COMPLETE_NEGATIVE

      Appreciable if you help on this.

      Author's profile photo VINOD KUMAR NEMALIPURI
      VINOD KUMAR NEMALIPURI

      Rosaria Dipaola Rosaria Di Paola

      Hi This was so infiormative if you have or find any reg The Flexible workflow has been already configured (not covered in this blog) can you please send me or post here vinodkumar.nemalipuri1@gmail.com