You are on page 1of 13

How to Create a Basic SAP Business Workflow

With SAP Business Workflow, SAP AG provides an efficient cross-application tool enabling integrated electronic management of business processes. SAP Business Workflow is a solution which has been integrated full in the !"# S stem and which enables customer-specific business process flows to be coordinated and controlled on a crossapplication and cross-work center basis. SAP Business Workflow therefore enhances $read -made$ application software. %he SAP Business Workflow definition environment can represent business processes simpl and can respond to changing e&ternal conditions 'uickl , even in a live s stem, b adapting the e&isting business processes. %he definition and e&ecution of a workflow can be divided into four main areas. A user e&ecutes workflows in their Business Workplace where the work items that the can e&ecute are displa ed. A workflow must be defined to be e&ecuted. %o this end, a workflow definition is created in the Workflow Builder. %his definition contains steps that are e&ecuted at runtime. %he step either control the workflow directl or the contain a reference to a task. %he task refers to a method of an ob(ect t pe in the Business Object Repository )B*!+ and can be e&ecuted at runtime either automatically )background task+ or b a user )dialog task+.

Business Workplace and work items


Work items are displa ed to the user for e&ecution in their Business Workplace. Work items are instances of a workflow at runtime. %heir are various t pes of work item. *nl certain t pes are displa ed in the Business Workplace.

Workflow and workflow definition


A workflow must be defined before it can be e&ecuted. %his workflow definition s made up of steps that control the workflow or refer to the tasks to be e&ecuted. ,ou can make additional specifications about agents and deadline monitoring for a step. %hese specifications are evaluated at runtime b the work item manager. %he workflow is started either manuall or b the s stem at runtime. -or the s stem to start a workflow, the workflow definition must contain a triggering event )for e&ample the event $material created$+. When the event occurs, the relevant workflow is started automaticall . When ou activate a workflow definition , ou automaticall generate a runtime version. When the workflow is started )manuall or automaticall +, the relevant runtime version is used for the e&ecution. .f the workflow definition is changed later and a new runtime version is generated, these changes do not affect workflows that are alread being e&ecuted.

Tasks
%asks describe elementar business activities. %asks alwa s refer to a method of an ob(ect t pe. Possible agents are defined for tasks. %asks can refer to automaticall e&ecutable methods )background tasks+ or the can need a user to e&ecute them )dialog tasks+.

Object types and objects


An object type describes the data with which ou want to work in a workflow, for e&ample the ob(ect t pe Material . An object is an individual data record of an ob(ect t pe. Attributes are defined for an ob(ect t pe, which make up its data record )for e&ample, material name or material number+. /ach ob(ect t pe has methods, in which activities are defined, which can be e&ecuted with the data )for e&ample, create material+. %he transactions and functions of the !"# S stem can be called in a method as can our own transactions or other applications. %he last important component of an ob(ect t pe are its events. %hese describe the status changes that an ob(ect can undergo )for e&ample, material deleted or material changed+. A workflow can be started b an event of this kind being triggered. %he Business Object Repository provides an overview of all ob(ect t pes in the !"# S stem. ,ou can use or e&tend the e&isting ob(ect t pes as well as create new ob(ect t pes.

Demo E ample! Processin" a #otification of Absence $B%& B'T&W(')


Purpose
%his workflow template demonstrates how to process a notification of absence. .t can be used as an e ample for demonstratin" SAP Business Workflow functions , and is particularl suitable for training courses.

Process (low
An emplo ee enters a notification of absence )leave re'uest+ in the !"# S stem b filling out the relevant input template. %he direct superior of t*e employee is responsible for approving or re(ecting the notification of absence. %he !"# S stem determines the direct superior automatically on the basis of the organi0ational plan maintained. .f the re+uest is appro,ed the creator is notified b mail1 .f the re+uest is not appro,ed, the creator is informed and can decide whether to withdraw the notification of absence or revise it. .f the superior has given reasons for the re(ection in an attachment, the creator can take these into consideration.

.f the creator re,ises the re'uest, it is submitted to the superior for approval again. %he applicant can also add an attachment, which can then be accessed b the superior. %his c cle is repeated until either the superior approves the leave re'uest or the creator withdraws it. %he applicant can find out the current processing status at an time b looking in their workflow outbox.

Tutorial! Workflow 'odelin"


Purpose
%his tutorial uses an e&ample in a series of eas -to-follow units to e&plain the most important tools in SAP Business Workflow. %he e&ample used here is based on a scenario for appro in! a notification of absence. At the end of this tutorial, ou will have defined and e&ecuted a workflow that automaticall submits a notification of absence )leave re'uest+ to our superior for approval, and informs the re'uester of the result of the approval process. ,ou will become familiar with the following areas of SAP Business Workflow throughout the course of this tutorial1 2efinition tools Business Workplace !eporting and anal sis tools 3sing the Workflow Builder

%he tutorial is not intended to provide a full description of all functions and concepts. %his information is available in the documentation on SAP Business Workflow. %his tutorial does not deal with the definition of ob(ect t pes. .f ou want further information on this sub(ect, please work through the tutorial on Workflow Programming.

Process (low
Work through the individual units in this tutorial in the specified order. .mportant units are followed b tests that ou can use to test what ou have learned to date. Please make sure to complete these tests.

Result
E ample & t*e notification of absence
%he scenario in this e&ample begins with the completion of a leave re'uest b an emplo ee )re'uester or creator of the notification of absence+. %he completed form is then forwarded automaticall to the head of department )emplo ee4s superior+. .f the head of department approves the re'uest, the emplo ee receives a notification and the workflow is terminated. .f the head of department re(ects the re'uest, the emplo ee can decide to revise the re'uest )possibl in accordance with the head of department4s wishes+ or withdraw it. .f the emplo ee decides to revise it, the re'uest form is resubmitted to the head of department after the revision is made.

%he diagram above shows that additional steps could follow the approval, such as updating the leave account, or notif ing the secretar . %hese steps, however, do not arise in this e&ample.

All of t*e units at a "lance


%he diagram below shows all of the units in this tutorial. Similar units are listed in the same column.

-or complete help look1 http1""help.sap.com"saphelp567c"helpdata"/8"96":;7f<=67f#>>d><:6?9999e<;:fbbd"frameset.htm

Step&by&Step
!un %ransaction PP*@/ >. -ind our Aompan )A><9 will be used in this e&ample+. -ind the Sales and @arketing *rgani0ational 3nit. We will assign SAP 3sers to the BP of Sales and @arketing and to Sales !ep Aentral positions. ;. !ight Alick on the BP of Sales and @arketing, and select Assign, from the menu. #. Select Colder-3ser from the menu. -ind and select our 3ser Account. 6. !epeat steps ; and # for the Sale !ep Aentral position )assign the same user so ou can receive all messages in this workflow e&ercise+. =. ,our screen will look like this1

!un transaction SW22 )Workflow Builder+ >. 2rag and drop the activit .con in the Step % pe are to the 3ndefined step in the Graphical @odel ;. .n the Aontrol tab, click the %ask field, click and arrow to Areate a 8ew %ask. #. %he Standard %ask window will appear. % pe the information as shown in the screen below )e&cept use our own numbers in place of ><9+

6. -rom the Additional 2ata menu, select Agent Assignment @aintain and assign the Sales !ep ><9 )central+ position )as shown below+

=. Save the data. .n the Areate *b(ect 2irector /ntr , click on the Docal *b(ect button. 7. Go back to the Workflow Builder and click on the Binding )does not e&ist+ button. %hen define the following binding1

?. Save our workflow. Give it a name like WS5.5><9 and make sure it is a local ob(ect. <. Det4s create another Activit and another task for the @anagerial step )approves or re(ects the re'uest+, as shown below1

:. @aintain Agent Assignment as shown below1

>9. Save it )select local ob(ect as in the previous task+. >. ,ou need an additional container element in the workflow container to store the name of the user who will e&ecute this step. %his user name is to be used later in the notification te&t that is sent to the re'uester. Ahoose the Workflow Aontainer )left side+ and then select the entr E "ouble#click to create$ b double-clicking in the Workflow %ontainer. %he dialog bo& for entering a container element is displa ed. @ake the following entries and save1

&&. >;. Ahange the Binding to include the following1

>#. Build )Generate !untime Bersion+ and %est our workflow.

>6. %C/ /82.

You might also like