6/25/2015
SAP Workflow my first workflow | SCN
Getting Started Newsletters
Hi, Guest
Log On
Join Us
Store
Search the Community
Products
Services & Support
About SCN
Downloads
Industries
Training & Education
Partnership
Developer Center
Activity
Lines of Business
University Alliances
Events & Webinars
Innovation
Browse
SAP Workflow my first workflow
Communications
Actions
Version 2
created by Vikas Gautam on Nov 26, 2012 10:19 AM, last modified by Vikas Gautam on Dec 5, 2012 7:38 AM
Share
1
Tweet
1
Like
2
Workflow Workflow is a tool for the automation of the business process, consisting of sequence of steps, tasks or event. One similar example to workflow is the automated lines in the manufacturing industry with station points or loading points. You can arrange and manage the dependency of tasks. Users can be sent notification for the task waiting in the SAP inbox for approval or action. Users can be informed of milestones in the process.
By automating the process, you free the users from having to know what to do when. Work items are sent to the participants notifying them of what they have to do, and a single click on the notification calls the correct transaction and navigates to the relevant screen. WebFlow is the internet functionality of SAP Business Workflow.
Components:
Organizational Plan: to manage the hierarchy of reporting and message flow Workflow Builder: To generate the Workflow. The Workflow Builder provides a graphical view of the workflow definition. Events Business Workplace: SAP Inbox Role Resolution Components Organizational Plan
Organizational Unit (a functional unit in your enterprise) Position (Represents a post) Job (classifications of functions in an enterprise) Staff Assignments/Assignment of Userid’s
Standard Task
Task (A description of an activity)
Workflow Builder
Overview Step types Tasks Messages
Events
Triggering Events Terminating Events
Example: The scenario starts when an employee fills out a request for leave. The filledout form is then automatically sent to that employee’s supervisor. If the supervisor rejects the application, the employee is informed and asked to decide whether he/she wants to re submit the application or withdraw it completely. If the employee decides to revise the application, the form is forwarded to his/her inbox for resubmit. If the supervisor approves the request, the employee is informed and the workflow can end.
Steps: http://scn.sap.com/docs/DOC33625
1/13
6/25/2015
SAP Workflow my first workflow | SCN
1. Define Organization Plan (Tcode PPOCE) 2. Create Workflow template: (Tcode PFTC_INS) to create a basic template of workflow, (Tcode SWDD) to build the workflow in the workflow builder 3. Define 1st task (Tcode PFTC_INS) (Create notification of absence) 4. Add activity > first task in the workflow 5. 1st Test in SAP Inbox (Tcode SBWP) 6. Define 2nd task (Check notification of absence) 7. Add activity > second task in workflow 8. 2nd Test 9. Integrate User Decision for Resubmit 10. 3rd Test 11. Define 3rd task (Revise notification of absence) 12. Add activity > third task to the workflow 13. Add 4th Customer Task (Send Notification for approval of leave)
Steps: Step1: Define Organization Plan or Orgn. Unit (Tcode PPOCE)
Step 2:a: Create Workflow Template (Tcode PFTC_INS)
http://scn.sap.com/docs/DOC33625
2/13
6/25/2015
SAP Workflow my first workflow | SCN
Using Tcode PFTC_INS you can create workflow template and tasks also. This take you to the Task: Maintain. In the Task type field, choose the Workflow template for Workflow Template.
For Creating tasks: Choose Standard Task in the Task type field.
Step2:b: View the workflow in Tcode SWDD (Workflow Builder)
In the middle we have overview graphic/flowchart. And on the right side on the bottom we have various small buttons/icons called step types. This we can drag and drop and insert into our worflow. We will be using the
http://scn.sap.com/docs/DOC33625
3/13
6/25/2015
first step type which is like the Absence.
SAP Workflow my first workflow | SCN
play button called activity for our Step 3: Create Notification of
Step3: Define 1st task (Create notification of absence) Go to the Tcode PFTC_INS : Tasks: Maintain Choose Standard Task in the Task type field. Give the following values and Save the task. On saving it will give a code Id: like 99500654 Name: Form_created Abbr: create_form Work Item Text: vik_notif_absencecreate Object Type: FORMABSENC Method: CREATE Checkbox Synchronous object method, Object method with dialog checked. Step 4: Add activity > first task in workflow
Add the Step: Activity to your workflow.
in place of undefined step.
We have created Task TS99500654 separately using PFTC_INS.
http://scn.sap.com/docs/DOC33625
4/13
6/25/2015
SAP Workflow my first workflow | SCN
Note the checkbox Advance with Immediate dialog. This means that the work item of the workflow is made available for processing immediately. The user who starts the workflow is also one of the recipients of this first work item. This is the case here because you entered the container element _WF_Initiator as the agent in the step definition. Note the Binding button. The binding _WI_ObjectId > &ABSENCEFORM& has been automatically defined here by the system. This binding ensures that the reference to the notification of absence created is not only known in this task, but also in the workflow. Now the Workflow Builder screen looks like
Step 5: 1st Test in SAP Inbox (Tcode SBWP) When the workflow runs it creates work items which are like emails in the SAP Inbox. When it is executed it calls the respective task or transaction screen with the correct data. Execute your workflow: The notification of absence form is displayed.
http://scn.sap.com/docs/DOC33625
5/13
6/25/2015
SAP Workflow my first workflow | SCN
Do not make any entries and do Not Save. Instead, choose Cancel. You have now started the workflow but canceled the processing of its first step.
Your workflow inbox now contains one work item for processing. This is the work item for creating a notification of absence, the processing of which you canceled previously. You have to select your work item with the subject as the work item text you have given. Select the work item, and choose execute (F8). You return to the Create notification of absence screen where the notification of absence form is displayed. Fill out the form and choose Save. The work item disappears from your workflow inbox.
http://scn.sap.com/docs/DOC33625
6/13
6/25/2015
SAP Workflow my first workflow | SCN
Step 6: Define 2nd Customer task (Check notification of absence) This form formabsenccreate you created before will now be sent to supervisor for approval using the object formabsencapprove object. Create another task using PFTC_INS:
Note the checkbox Confirm end of processing. Step 7: Add activity > second task in worflow Include Task: Check Notification of Absence in the Workflow. We have Task code as TS99500545. Check the binding properties
http://scn.sap.com/docs/DOC33625
7/13
6/25/2015
SAP Workflow my first workflow | SCN
We need to create the Approver variable in the workflow container. (left side – bottom, you will see a menu option Workflow container– ) Make the following entries for object &Approver&: Element: Approver, Name: Approver, Description: Approver of the absence request, Reference table: WFSYST, Reference field: AGENT. and use the object &absenceform& already there. For Agents Choose Position. Select your position by the name you have created in the organization. You can note down the id of your position from your organization (Tcode – PPOCE) as S50001707. (Don’t provide S in the text field).
We can also implement deadline in activities using Latest end, Requested Start, Latest start, Requested end. For e.g. If the superior has not made the decision about the leave request, the requester should be notified. Once the deadline (for e.g. latest end) passes, a work item for missed deadlines appears in your Business Workplace notifying you of the missed deadline.
http://scn.sap.com/docs/DOC33625
8/13
6/25/2015
SAP Workflow my first workflow | SCN
Now, You will see that two branches are now inserted in your workflow definition for the two marked outcomes Approved and Rejected. Step 8: 2nd Test Choose execute the workflow. You go to the screen Create Notification of Absence.
When the workflow is started, the work item for creating the notification of absence is provided to you directly for processing. This is because of advancing with immediate dialog. You were introduced to this in the first test. Fill out the form and choose Save. You now go to the screen of Business Workplace > Inbox through the userid of superior/supervisor (head). The work items for you to process are displayed with their work item texts and certain other attributes. Select your work item for checking the notification of absence and Choose execute.
Either reject or approve the request. Notice the two buttons Approve and Reject.
http://scn.sap.com/docs/DOC33625
9/13
6/25/2015
SAP Workflow my first workflow | SCN
Step 9: Integrate User Decision for Resubmit
You can see that check Notification has two branches – Approved, Rejected. We will be adding a user decision to the outcome Rejected. With the user decision, the requester can decide to revise and resubmit the leave request if the head of department/supervisor rejects it.
Add the step type : User decision to the workflow.
http://scn.sap.com/docs/DOC33625
10/13
6/25/2015
SAP Workflow my first workflow | SCN
Now your workflow looks like
http://scn.sap.com/docs/DOC33625
11/13
6/25/2015
SAP Workflow my first workflow | SCN
Step 10: Third Test Again execute your workflow. Fill out the Form and Save it. The work item will disappear from your inbox. As a superior: Reject the application.
If the request is not approved, the next step in the workflow definition is the user decision. The requester (&WF_INITIATOR&) was entered as the agent for the step. The decision is therefore offered to you again as the requester. There will be two options: Revise request or Withdraw request. If you choose Revise request, that should take you to the resubmit form. That is our next step. Step 11: Define 3rd Customer task (Revise notification of absence) and add to undefined step at outcome Revise after the user decision.
Use FORMABSENCUPDATE as object. In the binding give
http://scn.sap.com/docs/DOC33625
12/13
6/25/2015
SAP Workflow my first workflow | SCN
_WI_Object_ID <= &ABSENCEFORM& In the Agents > expression give &_WF_INITIATOR& in the field. Step 13: Add 4th Customer Task (Send Notification)
You have created a complete workflow template with which a notification of absence can be created, approved and revised. Now you will insert a step in the workflow definition that sends a notification to the requester after the request has been approved. Choose Step "Send mail". Drag it to the Undefined Step after the outcome approved of the step Check notification of absence. Choose Recipient type – Organizational object, Choose Agents > Expression Choose &_WF_INITIATOR&. Enter the subject – < Leave Approved >. Enter the mail text – < Dear Colleague, your leave was approved. > Choose Enter. You will be asked for the name and abbreviation of a task. Fill up the fields. Other features that can be used in this example: Integrate Step: Until loop to the workflow, Adding Container Operations which sets the value of flag, Modify Customer Tasks (Confirm end of processing), Implement deadlines in activities. Other types of step types which can be used in the workflow are Activity, Process Control, Condition, User decision, Document from template, Container operation, Event creator, Multiple condition, Fork, Undefined step, Loop (Until), Wait step, Loop(While). For more information, visit SAP Workflow help homepage.
25139 Views
Products: sap_business_workflow Tags: sap, workflow
Average User Rating (8 ratings)
1
Share
Tweet
1 Like
2
3 Comments Omar Ali Jul 22, 2014 6:37 PM
Great blog, Vikas! Like (0)
Tiejun Cui Feb 3, 2015 6:29 AM
This is the best jumpstart material I have ever seen! Thanks Vikas! Like (1)
Vishnu Pankajakshan Mar 16, 2015 12:07 PM
great blog Like (0)
Site Index Privacy
Contact Us Terms of Use
http://scn.sap.com/docs/DOC33625
SAP Help Portal Legal Disclosure
Copyright
Follow SCN
13/13