This document explains how to build a workflow.
On execution of Transaction code “SWDD” you will enter into the workflow builder screen as this..
left-side area is “information area” , “navigation area” and “step types that can be inserted” . Middle was the “graphical model” which represents the graphical description of the workflow process scenario diagrammatically.
“undefined double click for new step” in the diagram represents the steps to be inserted into it. Now select a step from the steps listed on the left side below corner, and choose one according to your criteria.
For example I selected “user decision”. I dragged that into the diagram thus assigning it.
It represents that there is a case of user being asked to take a decision for a process to follow later.
This is a user decision screen where you need to fill some fields as displayed in below screen shot.
Title of the task is display the material, it leaves us with two options for the user, whether to display or not to display.
So, you need to mention these two steps in the decision texts so that the output would be “yes” or “no”.
When you execute the workflow to display the material from the tcode to display material, the workflow gets activated and user gets these two options to decide.
now select the “agents” , “expression”, “workflow initiator (expression)” as shown below.
click on the “transfer and to graphic” button.
now you get the following screen with the decision inserted into the diagram.
It has 2 steps ”yes” and “no” click on the “yes” option & assign “activity” step to it as shown below.
Drag and drop “activity” step to the “yes” option. You will get the following screen and fill the details of the activity & select the option of “create task”.
fill in the fields as shown and select the “BOR object class” instead of “ABAP class”, Here we have assigned workflow object to “business object repository class” so that it works like a class object.
“asugmat2007” is the example material and task is to display the material.
After selecting the “BOR object type” in the object category, give the object type and select the method as display.
After selecting the “display” , it will ask you to “transfer” with a pop up box. Click “yes”.
In the “work item text” , type “please review material” and click on the work item button above it.
You will get a “select expression” pop up box displayed. In that select the “material number” item.
This means you are asking the workflow to select the material number as variable and review it for selection. Here you need to do it like this….you should give the variable of the “material number” here and also the “material group.”
In order to do that, I typed “in material group” after selecting the material variable and then again select the “material group” in the pop up box of work item.
Note: these “material number” and “material group” are present in the same “object type” “bus1001006-standard material.”
Now after selecting the “work item text” , “save” the contents as shown below.
Note also here in the “work item text”
“please review material” followed by material number variable in ampersands, this is followed by text “in material group” again followed by material group variable in ampersand.
On save the contents as a local object, go to “additional data” , “agent assignment”, “maintain” as shown below and click on it.
Now you will get the screen as shown below. In that select the assignment displayed.
Select the “ASUG task to ….” and click on the “Attributes” button. Now select the “general task” and then click “transfer”.
Now again click the back button for the second time to get this screen.You need to tick mark in that pop up box as shown below.
This pop up is showing definitions which you assigned so far and you are conforming them again.
After you click the tick mark “continue” button, you will get to the initial screen as below.
Note that you got the task number assigned now here. and in the “Agents” “expression”, select “workflow initiator”.
Click the “transfer and to graphic” button…
Clicking on transfer and to graphic, now assign a new task to the “no” option I created in the diagram.
I am assigning “send mail” to the user when he selects “no” option just drag and dropping the “send mail” diagram part of “no” as shown below.
As and when you assign the “send mail” step to “no”, the following screen appears.Enter Subject line and body message.
Then a pop up window appears as below asking for naming your task. “zsendmail” in both the input boxes and then clicked the tick mark button and save.
Now click on the “would you like to display the material?” option as shown below.
The following screen appears.In the title as shown by the cursor, I inserted an ampersand to insert a parameter here which I will define below as shown below
pop up appears in which you need to select the material number as shown below.
Now this material number is displayed in the parameter 1 as shown below. Select it and assign to title above. This makes the material number variable assigned as a parameter to the title, showed it by a black arrow here.
Then click the tick mark button.
The following screen appears and then click on the “step types that can be inserted” as shown below.
Now select the “work flow container” option in it as shown below
container elements are shown. Select the material object type “bus1001006” as shown below.
Change container element pop up screen appears…as shown below and click on the properties button.
Click on the “import” check box in the “parameter settings” as shown below and confirm it by clicking on the tick box and activate it.
Continue and save, system will display Message “workflow definition saved and activated successfully”.
Now let us “test” the scenario …..F8…
Test workflow screen appears as shown below.
Click as shown above to get the popup window.
Give a material name and press F8.
Decision step in workflow screen appears as shown below,now the user chooses any one option provided Either “yes” or “no”. Select Yes It should show the material details.
When I clicked on “yes” the “display material initial screen” appeared as shown below.
If you found this blog useful please post your feedback and comments below.
Nice Document Mukesh
ReplyDeleteexecellent
ReplyDeleteHi, I am not able to see the images, could you upload them again ? Please.
ReplyDeleteRegards
Thank the explanation very wonderful
ReplyDeleteThanks for sharing this Information, Got to learn new things from your Blog on SAP SF.
ReplyDeleteSAP SF
Call us at eight one two two two four one two eight six.
Thanks for sharing this Information,
ReplyDeleteGot to learn new things from your Blog on Sap abap.
http://thecreatingexperts.com/sap-abap-training-in-chennai/
Both online and classroom training is provided.
Contact 8122241286
thanks for sharing the blog
ReplyDeleteThis is great blog post, Thanks for Sharing.
ReplyDeleteFrom SAP Workflow
Informative blog on SAP
ReplyDeleteSAP Training in Chennai