Professional Documents
Culture Documents
SAP Business Workflow IBM
SAP Business Workflow IBM
SAP Business Workflow IBM
DAY TOPIC
DAY1(4 hours) Introduction to Workflow
Workflow Architecture
Basic Workflow Template
Business object overview
Basic Business Object Program
Hands on (Create a Subtype and Delegate)
Question and Answer/Recap
DAY2(4 hours) Tasks
Types of Agents
Hands on (Raise Events and Rule as agent)
Basic Monitoring transaction(SWEL, SWI2_FREQ)
DAY4(4 hours) Hands on -Design workflow on Flipcharts and present to class. Class to be divided in 3 - 4 groups
This tool was introduced in R/3 Release 3.0A, and received a substantial facelift
in the Enjoy Release, 4.6A,which warranted the new name Workflow Builder.
Need of Workflow
2 I wonder who
approves buying this
stuff?
Hmm ! Time to put in a 3
purchase requisition request
4 Meanwhile, in
Time drags on . . . Mr. Manager’s office . . .
“What shall I do next?”
Drawbacks
Inefficiency.
Workflow ensures that the right work is sent to the right person at the
right time in the right sequence with the right information.
Tool for the automization of business processes
Not tied up to any paricular application
Operates uniformly accross applications
Coordinate all participating tasks
Provide users with active support
Intelligent routing
Workflow is best suited for participation in data creation by a collective set of people
Example: Vendor address by front end, Vendor account by General Accounting
Ensure Compliance
Monitor and Control Processes; Deadline Monitoring and
Escalation Procedures
8 Workflow Basic Training © 2007 IBM Corporation
IBM Global Business Services
Workflow Architecture
Workflow Architecture
Organisational
Level
Process Level
Business
Object Level
Workflow Definition
Workflow Definition
1. Basic Data
2. Information about triggering events
3. Initial Values
4. Containers
5. Bindings
Workflow Builder
The workflow definition is created in the Workflow Builder and displayed
graphically in a network.
Transaction: SWDD
Menu Path: Tools Business Workflow Development Definition tools
Workflow Builder.
From the structure of the 8-digit number, the system knows whether the
template is a standard template delivered by SAP or one created by the
customer.
Customer-defined templates start with the prefix number that was defined in
Customizing for the system and client.
Transaction: SWUS.
Menu Path: Tools -> Business Workflow -> Development -> Runtime Tools-
Tools-> Start
Workflow (Test Environment).
Business Object
The business object types are identified and described with their
object methods in the Business Object Repository(BOR) of the
R/3 System.
Interfaces
Each new object type automatically receives the interface IFSAP, the SAP
standard interface. IFSAP provides every object type with the following:
Method Display
Method ExistenceCheck
Attribute ObjectType
Key Fields
If the key field has a data type reference of a dictionary table field, the runtime
system will look to that table field to retrieve the value of the key when
processing the object. When the key field is created, the ABAP/4 program code
is generated automatically when the object type is generated.
Attributes
Methods
Methods
u lt
es
R
Import METHOD
Export
Parameters Parameters
Ex
ce
pt
io
ns
27 Workflow Basic Training Jan-2007 © 2007 IBM Corporation
IBM Global Business Services
–Synchronous / Asynchronous
Result:
Instance independence:
Exceptions
Exceptions
Events
Subtype
The subtype inherits all attributes, methods and events of the supertype and is
open for new customer-specific attributes, methods and events. The key fields
of the supertype and subtype must be identical. This means that any methods
and attributes defined on the parent can be executed and accessed on the
child object.
Delegation
This delegation is powerful because it lets you implement your own business logic
without modifying any SAP code. As long as the objects are properly delegated,
your method will be executed.
KNA1 ZKNA1
Calling Method: Method:
Program
Change password Change password
Methods Programming
BEGIN_METHOD <MethodID> CHANGING CONTAINER.
…..code
END_METHOD.
Ex : BEGIN_METHOD display CHANGING CONTAINER.
SET PARAMETER ID ‘MAT’ FIELD object-key-material.
CALL TRANSACTION ‘MM03’ AND SKIP FIRST SCREEN.
END_METHOD.
Container Marcos
SWC_CONTAINER <Cont>
SWC_CONTAINER_CREATE <Cont>
Transaction : PFTC
Menu Path -> Tools -> Business Workflow -> Development -> Definition tools ->Tasks
Tasks
Single-step tasks
The multistep tasks form the business framework for a workflow definition and
each references one workflow definition.
Defining a Task
Workitem Text
First create the workitem text and position the cursor to include a varible
Example
Processes request from &_WI_Object_ID.CreatedBy&
Workflow Steps
There are
1. Steps which refer to business activities (activities & user decision)
2. Steps which are used for internal process control and monitoring
(condition, multiple condition, loop, etc)
Activity
Can be a single step task with basic business functionality
Can be a multi-step task, which reference to a workflow definition
User Decision
This provides an opportunity for user interaction with the system.
The response to this decides the selection of the subsequent step.
Subworkflow
An activity which refers to a workflow rather than a task
Condition
Branch on the basis of control information from the runtime dependent
context of the workflow.
An attribute of this object can also be accessed for condition evaluation
Condition evaluation can be done by
Field comparison e.g constants , object attribute, system fields
Multiple condition
In contrast to condition, multiple condition makes it possible for the
workflow definition to branch in more than two branches.
Until Loop
Steps are processed repeatedly until the condition contained in the UNTIL step
is true.
Fork
Used for parallel processing branches.
Only a part of the parallel processing branches actually has to run to continue
the workflow.
Dynamic parallel processing is also possible
Send mail
Text entered in this step can be used to send a mail to the agent assigned
Container operations
Used to perform arithmetic operation of value assignment to workflow
container elements using constants and data in the workflow container .
Event Creator
An event is created when this step in the workflow is reached.
Other workflows can be started as a reaction to the event created in this
step. This event must be the triggering event of the relevant workflow tasks
and/or templates.
Types of Containers
Workflow Container
Task Container
Binding
7 9
sync sync
task method
11 10
8 role
12 13
async async terminating
task method event
15 14
Workflow Basic Training © 2007 IBM Corporation
IBM Global Business Services
Events
Event
Status Message
Change
Management Control
Document
ABAP Code
Specific
In User Exit
HR Tables
Menu Path :Basic menu -> Tools -> Business Workflow -> Development -> Definition tools
-> Events
This is using done by writing custom code e.g. by using SAP FM like
SWE_EVENT_CREATE inside user exits, BADI etc.
Anybody want
this event?
Event
Published
Events
Linkage
Receivers Creator
Workflow Basic Training © 2007 IBM Corporation
IBM Global Business Services
Transaction: SWE2
Menu Path :Basic menu -> Tools -> Business Workflow -> Utilities > Other tools >Event linkage
Agent
If the agents of the individual workflow steps are determined using the
customer-specific organizational chart, your agent assignment in the
workflow remains flexible to change.
Types of Agents
Notification Agents
Selected agents
Actual agent is the
are those possible
agents who are agent among those
elected to execute a selected agents who
task at runtime actually processes the
work item
Possible agents
User Position Job Org. Unit Person
Default role
Business
Workplace
TASK
Possible Agents
Triggering
Event
Task definition with
no default role
Triggering
Event All possible agents who
qualify to execute task
Task definition with
no default role
Rule Basics
Transaction : PFAC_INS(Create)
Menu Path: Tools – Business Workflow – Development – Definition tools – Rules for Agent
Assignment – Create/Change/Display.
Jones Smith
William
Ross
Areas of Responsibility
Value From From To Name Mr. Miller
A* K* Employees from A-Z
Role resolution with function module should be done only for complex criteria
Organization structure
Organizational Management
Positions can be linked to jobs. They inherit all the tasks assigned to
that job.
CreateExecutive
Create ExecutiveBoard
Board
Createroot
Create rootorganizational
organizationalunit
unit
CreateSales
Create Salesregion
region, ,Production
Production
Additionalorganizational
Additional organizationalunits
units
Administrator, ,Sales
Administrator SalesManager
Manager
Createjobs
Create jobs
SalesManager
Sales Manager––eastern
easternZone
Zone
Createpositions
Create positions
AssignHolders
Assign Holders
CreateSales
Create SalesOrder
Order
Assigntasks
Assign tasks
Transaction - PPOCW
Workflow Monitoring
The Event trace needs to be switched on for the event to be visible in the trace
The event had a start condition defined and the same was not met.
The evaluation of the check FM condition resulted to FALSE
Workflow log-SWI2_FREQ
SWI2_FREQ Contd.
The agents who have participated in the workflow is displayed here.
For all the background steps – agents is WF-BATCH
The screen displays the status of individual Workflow instance for the selected workflow
This displays the status of workflow or task. A complete blue cube denotes Complete status.
A partial blue cube denotes that the task is In Process status. A completely white cube denotes
a task in Ready status. A partially red cube denotes a task in Error.
The value for each container (WF or task) is populated can be viewed
Workflow QUIZ
QUIZ
SAP workflow can be used
(i) When work process have to be run repeatedly
(ii) Process involve several people or departments
(iii) Process include a range of activities
(iv) All of the above
QUIZ
Workflow builder is used for building
(i) Workflow template
(ii) Business object
(iii) Organization structure
(iv) Task
QUIZ
SAP Workflow uses the existing transactions and functions of the SAP System to form
new business processes – True/False
SAP provides several workflows that map predefined business processes which can
be used with simple configuration - True/False
QUIZ
Which transaction code displays the sap business workflow menu?
a) SWDD b) SWUD c) SWLD d) SWED
When we make a subtype of a standard sap business object which of the following
cannot be modified in the custom object.
a) Interfaces b) Key fields c) Attributes d) Events
Which of the following elements does the interface IFSAP not provide across all business
object types.
Method ExistenceCheck b) Attribute ObjectType c) Event Created d) Method display
Which of the following parameters is not mandatory when we create an event using
the function module swe_event_create?
a) Object key b) Object type c) Event name d) Event parameter(s)
QUIZ
To create a start condition for an event based on a parameter A, A must be?
a) A key field of the business object for the event
b) Event parameter for that specific event
c) Any field in the lead table for the business object type
d) An attribute of the business object.
9) Which of the following objects cannot have a instance linkage with an event?
a) workflow template b) standard task c) wait for event step d) create event step
10) Which is the very first step to build a parent workflow template?
a) Attach a triggering event b) Create object type container c) Create the workflow
definition in the builder d) Assign a workitem text to the template.
While checking the event trace if we get an entry with a red icon then this signifies?
The event has not been triggered b) the event type linkage is missing c) the event has raised an
exception d) the workflow has gone into error
When we use rule resolution to determine agents, the rule container receives its data from?
workflow container b) task container c) method parameters d) event container
In which of the following workflow step we cannot check a condition to determine the
process flow.
a) Loop until b) Fork c) Wait for event
110 Workflow Basic Training Jan-2007 © 2007 IBM Corporation
IBM Global Business Services
QUIZ
Why do we need an event linkage?
State difference between single and multi task. Give a example when each can be used
What is the different between possible agent, selected agent and actual agent?
What it _EVT_OBJECT
QUIZ
In a particular workflow scenario suppose that I have 5 agents A, B, C, D & E.
Agents A, B & C are defined as possible agents for a dialog task (through agent
assignment in the task), agents A, C, D & E are determined through the default rule
specified in the task definition and agent E is specified as an excluded agent in the
step definition of the dialog task in the workflow template. Then which of the
following is false.
Thank you
Questions?
Comments?
Suggestions?
Within Enterprise