Transcript
Page 1: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 1/13

Getting Started Newsletters Store   

Products Services & Support About SCN Downloads

Industries Training & Education Partnership Developer Center

Lines of Business University Alliances Events & Webinars Innovation

Log On Join UsHi, Guest Search the Community

Activity Communications Actions

Browse

1 Tweet 1

created by Vikas Gautam on 26Nov2012 10:19, last modified by Vikas Gautam on 05Dec2012 07:38

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 loadingpoints.You can arrange and manage the dependency of tasks. Users can be sent notification for the task waiting in the SAPinbox 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 tothe participants notifying them of what they have to do, and a single click on the notification calls the correcttransaction 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 flowWorkflow Builder: To generate the Workflow. The Workflow Builder provides a graphical view of the workflowdefinition.EventsBusiness Workplace: SAP InboxRole 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 resubmit 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:

SAP Workflow  my first workflow

Share 2Like

Version 2

Page 2: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 2/13

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 builder3. Define 1st task  (Tcode PFTC_INS) (Create notification of         absence)                                                                                                                                                                                                                                          4. Add activity > first task in the workflow5. 1st Test in SAP Inbox (Tcode SBWP)6. Define 2nd task  (Check notification of absence)7. Add activity > second task in workflow8. 2nd Test9. Integrate User Decision for Resubmit10. 3rd Test11. Define 3rd task  (Revise notification of absence)12. Add activity > third task to the workflow13. 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) 

Page 3: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 3/13

 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 smallbuttons/icons called step types. This we can drag and drop and insert into our worflow. We will be using the

Page 4: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 4/13

first step type which is like the  play button called activity for our Step 3: Create Notification ofAbsence.  Step3:   Define 1st task  (Create notification of absence)   Go to the Tcode PFTC_INS : Tasks: MaintainChoose Standard Task in the Task type field.Give the following values and Save the task. On saving it will give a code Id: like 99500654Name: Form_createdAbbr: create_formWork Item Text: vik_notif_absencecreateObject Type: FORMABSENCMethod:  CREATECheckbox Synchronous object method, Object method with dialog checked. Step 4: Add activity > first task  inworkflow                                                                                                                                                                                                                                       

Add the Step: Activity to your workflow.   in place of undefined step.  

We have created Task TS99500654 separately using PFTC_INS.  

Page 5: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 5/13

 Note the checkbox Advance with Immediate dialog. This means that the work item of the workflow is madeavailable for processing immediately. The user who starts the workflow is also one of the recipients of thisfirst work item. This is the case here because you entered the container element _WF_Initiator as the agent inthe step definition.Note the Binding button. The binding  _WI_ObjectId > &ABSENCEFORM& has been automatically definedhere by the system. This binding ensures that the reference to the notification of absence created is not onlyknown 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 therespective task or transaction screen with the correct data.Execute your workflow:The notification of absence form is displayed. 

Page 6: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 6/13

 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 ofabsence, the processing of which you canceled previously. You have to select your work item with the subject as thework 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 theform and choose Save. The work item disappears from your workflow inbox.

Page 7: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 7/13

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 objectformabsencapprove object.Create another task using PFTC_INS:  

Note the checkbox Confirm end of processing. Step 7:   Add activity > second task in worflowInclude Task: Check Notification of Absence in the Workflow. We have Task code as TS99500545.Check the binding properties 

Page 8: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 8/13

 We need to create the Approver variable in the workflow container. (left side – bottom, you will see a menuoption Workflow container– <double click to create>)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 cannote down the id of your position from your organization (Tcode – PPOCE) as S50001707. (Don’t provide S inthe 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 BusinessWorkplace notifying you of the missed deadline. 

Page 9: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 9/13

Now, You will see that two branches are now inserted in your workflow definition for the two markedoutcomes Approved and Rejected. Step 8:   2nd TestChoose 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 directlyfor processing. This is because of advancing with immediate dialog. You were introduced to this in the firsttest. 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. 

Page 10: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 10/13

 Step 9:   Integrate User Decision for ResubmitYou can see that check Notification has two branches – Approved, Rejected. We will be adding a userdecision to the outcome Rejected. With the user decision, the requester can decide to revise and resubmit theleave request if the head of department/supervisor rejects it.

Add the step type : User decision to the workflow.   

 

Page 11: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 11/13

Now your workflow looks like

 

Page 12: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 12/13

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 asthe 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  Reviseafter the user decision. 

 Use FORMABSENCUPDATE as object.In the binding give

Page 13: SAP Workflow - My First Workflow _ SCN

20/10/2015 SAP Workflow  my first workflow | SCN

http://scn.sap.com/docs/DOC33625 13/13

Follow SCNSite Index Contact Us SAP Help PortalPrivacy Terms of Use Legal Disclosure Copyright

Average User Rating

(8 ratings)

1 Tweet 1

_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 requesthas been approved.Choose Step "Send mail". Drag it to the Undefined Step after the outcome approved of the step Check notification ofabsence.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.

30511 Views   Products: sap_business_workflow Tags: sap, workflow

Share 2Like

3 Comments

Like (1)

Tiejun Cui 03Feb2015 06:29

This is the best jumpstart material I have ever seen! Thanks Vikas!

Like (0)

Vishnu Pankajakshan 16Mar2015 12:07

great blog

Like (0)

Katigiri Linganna 29Sep2015 14:06

Very good for Beginners.


Top Related