Sap WorkFlow Step by Step - Sap 4 All

Latest

Please enter your email and get the updates in your inbox.

Saturday 4 June 2016

Sap WorkFlow Step by Step

This document explains how to build a workflow.

On execution of Transaction code “SWDD” you will enter into the workflow builder screen as this..

work flow builder
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.

work flow builder

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.

work flow builder
now select the “agents” , “expression”, “workflow initiator (expression)” as shown below.

work flow builder
click on the “transfer and to graphic” button.
work flow builder
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.

work flow builder
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”.

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.

create task
“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.

create task
After selecting the “display” , it will ask you to “transfer” with a pop up box. Click “yes”.

create task

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.”

create standard task
create standard task
create standard task
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.

create standard task
On save the contents as a local object, go to “additional data” , “agent assignment”, “maintain” as shown below and click on it.

create standard task
Now you will get the screen as shown below. In that select the assignment displayed.

create standard task
Select the “ASUG task to ….” and click on the “Attributes” button. Now select the “general task” and then click “transfer”.
create standard task
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.

work flow builder
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”.

work flow builder
Click the “transfer and to graphic” button…
work flow builder
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.

work flow builder
As and when you assign the “send mail” step to “no”, the following screen appears.Enter Subject line and body message.

work flow builder
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.
work flow builder
work flow builder
Now click on the “would you like to display the material?” option as shown below.
work flow builder
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

work flow builder
pop up appears in which you need to select the material number as shown below.
work flow builder
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.
work flow builder
Then click the tick mark button.
work flow builder
The following screen appears and then click on the “step types that can be inserted” as shown below.
work flow builder
Now select the “work flow container” option in it as shown below
work flow container
container elements are shown. Select the material object type “bus1001006” as shown below.
work flow container
Change container element pop up screen appears…as shown below and click on the properties button.
work flow container
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.
work flow container
Continue and save, system will display Message “workflow definition saved and activated successfully”.
work flow container
Now let us “test” the scenario …..F8…
work flow testing
Test workflow screen appears as shown below.
work flow testing
work flow testing
Click as shown above to get the popup window.
work flow testing
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.
work flow testing
When I clicked on “yes” the “display material initial screen” appeared as shown below.
work flow testing

If you found this blog useful please post your feedback and comments below.

9 comments:

  1. Hi, I am not able to see the images, could you upload them again ? Please.
    Regards

    ReplyDelete
  2. Thank the explanation very wonderful

    ReplyDelete
  3. Thanks for sharing this Information, Got to learn new things from your Blog on SAP SF.
    SAP SF
    Call us at eight one two two two four one two eight six.

    ReplyDelete
  4. Thanks for sharing this Information,

    Got 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

    ReplyDelete
  5. thanks for sharing the blog

    ReplyDelete
  6. This is great blog post, Thanks for Sharing.
    From SAP Workflow

    ReplyDelete