转 Trigger a workflow to send an email whenever a material is created
Triggering workflow to send an email whenever a material is created
By Chandrasekhar V, EDS, from link.
This example focuses on triggering a workflow whenever a material is created using MM01.
TCode SWDD(Workflow builder) -> Click on “Create” button
Drag and drop the “User decision” step. Enter the following details

Select the agents “Workflow initiator (expression)” and click on “Transfer and to graphic” (tick mark button).
Following screen appears.

Drag and drop “Activity” step into branch YES,
Create new task click on the “Display task” -> Create task


Enter the “work item text” in the same screen as follows:

To get “&_WI_OBJECT_ID.MATERIAL&” in above screen, click “insert variable” icon (above that yellow icon).
Save in local package.
Go to “Additional data” menu “Agent assignments” -> “Maintain”.
Select it and click on “Attributes” from application toolbar and select “General task” radio button, click “Transfer”

Click on back 2 times.

Click on “continue”.

Select “Workflow initiator” as Agents and click on “Transfer and to graphic” button

To create the workflow container

Select “workflow container” and double click on “BUS1001006” in the list displayed.

Click on properties tab and select the import check box and click on ok

Again open user decision, which was already created, and make changes as bellow
In Parameter1 click F4 and select Material number as bellow

Click on “transfer and to graphic”
Right click on branch “No” to send a mail


Double click on “send mail”.
Enter the following details as in the below screen

Click on “Transfer and to graphic”

Save in a local package
Click on the “Basic data(ctrl+F8)” from application toolbar and select “Start events” tab

Enter the details as in bellow screen

Click on “Binding”

Click on ok
Save and come back to graphic, the following screen will appear
Save, activate and execute.

Go to TCode “MM01” to create the material
Enter the details in MM01 and click on “Select view” -> “Basic data1”
Enter the details in Second screen as below:

Save and come back.
Check your inbox by using TCode SBWP.

Double click on “Work item executable”

Click yes or no and check your inbox again