Friday, 15 October 2021 18:33

Understanding how email template works in Flexible Workflow

Written by Gourab Dey
Rate this item
(0 votes)
“© 2020. SAP SE or an SAP affiliate company. All rights reserved.” “Used with permission of SAP SE”


Today in this blog post, we will have a deep dive to understand how system uses email templates and how email is triggered by flexible workflow. There are many beautiful blog post available today on email template on flexible workflow, but the information on how system uses these template to trigger email is missing. So, we will discuss the same in this blog post.


Knowledge of Flexible workflow and email template in Flexible Workflow is required. We won’t be discussing how flexible workflow works and how email template can be maintained to trigger email for flexible workflow. There are already so many beautiful blog post are available. Some of the links are given below. If you have not gone through the concept of flexible workflow and email template, then it is recommended to have a look into below links first then continuing this blog post

Los Geht’s:

A couple of points which are worth re-iterating:
  • The email template for Flexible Workflow is maintained using Fiori App “Maintain Email Template”.
  • The name of the email template should follow the below naming convension
    • YY1_<Scenario_ID>_CRT_<StepID> / YY1_<Scenario_ID>_CRT_ALL: Email template to be used when workitem is created
    • YY1_<Scenario_ID>_COMPLETE_POSITIVE: Email template to be used when workflow is approved (Point to note: It will be triggered when the workflow is approved, and not the workitem)
    • YY1_<Scenario_ID>_COMPLETE_NEGATIVE: Email template to be used when workflow is rejected(Point to note: It will be triggered when the workflow is rejected)
So, whenever the email templates are maintained, it is stored in below tables
SMTG_TMPL_HDREmail Template Header
SMTG_TMPL_HDR_TEmail Template Name and Description

(Email template defined in Maintain Email Template Fiori App)

(Email template stored in Table)

Point to note: We can see the table is a cross client table, so no need to transport the email template across client.

Now that email template has been maintained using the Fiori apps, various event like work item creation, workflow approval and rejection, system check for the respective template associated with the workflow and creates an entry in the table “SWW_WIREGISTER” on the respective event(WI Creation, Approval and rejection) if email template is maintain for those events.

Let’s have a look into table entry to have an idea how it’s looks.

(Registration of a Work Item)

We can notice

Continue reading here
Read 154 times

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.