0% found this document useful (0 votes)
28 views8 pages

Sending URLs in Email Workflow

1. The document describes how to display two URLs in an email sent from a workflow. The first long URL is split between three container elements that are combined at runtime. The second URL is a simple website address. 2. It provides instructions on editing the workflow template and task to include the URLs, with screenshots showing where to add the three container elements and MAIL_HTML command to build the formatted HTML email. 3. When the workflow runs, the container elements are populated and combined to generate the first long URL, while the second URL is static text. The technical log can be viewed to see the runtime values used to construct the URLs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
0% found this document useful (0 votes)
28 views8 pages

Sending URLs in Email Workflow

1. The document describes how to display two URLs in an email sent from a workflow. The first long URL is split between three container elements that are combined at runtime. The second URL is a simple website address. 2. It provides instructions on editing the workflow template and task to include the URLs, with screenshots showing where to add the three container elements and MAIL_HTML command to build the formatted HTML email. 3. When the workflow runs, the container elements are populated and combined to generate the first long URL, while the second URL is static text. The technical log can be viewed to see the runtime values used to construct the URLs.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.

Scenario

You have a workflow with a Send Mail step. In the email you want to display two URL’s.

 The first URL is long so you need to split it between 3 container elements (URL_1, URL_2 and
URL_3). The URL container elements will be filled from the workflow container at runtime
and you want to display the link with text.
 The second URL is a simple website address and again you want to display the link with text.

In our example the workflow ID is WS00300112 and the task ID used in the Sendmail step is
TS00307945 (Step 24).

[1] Workflow Template


Transaction SWDD to view/edit the workflow template.

The workflow has one step (Step 24) which is the Send Mail step. You can see the three container
elements URL_1, URL_2 and URL3 in the workflow container.

Fig 1.
In this step the email will be sent to an email address ([Link]@[Link] in our
example). You can see the binding between the workflow container and the task container at design
time.

Fig 2.

The task description below shows the task description text. You must enter the task description in
order to create or view the URLs.

Fig 3.
[2] Standard Task (Used in our Send Mail step example)
Transaction PFTS to view/edit the task.

As you can see the task uses the object method SELFITEM SENDTASKDESCRIPTION which is used by
default in Send Mail steps. This data can be found in the ‘Basic Data’ tab.

Fig 4.
Looking in the ‘Container’ tab of the task you can see the three container elements to hold the long
URL (URL_1, URL_2 and URL_3). At runtime these container elements are filled due to the binding
displayed in Fig 2.

Fig 5.
To maintain the URL’s in the task description click on the ‘Description’ tab and then on the ‘Change
text’ button. In this view you can see the components of the two URLs.

Fig 6.

Click on the 'Change text' button as highlighted in Fig 6 above. Once this is done it opens a text
editor which is workflow MS Word. You need to change the editor via the menu Goto -> Change
Editor.
Fig 7.

The crucial parts here are:

 As detailed in note 1800946 you must include the MAIL_HTML command with format /:
 For your HTML the /* (SAPscript comment) has to be the value of the format column, not
part of the text. This format line only becomes visible within the old editor.

Fig 8.
See that both URL’s use the SAPscript comment line. Also take note how the URL’s are built. The first
URL combines the values contained in the three container elements to build the URL while the
second URL is simply a web address.

If you look at the workflow technical log you can see the runtime values of the three container
elements.

Fig 9.
Here is the resulting email

Fig 10.

You might also like