Skip to Content

In both S/4HANA Cloud and S/4HANA on-premise most approvals are handled by the flexible workflow extension to SAP Business Workflow, with the approvals appearing in the Fiori Launchpad in the My Inbox app.

Feedback has been very positive, particularly as most approvers receive a push notification in the Launchpad to alert them of the arrival of new approvals. However, some users will only need to access their Launchpad infrequently, and for these colleagues it is convenient for them to receive an email notification directly in their email client (e.g. MS Outlook, Gmail… ). In other words, every time a user receives a new task, they should be informed with an SMTP mail.


Fig 1. You have a new approval!

Those of you using S/4HANA Cloud 1805 will already have this capability, and in the next on-premise Release it is planned to be available, too. If it has not already been set up for you, the process is very simple. The only prerequisite to this guide is that your users have e-mail addresses maintained, and e-mail transmission has been enabled for your tenant.

The mechanism used to perform this is Output Management in S/4HANA but even if you are not familiar with this you will find these the description below very easy to follow, thanks to the simple Fiori user-interfaces.

Note: Some aspects of Output Management are not yet supported. So if the administration of the notification emails is very important for your organization (such as resending mails that failed to transmit), then you should wait for a future release when the administration is improved.

Steps to activating email (SMTP) notifications in the S/4HANA Cloud release

Step 1. Identify your workflow scenario

Each workflow scenario has a unique ID. Unfortunately, this is not always shown in the support information. But if it is, it will be the middle parameter of the task ID. The online documentation is also a good source of scenario IDs and I’ll do my best to update this article as questions/comments arise.

Fig 2. Invoking support information for the task
Fig 3 The Scenario number

Step 2. Copy the predelivered email template to the exactly named custom template

The template SWF_CRT_NOTIFY_RECIPIENTS is available to support workflow email notifications.

Fig 4 .The Email Notification Template

In the Fiori app Maintain Email Templates locate this template and copy it to nnnnnnnn_CRT_ALL, where nnnnnnnn is the numerical ID of the workflow scenario. The custom prefix shown in the copy dialog popup will be prefixed to the ID as you can see highlighted in fig 5.

E.g.

YY1_00800157_CRT_ALL for  overall Release of Purchase Requisition

YY1_00800173_CRT_ALL for  release of Purchase Requisition Item

 

Step 3. Adjust the text of the mail template to your needs

Simple HTML can be used to format your e-mail template. How much the HTML is supported depends on what e-mail client you use. The text can also be edited and variables used. But bear in mind that most of the variables are technical in nature and not suitable for display. Also, not all variables will contain data at the time the email is triggered. They are offered in the template in case they become relevant in the future for additional triggers, such as when an approval has completed.

You will need to repeat this for all the languages that your company supports.

Fig 5. Authoring your own email text in the template.

Trouble-Shooting

In S/4HANA Cloud everything will have been set up for you in advance. You just need to create an email template as described above. However, for the on-premise edition of S/4HANA you are dependent on what other colleagues have configured or not configured, so the trouble-shooting described here may be useful.

Test 1 – Has the approval been triggered?

If there is no approval item in the user’s My Inbox, this is a fair indication that the workflow has not been triggered, or has errored out. Use the apps in the Workflow Administrator Fiori Tile Group (or backend transaction SWIA) to determine if the workflow aborted or if no user was identified for the approval step.

Test 2 – Has an e-mail been transmitted?

Use the Fiori Tile Display Email Transmissions (or backend transaction SOST) to determine whether or not an attempt was sent to transmit the email, or whether any mail has been sent from your tenant.

Fig 6. The email transmission log.

Note the filter settings. Set all statuses if you are unsure.

Test 3 – Did the workflow system generate an email?

Use the Fiori Tile Application Logs (or backend transaction SLG1) with the subcategory filtered to WIM_ACTION. Pay special attention to the errors, such as a user’s email address missing.

Fig 7. Workflow information in the Application Log

FAQ

1. Can this be used with classical workflow templates

No. Some classical workflow templates are active in S/4HANA Cloud, but it is expected that in later releases this content will migrate to the flexible workflows to take advantage of the simplified user-interface in Fiori. So currently these workflows cannot be email enabled.

2. Is this available on-premise

This capability has already been tested for on-premise use so it is likely to be available in the next S/4HANA on-premise release. In the Cloud edition it is available from 1805 onwards.

3. What interaction triggers the email?

An email is currently triggered when

a) a new task is created or,

b) an existing task is forwarded to a user

The recipient must be a direct recipient (i.e. not indirect through substitution) and must have a valid email address maintained.

4. Does it only work for approvals?

It works for approvals and also any task that is assigned to a user.

5. Can I configure different mail texts for different activities within the same scenario?

Yes. Each activity has a node number. Create a separate template for each node, replacing the _ALL suffix in the email template ID with _nn where nn is the node number.

E.g. Instead of (or in addition to) Y1_00800157_CRT_ALL create Y1_00800157_CRT_49 for the approval activity of the purchase requisition approval scenario.

You cannot create different emails for different steps which use the same workflow scenario activity.

6. Can I use the attributes of the leading business object in the generated email?

Not yet in Release 1805, but the requirement has been captured.

To report this post you need to login first.

5 Comments

You must be Logged on to comment or reply to a post.

  1. parimi suryasairam

    Hi Alan Rickayzen,

    Thanks for the detailed explanation.

    We are trying to configure the same steps for the Purchase order approvals email notifications but we are unable to get the scenario ID from the Task definition. Can you please provide us the scenario ID for the Purchase orders.

    Thaks in Advance.

     

    Thanks!

    Sairam

    (0) 
    1. Ashish Shah

       

      Hi Sairam,

       

      For purchase order flexible approval workflow Scenario ID is 00800238 and for normal workflow scenario ID is 20000075 in 1709 on premise version.

       

      However even after configuring these details i am unable to get emails triggered.

      @alan.rickayzen can you help?

       

      Regards,

      Ashish Shah

      (0) 
  2. Ashish Shah

    Hi Alan,

     

    in 1709 on premise system i am not able to locate the email template SWF_CRT_NOTIFY_RECIPIENTS

     

    And even after configuring other templates like MM_PUR_TASK_SENT_TEMPLATE & MM_PUR_PO_DEFAULT_TEMPLATE , no emails are triggered in SOST.

     

    Even in SLG1 i don’t see any log with sub category WIM_ACTION.

    Am i missing any config?

     

    Regards,

    Ashish Shah

    (0) 
  3. NESTOR ARGENIS MELGAREJO BLANCO

     

    Hello partners @ashish.shah , @alan.rickayzen

     I have the same issue to solve but I can not find the templates and the one that is currently available I have configured according to the proposed guide but it does not work. Do you have any good news?

    In 1709 on premise system the workflow is WS00800238 but the task ID is TS00800531.  

    Regards,

    (0) 

Leave a Reply