Skip to Content

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.

Step1:

Go to TCODE – SWDD and click on Create button.

Step2:

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

/wp-content/uploads/2012/04/2_91850.jpg

Step3:

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

/wp-content/uploads/2012/04/3_91851.jpg

Step4:

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.

/wp-content/uploads/2012/04/4_91852.jpg

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.

/wp-content/uploads/2012/04/5_91862.jpg

Step5:

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

Step6:

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

/wp-content/uploads/2012/04/6_91863.jpg

Step7:

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.

Step8:

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.

/wp-content/uploads/2012/04/7_91864.jpg

Creation of Task:

Step1:

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.

/wp-content/uploads/2012/04/8_91871.jpg

Step2:

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.

/wp-content/uploads/2012/04/9_91872.jpg

Step3:

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

/wp-content/uploads/2012/04/10_91873.jpg

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:-

/wp-content/uploads/2012/04/11_91874.jpg

Screen Shot After New Binding:

/wp-content/uploads/2012/04/12_91875.jpg

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.

/wp-content/uploads/2012/04/13_91876.jpg

Step4:

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.

/wp-content/uploads/2012/04/14_91877.jpg

Step5:

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

/wp-content/uploads/2012/04/15_91878.jpg

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

Binding of Rule to the Workflow:

Step1:

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.

/wp-content/uploads/2012/04/16_91879.jpg

Step2:

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.

/wp-content/uploads/2012/04/17_91880.jpg

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

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply