Skip to Content

Part 3 : Creation of a workflow, standard task and binding of Rule

Purpose of creating a Workflow:-

We are creating workflow to send the mails to the concerned person whenever the Billing Block is set an action gets triggered while creating/changing a Sales Order. We assign this workflow in the Action Definition in SPRO. Standard Task plays the vital role of sending mails and rule plays the vital role in agent determination.


Go to TCODE – SWDD and click on Create button.


On the left hand side there is a drop down box select workflow container. As shown in the below screen shot.



Double click on the element to create a new element. As shown in the below screen shot.



Fill all the required value i.e Element,Name and Short Descript. In this case we have created the element with name BUSINESSOBJECT.

Select object type and give BUS2000131 as your BOR name as shown in the below screen shot.


Now go to properties and select the check the Import and Export box and press enter key. As shown in the below screen shot. If we don’t select the import and export box it will never appear in the Action Definition and we can’t assign it to the Action in SPRO.



Now save the workflow. A pop-up will appear give Name and Description for the workflow and press enter key. Then activate the workflow.


Now from the left hand side drop down box select “Steps that can be inserted” as shown in the below screen shot.



Now in the left hand side you will find number of options and steps that can be inserted. We will select Activity and drag to the graphical model. Under this activity we are going to do all the processing.


Once you drag the activity a new activity screen will come. Under the Tab “Control” you will get Field Task. Over there you will find a drop down box. Click on it and select create Task. As shown in below screen Shot.


Creation of Task:


As soon as you click on this it will take you to new screen where you have to give all particulars of the task. Give Task Abbr. and Name. Now give the new object type “YBUS200131” which you have created and the method “CHANGE” you have created to do the processing. As shown in the below screen shot.



Save the Task and click back button. Once you click back button it will give an option of binding the workflow with the task. As shown in the below screen
shot. Just press enter. The purpose of this binding is to pass the value from workflow to task and vice versa.



Now you will find that the Binding Button under the Task is green as shown below.


Now click on the binding button. You will find that “&YBUS200131&” is passed from workflow to the task parameter“&_WI_OBJECT_ID&”. But in our case we will get the value for the BOR “BUS2000131” when it is triggered from action. Thus we will replace the “&YBUS200131&” with our workflow element “&BUSINESSOBJECT&”. Drag and drop “BUSINESSOBJECT” from top in place of “&YBUS200131&”.

Screen Shot for Initial Binding:-


Screen Shot After New Binding:


Click Enter key first then click on the “Transfer and to Graphic” icon as show in the below screen shot. Save and activate the workflow again.



Now get into the task once again by double clicking on the activity and then on activation. Fill work Item text. Whatever you give here will come as Subject of the mail. You can also put the values of a field present in the container. Click on the Insert variable Icon and select the value from there. Remember total number of Character it can send as subject is 40. If it exceed then the subject will get truncated while sending the message from SAP inbox to Outlook.



Go to description Tab whatever and write your message. Whatever you write over here will come as Body of the mail.


Save the task and press back button and activate the workflow once again.

Binding of Rule to the Workflow:


In the same screen of Activity below the
Task you will find a block Agents. Under it there is a drop down box. Select AC
rule from the drop down and mention your Rule which you have created earlier in
section 2. In this case it is ‘90100004’. As shown in the below screen shot.



Now click on the Binding Button which is below the agents. Under this map the Business Object Item GUID with the Item GUID we have created in the container of the Rule. This is done to pass the value from workflow to Rule and vice versa. As shown in the below screen shot.


Activate the workflow. Now we can assign the workflow to a Action Definition.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.