Professional Documents
Culture Documents
WORKFLOW
It is the automation of business procedures during which documents, information or tasks
are passed from one participant to another in a way that is governed by rules or
procedures.
STEP TYPES
ACTIVITY
WEB ACTIVITY
The selected container elements are posted using the http protocol in an XML
or SOAP message. This step can also wait for a message reply.
DOCUMENT
FROM TEMPLATE
LOOP (UNTIL)
LOOP (WHILE)
SEND MAIL
The text entered in this step type is sent as an E-Mail. The task
required and the necessary bindings are automatically created by the
workflow system.
CONDITION
MULTIPLE
CONDITION
The system waits for a specified event. The workitem is only completed if
the expected event occurs. Data from the event container can be sent to the
workflow container using a binding.
CONTAINER
OPERATION
FORK
UNDEFINED
PROCESS
CONTROL
The functions Cancel work item or Set work item to obsolete are applied to
other Work items of the current workflow. It will be useful to cancel any
previous work item.
USER DECISION
AD HOC ANCHOR
SUB WORKFLOW
For Attributes:
GET_PROPERTY <Attr.> CHANGING CONTAINER
Start of a virtual attribute implementation
GET_TABLE_PROPERTY <TABLE NAME>
Start of the database attribute implementation
END_PROPERTY. End of an attribute implementation.
For Method:
BEGIN_METHOD <METHOD> CHANGING CONTAINER
Start of a method implementation
END_METHOD
End of a method implementation
For Object Key
SWC_SET_OBJECTKEY <Object Key>.
Sets the object key of the current object. Usually only instance independent
methods use this to return a reference to an object instance of the current
object.
SWE_SET_DELEGATION
To delegate.
FUNCTION MODULES
RH_ACT_LEADING_POSITION
RH_GET_LEADING_POSITION
RH_GET_ACTORS (SUPERIORS)
RH_GET_ADDRESS
SWX_GET_MANAGER - Gives the Superior(output from FM)of the user (input to FM).
RH_GET_STRUCTURE
SWD_WFD_REPLICATE_FROM_9999 (When Standard Wf is not there. Execute this
Function Module with IM_TASK = Workflow Number)
ORG. ENVIRONMENT
RH_WF_OM_INDICES_TIMESTAMP_RFS
RH_TASK_INBOX_VIEW_REFRESH
RH_TASH_AGENTS_INDEX_REFRESH
_Wf_priority
_Wi_group_id
_Workitem
_Wf_version
EVENT TRIGGERING
FUNCTION MODULE
SWE_EVENT_CREATE
or
SAP_WAPI_CREATE_EVENT(External
Commit)
are
Message control
Event creation as message type
SWUY, SE91
SWU_EWBTE
Transaction Events
Business
TDEVC
TOJTT
TOJTB
TOJTD
T7791
BDCP
CDHDR
CDPOS
SWECDOBJ
SWECDVALUE SWWWIAGENTSWDSHEADER SWD_WFCONTSWWBINDEF SWWUSERWI SWWWIAGENTSWFAWRKITM DM40L
SWW_OUTBOX
SWW_CONT
SWW_CONTOB
SWWLOGHIST
SWWORGTASK
SWWUSERWI
SWWWIHEAD
SWWWIRET
SWWWIDEADL
SWEINSTCOU
SWZAI
SWZAIENTRY
SWPSTEPLOG
Change Pointer
Change Document Header
Change Document Items
Events for Change Document
Field (Values) for Event Linkage
Agents for Execution of a Work Item
WF. Definition Basic Data (To find WF created Date)
WF. Definition Container
Obsolete - Workflow Runtime(Save Binding Definitions)
Current work items assigned for a user.
Agents for Execution of a work Item.
WF. Work Item for Reporting (Structure)
DM Data Model
-Lists Workflows in outbox together with status
-Container Contents for Work Item Data Container
-Container Cont. for Work Item Data Container (Only Objects)
-History of a work item
-Assignment of WIs to Org.Units and Tasks
-Current Work Items Assigned to a User
-Header Table for all Work Item Types (To find WI created Date)
Workflow Runtime: Return Values of Method Call
Workflow Runtime: Deadline Data for Work Items
Instance Linkage Event Receiver
Header Table for all Properties of a Work Queue
Object Table for Work Queues (Entries)
Workflow: Instance Data of Steps of a Workflow Execution
HRUS_D2
SWDSCONT
REPORTS
WORKFLOW TRANSACTIONS
AWUV Wizard for event creation Def.tools Event creation Set up with wizard
MCA1 Workflow Info. System Reporting Workflow Information System (WIS)
OOAW Evaluation paths
SWLV View for maintaining Views
PFAC Maintain standard roles
PFOM Maintain assignment to SAP organizational objects Definition tools SAP
org. objects Create assignments
PFOS Display assignment to SAP organizational objects Definition tools SAP
org. objects Display assignments
PFSO Organizational environment of a user
SWLV
SW01
SW06
SWU0
SWU2
SWU3
SWU4
SWU5
SWU6
SWU7
SWU8
SWU9
SWUD
SWUE
SWUF
SWUI
SWUS
SWUY
SWUP
SWUR
SWUT
SWUU
SWUV
SWUW
SWUX
SWUY
SWU10
SWUA
SWUB
SWUC
SWUD
SWUE
SWUG
SWUI
SWUK
SWUL
SWUN
SWX1
SWX2
SWX3
SWX4
SWXF
11
AGENTS
E
12
APPROVAL PROCEDURE
Hierarchical Approval
Parallel Approval
Circular Approval
Dynamic Circular
Parallel Circular
HIERARCHICAL APPROVAL workflow, the first agent must agree, before the second agent can
decide. Since the workflow can be terminated by any agent, it is very important that the
hierarchy be respected (lower positions first, higher positions last).
EXTENDED HIERARCHICAL APPROVAL workflow is similar to a hierarchical Approval workflow,
except that several users are involved at each approval level. Only some of them are
authorized to actually approve or reject the object at each level. The other users are only
authorized to propose that the object be approved or rejected.
DYNAMIC HIERARCHICAL APPROVAL WORKFLOW, the object type to be approved and the
approval task are determined at definition time. However, the depth, and the number of
approving users are determined dynamically at run time. Once a recipient does not approve
the object, the recipients higher in the hierarchy do not receive the object for approval.
PARALLEL APPROVAL WORKFLOW implements majority decisions of the form n from m. If the
necessary number of n agreements required for an approval or rejection is reached, then
the object is considered approved or rejected respectively.
CIRCULAR APPROVAL WORKFLOW can be used to send a circular (MS word document etc.)
sequentially to several users (or positions, jobs, or organizations) who can view it and make
comments if necessary. All the recipients of the circular are defined in the workflow
definition.
DYNAMIC CIRCULAR WORKFLOW is similar to a circular approval workflow, except that the
users who are to view the circular, are defined dynamically at runtime, rather than in the
workflow definition.
PARALLEL CIRCULAR APPROVAL WORKFLOW is used to send a circular to several users. The
recipients of the circular could be either defined in the workflow definition, or dynamically,
at runtime.
DYNAMIC PARALLEL CIRCULAR APPROVAL WORKFLOW is used to send a circular to multiple
users at the same time, for their information and approval. The list of recipients is not
defined in the definition of the workflow. The list comes as a dialog box when the workflow
is initiated, and the user dynamically selects the recipients.
13
BINDING
Binding involves the specification of assignment rules as to how the data is to be exchanged
between two containers. At runtime, these binding definitions are executed, making
workflow execution possible. The following are the possible binding definitions:
TASKS
The following are the types of tasks:
Standard task Client independent task (single-step task(TS)).
Customer task Client dependent Task (single-step task (T)).
Workflow task Multi-step task (WS).
Workflow template As a framework for defining a workflow.
Task group (TG) are defined, to group standard tasks and workflow templates that are
logically related. You can also collect other task groups within a task group, hence making
hierarchies of task groups. A standard task or workflow template can be used in several task
groups.
If a workflow was been correctly triggered and started at least one WORK ITEM
should be created. You can view the work items in transaction SWI1, Work Item
Selection. The easiest way for the selection is just to go into this transaction after
you have checked the event log. By default all the work items of the last hour will be
displayed. You will find in this transaction the work item number, the status of the
work item and the workflow task that has created the work item. Furthermore, (in
the technical workitem display) you can have a look at the container by selecting a
work item and using the menu GOTO -> CONTAINER. To display the work item
details double click on the item. From the details you can see the selected/
possible/excluded agents for this work item by using the menu GOTO -> AGENT ->
SELECTED/POSSIBLE/EXCLUDED AGENTS.
When the status of the work item shows an error you should have a look at the
workflow log using the menu EDIT -> DISPLAY WORKFLOW LOG. Here you can see
errors that have occurred.
PFTC/SWDD : Task editor/Workflow Builder
If you want to have a look at the definition of the workflow you can use transaction
PFTC, Maintain Tasks. The button WORKFLOW BUILDER brings you to a graphical
display of the workflow structure, which is fairly easy to read and understand. On the
tabstrip TRIGGERING EVENTS you can check if the triggering is activated or not and
deactivate/activate it by clicking on the icon in front of the event.
OOCU : Customizing overview
To check if the relevant tasks are activated and users are assigned, you can use
transaction OOCU; Task Customizing Overview. In this transaction all the tasks are
sorted by the application components and are thus easy to find. Note that if you
have almost no entries in this transaction, you should execute
the report
RS_APPL_REFRESH in transaction SE38.
SWUE/SWUS : Event/workflow trigger
If you have activated a user exit, e.g. for the role determination, and you have
problems with that, you most probably have to debug the workflow. This can be
done using the transaction SWUS or SWUE.
With SWUE you can create an event. After you entered object type and event you
have to fill the event parameters and the key for a specific object. If you want to
debug the workflow you have to set the flag TRIGGER RECIEVER FM SYNCHR. If you
have set a break point in your user exit or in any other function module of the
workflow the system will stop at this break point and you can start analyzing.
The second possibility to debug a workflow is to use the transaction SWUS, the
workflow test environment. In this transaction you have to enter the workflow task
and fill the input data. Please use the F4-help to fill the input data. Here again you
have to set a break point in your user exit or in any other function module of the
workflow and then the system will stop there.
Summary of the manual alternative to SWUD
Now that you have a better understanding of how to use these transactions, you can
follow the steps below to quickly analyze your workflow problems:
1.
Go to transaction SWU3 and check if everything is okay. If it is not, please fix
it before you proceed.
2.
Go to transaction SWEL and check if an event is created. If not, check in
transaction SWELS if the event log is activated.
If you see an event but no workflow is triggered, proceed with step 3.
If you see an event and a workflow is triggered, but the status of the
triggering shows an error, proceed with step 3.
If you see an event and a workflow is triggered and there is no error,
proceed with step 4.
If the event log is activated and you do not get any event, open up a
message using the component of the application to which the business
16
object type belongs. From release 20C for creation of shopping carts the
architecture of workflows changed and no events are visible!
3.
Go to transaction SWU0 and simulate the event. Is the workflow that you
expect to be triggered visible in the simulation?
If it is not, then check the workflow definition in PFTC. The event must be
defined as triggering event.
If it is, but the event linkage is not activated, go to transaction OOCU and
activated it.
If it is visible, but it is not activated, go to transaction PFTC and activate
it.
4. Go to transaction SWI1. Search for the work item that belongs to the workflow.
Check the status of the work item.
17
BUSINESS OBJECTS
BUSINESS OBJECT
DESCRIPTION
GENERAL
DECISION
SOFM
SW
TRANSACTION
CHANGE
DOCUMENT
PURCHASE RELATED
BUS2010
BUS2011
BUS2012
BUS2105
LFA1
BUS1001
BUS2013
BUS2014
BUS2081
BUS2081
RFQ
VENDOR QUOTATION
PURCHASING ORDER
PURCHASE REQUISITION
VENDOR MASTER
MATERIAL MASTER
SCHEDULING AGREEMENT
PURCHASE CONTRACT
INCOMING INVOICE
PARKING
SALES RELATED
BUS2030
BUS2032
LIKP
BUS1065
BUS0012
BUS2094
CUSTOMER INQUIRY
SALES ORDER
OUTBOUND DELIVERY(SHIP)
HR Master data
Cost Center
CREDIT MEMO
ME41
ME47
ME21
ME51
MK01
MM01
ME31L
ME31K
MIRO
MIR7
EINKBELEG
EINKBELEG
EINKBELEG
BANF
KRED
MATERIAL
EINKBELEG
EINKBELEG
VA11
VA01
VL01
PA30
KS12
FB75
VERKBELEG
VERKBELEG
LIEFERUNG
-- NO --KOSTL
LIEFERUNG
CC01/CC31
AENNR
BUS1005
BUS2080
BUS2088
BUS2091
BUS2129
Service
Service
Service
Service
Service
notification
order
entry sheet
order confirmation
MASTER DATA
BUS1006
BUS1178
BUS2300
Business Partner
Product
Product Catalogue
18
WORKFLOW - FAQS
Can we define methods
without function module?
How
will
Exception?
raise
the
1.Using Macro
BEGIN_METHOD <MethodID> CHANGING CONTAINER
END_METHOD.
2.Create method-using API
Organizational Unit Each unit represent a group of people such
as a team, section, department, work area, laboratory.
Jobs Each job describes a functional role within the organization.
Positions each position represent the headcount placement
User Each user is the actual user Id of a person in your
organization.
Task Description of an activity in organizational management
which is Performed with in the organizational unit
Task group - is a hierarchical combination of tasks that are related
logically
local
This step enables you to trigger a local event. A local event can, for
example, start a local Workflow.
You define local events in the version-dependent basic data of the
Workflow.
Interfaces
Key fields
Attributes
Methods
Events
ABAP dictionary reference table/reference field
Object type Inverse attribute
What is a workflow
template?
SWE2.
Object key.
19
SWE_EVENT_CREATE,
SAP_WAPI_ CREATE_EVENT.
SWUE
Role (PFCG) assigns agents at Static Mode and gives the authority
check
A multi task is a formal framework for a workflow definition. When
you create a workflow directly in the in the workflow builder, the
multi step task is created by the system.
It can be divided in workflow template and workflow tasks.
Single Step Tasks:
Standard task (task type TS)
Customer task (task type T)
Multi Step Tasks:
Workflow template (task type WS)
Workflow task (task type WF)
Task group (task type TG)
Manually
Calling a Start Transaction
Calling a Form Transaction
20
Binding
Work Item
1. READY : Usually applies to work items. The work items has been
created and is activated but has not been executed yet. It is
sitting in a users inbox but they have not opened it yet.
2. SELECTED : Appears in the work item displays as in process.
Usually applies to work items. The work item has been opened
or reserved by a user but has not yet been executed.
3. COMMITTED:
Appears in the work item display as executed.
Usually applies to work items. The work item has been
executed, but is waiting for the user to mainly confirm the end
of processing. Via a set to done option.
4. COMPLETED : The workflow or work item is completed. No further
changes can be made once completed.
5. WAITING
6. STARTED
7. ERROR
8. CANCELLED
9. CHECKED
10.EXCPCAUGHT EXCEPTION CAUGHT
11. EXCPHANDLR EXCEPTION BEING HANDLED
It assumes process control for the duration of its execution and
report backs to the calling component after its execution.
Background processing
Return Parameters, One Result, Exceptions
It does not report back directly to the calling component after its
execution. Dialog Step
No return Parameters, One Result & Exceptions
Synchronous Method
Asynchronous Method
Synchronous Method
Asynchronous Method
Dialog step
Release strategy
Possible Errors
The workflow didnt start at all because the triggering event was
not raised or failed to start the workflow (or) then workflow
hangs in the middle of the process waiting on a terminating
event that never happens.
Check Function Module
Event Creator give condition (avoid WF Triggering)
SWB_COND => Maintain WF start conditions. There assign the
values based on the business object and event we used. Its not
available in release prior to Release 4.6C.
Use SWWL transaction
Use RSWWWIDE Standard Report
Use Process Control Step in Workflow template
Use SWUF (Workflow Admin)
SWW_WI_START_SIMPLE is the Function Module used for
triggering workflow from ABAP.
(Try also SWW_WI_CREATE_VIA_EVENT)
In an Activity, just call the workflow, as u calls the task
SWEC
SWE2
SWB_COND
User
Organization Unit
Position
Role
Rule
Work Center
Applicant
Job
Location
Cost Center
Customer
Person
Task Group
Transaction
Company
User Group
Work Area
Workflow Event
Workflow Task
Workitem
Task
22
ACTIVITY
ADVANCE
WITH
IMMEDIATE DIALOG
AFTER METHOD
AGENT
APPROVAL TASK
ASYNCHRONOUS
METHOD
ATTACHMENT
ATTRIBUTE
BACKGROUND
WORK ITEM
Step type in a workflow definition for executing a task at runtime. The task can
be a single-step task (customer task/standard task) or a multistep task
(workflow task/workflow template).
At runtime, an activity is represented by a work item of one of the following
types:
DIALOG WORK ITEM (TYPE W)
BACKGROUND WORK ITEM (TYPE B)
WORKFLOW WORK ITEM (TYPE F)
Execution property of the workflow system. A work item for which this indicator
is set is executed immediately, if the actual agent of the preceding dialog work
item is also a recipient of this work item.
This user does not have to call their Business Workplace to execute the work
item.
Method that is executed after the task's method, synchronously and on the
same screen, during execution of a dialog or background work item.
The method can be any object method in the Business Object Repository. It
does not have to refer to the same object as the task's method.
If the work item is executed several times (say, for example, the terminating
event has not yet occurred), the after method is also executed several times.
Umbrella term for a system user who participates actively in SAP Business
Workflow and executes work items.
There are various types of agent:
CURRENT AGENT
RECIPIENT
RESPONSIBLE AGENT
EXCLUDED AGENT
POSSIBLE AGENT
Single-step task that executes an approval method with a result. The result
must be able to assume at least two values, one of which stands for approval
and the other for rejection of the object to be processed.
For an extended approval, the approval method must be able to assume two
more values, one for proposed approval and the other for proposed rejection.
Method that does not report back directly to the calling component (in this case
the work item manager) after its execution. It does not return any result, any
parameters or any exceptions. (Except System Error & Application Error)
At least one terminating event must be defined for a single-step task described
with an asynchronous object method.
An asynchronous method must enter its results itself. Import parameters can
be passed to it only. At runtime, the relevant work item is only completed if
one of the defined terminating events occurs.
Additional information for a work item, which can be entered by the current
agent of the work item. Attachments are displayed to the agents of the
subsequent steps of a workflow in read-only form.
Attachments can be SAPscript editor texts or PC application documents.
Object type component: Property or characteristic of an object.
The attributes of an object are defined and implemented as part of the object type definition
in the Business Object Repository. Value of ABAP Dictionary field
OBJECT REFERENCE
VALUE CALCULATED AT RUNTIME
OBJECT STATUS IN STATUS MANAGEMENT
Work item representing a single-step task whose execution does not require
any dialog and can therefore be controlled by the system.
Work items of type B are not displayed in the Business Workplace, but can be
found using the selection report for work items of all types.
23
BEFORE METHOD
BINDING
BUSINESS
WORKFLOW
EXPLORER
CHECK
FUNCTION
MODULE
COMPOSITION
CONTAINER
CONTAINER
DEFINITION
Method that is executed before the task's method, synchronously and on the
same screen, during execution of a dialog or background work item.
The method can be any object method in the Business Object Repository. It
does not have to refer to the same object as the task's method and it cannot
create the object.
If the work item is executed several times, (say, for example, the terminating
event has not yet occurred), the before method is also executed several times.
Assignment of values to a container element at runtime.
The assignment rules to be observed are first defined in the binding definition.
Tool for:
DISPLAYING ALL TASKS ASSIGNED TO A SELECTED SEARCH RANGE
EDITING THESE TASKS
CREATING NEW TASKS
The search range can be restricted according to the following criteria:
APPLICATION COMPONENTS
TASK GROUPS
LOCAL TASKS
SAP PHONE TASKS
TASKS LAST PROCESSED
TASKS ASSIGNED TO PARTICULAR TASK GROUPS
Function module called SYNCHRONOUSLY IN THE LUW of the event receiver by
the event manager directly before the actual receiver function module is called
if: An event receiver was established, and The name of a check function
module is specified.
The check function module has the same interface as the receiver function
module. This means that the content of the event container can be checked
and the calling of the receiver function module prevented. If the check function
module terminates with an exception, the receiver function module is not called
and the linkage between the event and the receiver not created.
There
is
a
template
check
function
module
called
SWE_CD_TEMPLATE_CHECK_FB in the function group SWE_TEMPLATE.
"Is part of" relationship between object types.
The superordinate object type in this relationship is known as the "aggregate
type".
In the composition, the "part" object type's key is an extended version of the
key of the aggregate type, and the object type has a completely different
functionality from that of the aggregate type.
Example
The object type order item "is part of" the object type order.
The object type order is then the aggregate type of the object type order
item.
Basic common data structure of the various definition and execution
components of SAP Business Workflow.
Containers have container elements for holding the following:
VALUES (CONSTANTS)
STRUCTURES
OBJECT REFERENCES
The container elements can be used to control the execution of work items and
workflows.
General information about the structure of the data to be stored in a container.
A container definition specifies the elements included in a container and the
properties of those elements (ID, name, data type).
A container is always defined when working with one of the definition tools
(OBJECT TYPE DEF., ROLE DEF., TASK DEF., AND WORKFLOW DEF.).
24
CONTAINER
ELEMENT
CONTAINER
OPERATION
CREATION
DATE/TIME
CUSTOMER TASK
DATA
REFERENCE
TYPE
DATABASE
ATTRIBUTE
FIELD
DEADLINE
MONITORING
DECISION TASK
DEFAULT
ATTRIBUTE
DEFAULT METHOD
DEFAULT ROLE
DELEGATION TYPE
(SWO6)
DIALOG
ITEM
WORK
DOCUMENT
DOCUMENT
TEMPLATE
FROM
END
ENTITY TYPE
EVALUATION PATH
EVENT
Method of an object type, which is entered in the basic data of the object type
on the tab page Defaults.
The default method is often a method for displaying the object. The default
method can de executed by double-clicking on an entry in a list, for example.
Every object type has a default method. The method Display is proposed for
new object types.
Agent information specified when a single-step task is defined in addition to the
assignment of the possible agents.
If the single-step task is included as an activity in a workflow definition and
responsible agents are defined there, the default role is not evaluated.
Object type whose definition is considered at runtime instead of the definition
of another object type, although this other object type is specified in all
definition components (for example task and workflow definition, linkage
tables). In all definition tools you can still refer to the original object type, but
the system uses the definition of the delegation type for every access.
The delegation type must always be a subtype of the object type it is to
replace. The delegation type can have different or additional methods,
attributes and events.
A delegation type is always defined for an object type on a system-wide and
cross-client basis.
Type W work item that represents a single-step task at runtime, which requires
dialog with the user. Dialog work items are usually displayed in the Business
Workplace.
When a dialog work item is executed, the object method underlying the singlestep task is called. Dialog work item execution can be deadline-monitored.
Collective term for all types of information generated from an application
program.
The folowing are examples of documents:
SAPSCRIPT TEXT IN RAW FORMAT
MICROSOFT WORD TEXT IN DOC FORMAT
MICROSOFT POWERPOINT PRESENTATION IN PPT FORMAT
Step type in a workflow definition for creating documents on the basis of userdefined templates at runtime. The documents can be created with programs
that are installed on the local PC and are OLE-compatible, 32-bit, Windows
applications (for example Microsoft Word 97).
Date/time of end of processing of a work item.
The processing of a work item is terminated if it assumes the status logically
deleted or the status completed.
Each object type can be assigned to an entity type, which further classifies the
object type in the company environment.
An evaluation path describes a relationship chain that exists in a hierarchical
structure between particular objects.
For example, the evaluation path ORGEH describes the relationship chain
Organizational unit > Position > Person. Evaluation paths are used for the
selection of objects in evaluations.
After you have specified an evaluation path, the system evaluates the structure
along this evaluation path and only takes into account the objects found via the
specified evaluation path.
Status change of an object which is "published" throughout the system.
Examples: "invoice entered", "purchase order released".
The list of possible events is defined with the relevant object type in the
Business Object Builder. This list can be extended according to customer
requirements using the delegation concept. You have to ensure that the events
added are actually created.
26
EVENT CONTAINER
EVENT CREATION
EVENT MANAGER
EVENT PARAMETER
EVENT RECEIVER
EXCEPTION
EXCLUDED AGENT
EXPRESSION
Each event carries information from its creation context in its event container.
This information is available to the receiver of the event and can be used for
event-driven control and communication mechanisms.
An event may start, terminate or continue tasks and workflows.
Container that contains the event parameters of an event. The event must be
defined as an object type component in the Business Object Repository (BOR).
Event containers can have bindings with workflow containers or task
containers.
Program or environment in which an event is created.
The creation of an event can be implemented in various ways:
DIRECTLY FROM AN APPLICATION PROGRAM
AFTER A CHANGE THAT IS LOGGED BY A CHANGE DOCUMENT BEING WRITTEN
AFTER A (SYSTEM OR USER) STATUS CHANGE
AS A SEPARATE OUTPUT TYPE WITHIN MESSAGE CONTROL
The last three creation mechanisms listed can also be used by customers. This
means events can be created flexibly and on a customer-specific basis even
where the option has not been provided by SAP in the standard version.
An event can only be created if it is defined as a component of an object type
in the Business Object Repository.
All the programs and tools provided by the workflow system for event handling.
This term includes:
THE DEFINITION COMPONENTS (FOR CREATING CREATOR-RECEIVER LINKAGES)
THE RUNTIME COMPONENTS (FOR TRIGGERING AN EVENT INSTANCE, EVALUATING
THE EVENT INSTANCE WITH REGARD TO EXISTING LINKAGES, MANAGING THE
ASSIGNMENT OF CREATORS TO RECEIVERS, AND FOR THE ACTUAL DATA TRANSFER)
Runtime-specific information from the event creation context. Event
parameters are defined as elements of the event container and are passed to
the event receivers via binding.
The following event parameters are automatically contained in the event
container:
THE REFERENCE TO THE OBJECT WHOSE CHANGE OF STATE IS DESCRIBED BY THE
EVENT.
THE USER NAME OF THE PARTY WHO TRIGGERED THE EVENT CREATION.
Application or system program in which an event is evaluated.
The event receiver is started by the asynchronous call to a receiver function
module, which is entered in the linkage table.
The event manager evaluates the linkage table and then calls up the receiver
function module.
Object type component: Error which may occur during method execution and
indicates whether a method was successful.
Exception categories:
APPLICATION AND SYSTEM ERROR
TEMPORARY ERROR
Temporary errors can occur when system resources are not available. So it
might make sense to call the method up again later.
You can account for application or system errors in Workflow by defining steps
to be carried out when an exception occurs.
User who is excluded from processing a work item.
Excluded agents can be established at runtime so that information from the
workflow execution environment (agents of previous steps for example) or
from the context of the processed application objects can be taken into
account.
Umbrella term for constant, variable and system field.
In the context of an expression the following terms have the following
27
FORM TASK
GENERAL TASK
IMPLEMENTATION
PROGRAM
INHERITANCE
INSTANCE LINKAGE
INTERFACE
meanings:
CONSTANT
Fixed value or fixed object reference
VARIABLE
CONTAINER ELEMENT OR
ATTRIBUTE REFERENCED INDIRECTLY VIA A CONTAINER ELEMENT
SYSTEM FIELD
Field from table SYST
Expressions are used, for example, to describe the source or destination of
data to be transferred in a binding definition.
Single-step task executed with the method Process of object type FORM. The
various form tasks differ in the following aspects:
TASK CONTAINER
TASK DESCRIPTION
AGENT ASSIGNMENT
If a form task is executed as a step within a workflow, the recipients of this
step see a work item in their Business Workplaces. If the relevant system
settings have been made, a mail is also sent to their Internet addresses. This
mail contains the data from the task container as an R3F attachment.
Indicator for a single-step task or a multistep task. Tasks with this indicator
can be executed or started by any user.
The following apply to a work item of this type:
RECIPIENTS ARE ALL USERS, PROVIDING NO RESTRICTION HAS BEEN IMPOSED BY
DEFINING RESPONSIBLE AGENTS.
IT CAN BE FORWARDED TO ANY USER BY ITS RECIPIENT.
It can be executed by any employee who finds it using work item selection or
the workflow log.
ABAP program containing the implementation of methods and attributes of the
object type.
When the attributes, methods and events are defined, the interface of the
object type is described, and all essential information about the object type is
documented.
Every object type requires one program, containing the following:
THE CALL TO THE UNDERLYING ABAP FUNCTION AND THE PROVISION OF
PARAMETERS IN THE FORM OF SUBROUTINES FOR EACH METHOD DEFINED.
INDIVIDUAL READ ACCESS FOR EACH ATTRIBUTE.
This collection of subroutines is then accessed by the function modules of the
runtime environment to call methods and read attribute values.
The implementation program is partly created automatically by the system
from the definition information. Some post processing is required, however.
Relationship between object types allowing common attributes and methods to
be passed on automatically from super types to subtypes.
With inheritance the subtype usually has the same key fields as its super type
but greater functionality.
Assignment of a specific receiver instance to a particular combination of EVENT,
OBJECT TYPE, AND OBJECT KEY.
The instance linkage is entered in the instance linkage table. The The instance
linkage table is one of the two linkage tables for the EVENT-RECEIVER LINKAGE
(the other table is THE TYPE LINKAGE TABLE).
If events are used in SAP Business Workflow (as triggering and terminating
events, in wait steps), the entries required in the linkage tables are made by
the workflow system.
Collection of attribute, method and event definitions for an object type, which
are used in a common context.
28
INTERFACE TYPE
KEY FIELD
LATEST END
LATEST END
LATEST START
LINKAGE TABLE
LOOP
MESSAGE
RECIPIENT
COMPLETION
FOR
MESSAGE
RECIPIENT
FOR
MISSED DEADLINE
METHOD
Object types can support interfaces. This option ensures that the attributes,
methods and events in the interface are implemented correctly in the object
type.
Interfaces are defined in the Business Object Builder.
No practical standard implementation can be specified for abstract interfaces.
With object types that support abstract interfaces, the inherited attributes and
methods must be redefined and implemented.
Combination of ATTRIBUTE, METHOD, AND EVENT DEFINITIONS which are used in
a common context.
An object type can support one or more interface types. The attributes,
methods, and events already defined in the interface types are therefore
available to the object type with their interfaces and are also inherited by the
respective sub-types.
If interface types are used, names and interfaces can be standardized and the
definition of attributes, methods, and events simplified in the object type
definition.
Object type component: Field for UNIQUE IDENTIFICATION OF AN OBJECT.
A key field is defined for an object type in the Business Object Builder.
The identifying key of an object is made up of all the key fields of the object
type.
Latest point in time for the processing of a work item to end.
The processing of a work item ends when it assumes either the status logically
deleted or the status completed.
Deadline by which the processing of a work item MUST BE TERMINATED.
Deadline by which one of the recipients of a work item MUST HAVE STARTED to
process it.
Table containing the assignment of events to the event receivers interested in
the event.
A distinction needs to be made between type linkage and instance linkage
which are contained in separate tables.
If events are used in SAP Business Workflow (as triggering or terminating
events, in wait steps), the entries required in the linkage tables are made by
the workflow system.
Repeated processing of steps within the workflow definition.
UNTIL and WHILE are available as loop types.
User who is informed when a work item or workflow has been fully processed
and its status set to completed .
The notification takes place in the form of an e-mail in the recipient's Business
Workplace. The notification text is stored as a completion text with the task
represented by the completed work item. This basis text can be updated with
values from the runtime environment of the work item (attributes of application
objects involved).
User who is notified if the workflow runtime system discovers a missed
deadline.
The notification takes place in the form of a missed deadline work item in the
recipient's Business Workplace. When this work item is executed, information
about the monitored deadline is displayed.
Object type component: Operation that can be executed on an object.
The methods of an object type are specified and implemented in the Business
Object Builder.
Methods usually refer to existing ABAP functions, such as FUNCTION MODULES,
TRANSACTIONS AND DIALOG MODULES. They are called using a standard
interface, which is determined basically by the method ID and the method
parameters. The actual implementation of a method is not externally apparent.
29
METHOD
PARAMETER
MISSED DEADLINE
WORK ITEM
MULTIPLE
CONDITION
MULTISTEP TASK
NODE
NOTIFICATION
COMPLETION
OF
OBJECT
OBJECT MANAGER
OBJECT REFERENCE
OBJECT
STATUS
ATTRIBUTE
OBJECT TYPE
OBJECT
COMPONENT
TYPE
ORGANIZATIONAL
MANAGEMENT
OBJECT
POSSIBLE AGENT
PROCESS CONTROL
PROCESS TIME
RECEIVER
FUNCTION MODULE
RECEIVER INSTANCE
RECEIVER TYPE
RECEIVER
TYPE
FUNCTION MODULE
REQUESTED END
REQUESTED START
RESPONSIBLE
AGENT
RESULT
ROLE
ROLE DEFINITION
ROLE RESOLUTION
SAP
BUSINESS
WORKFLOW
SAPFORMS
SECONDARY
METHOD
A dialog work item appears in the Business Workplaces of its recipients when
the requested start is reached if the work item is already available for
processing.
If the dialog work item is not created until after the requested start, it appears
immediately in the Business Workplaces of its recipients.
With background work items, execution starts when the requested start is
reached at the earliest.
User assigned locally to a step in the workflow definition.
The system establishes the recipient(s) of a work item from the intersection of
responsible and possible agents.
A specific parameter of a synchronous method for returning the essential result
of this method.
The possible values of this result can be defined in a fixed value domain or a
check table so that they are known in the workflow definition and can be taken
into account.
A method can only ever have one result, but it can have any number of return
parameters as well. A method does not necessarily have to have a result.
Method of establishing a user at runtime. This user can be used as a
responsible agent or a recipient of certain notifications.
A role can be defined in the following ways:
RESPONSIBILITIES
ORGANIZATIONAL DATA
USER-PROGRAMMED FUNCTION TO BE EXECUTED
Roles are assigned in the step definition.
Example:
ROLE: "SUPERIOR OF <USER>"
ROLE: "MRP CONTROLLER FOR <MATERIAL>"
ROLE: "EMPLOYEE RESPONSIBLE FOR <CUSTOMER> FROM <ORDER TOTAL>"
Description of a role. The definition includes the rule for how and according to
which information (objects, application data) the role resolution can be carried
out.
Determination of the agents combined in a role.
Role resolution takes place at runtime depending on the information from the
current process.
The result of role resolution is a list of agents who are responsible for the
actual processing of the task.
SAP Business Workflow comprises technologies and tools for the automatic
control and execution of cross-application processes. This primarily involves
coordinating
THE PERSONS INVOLVED
THE WORK STEPS REQUIRED
THE DATA THAT NEEDS TO BE PROCESSED (BUSINESS OBJECTS)
The main aims of SAP Business Workflow are to reduce throughput times and
the costs involved in managing business processes, and to increase
transparency and quality.
R/3 System interface for the integration of electronic forms.
These forms can be used, for example, to execute a work item or start a
workflow offline.
Method that is executed in addition to the main method in the execution of a
dialog or background work item.
A secondary method is connected to the leading method of the step, and is
generally used to display additional information.
The secondary method can be any object method defined in the Business
Object Repository.
33
STANDARD TASK
START
STEP
STEP DEFINITION
STEP NAME
SUBSTITUTE
PROFILE
SUBTYPE
SUBWORKFLOW
SUPERTYPE
SYNCHRONOUS
METHOD
If the work item is executed several times, (say, for example, the terminating
event has not yet occurred), the secondary method is also executed several
times.
Single-step task for use in workflow definitions. You can execute methods of
business object types in standard tasks.
The following apply to standard tasks:
OBJECT TYPE TS IN ORGANIZATIONAL MANAGEMENT
CROSS-CLIENT
UNRESTRICTED VALIDITY PERIOD
ANY PLAN VERSION
Point in time at which the processing of a work item starts.
The processing of a work item starts when the work item first assumes the
status reserved or in process.
Elementary module of a workflow definition.
The following types of step exist:
ACTIVITY (= TASK REFERENCE)
CONDITION, MULTIPLE CONDITION
EVENT CREATOR, WAIT STEP
CONTAINER OPERATION
USER DECISION
DOCUMENT GENERATION
LOOP
FORK
UNDEFINED STEP
The individual steps are arranged and processed sequentially. Only steps in
forks can be executed simultaneously.
Steps within a workflow definition can only be changed or inserted according to
certain rules, taking into account block orientation.
Part of a workflow definition. The step definition contains all the data relevant
to the step. The scope depends on the step type defined.
Name to label a step in the workflow definition.
Collection of a substitute's "rights".
A substitute profile is assigned to a substitute when the substitution is set up.
A substitute profile includes a number of task classes. Task classes are
assigned to single-step tasks during definition.
Substitute profiles are defined and task classes combined to form a substitute
profile in Customizing.
Copy of an object type, which has inherited all the attributes, events and
methods. The subtype can be modified and extended.
Subtypes are used to edit or extend object types supplied by SAP.
Workflow template or workflow task used in an activity in a workflow definition.
At runtime the workflow referenced in the activity is executed when the step is
executed.
Object type from which another object type (subtype) has inherited all object
type components. Changes to the object type components of the supertype
only affect the object type components of the subtype if the components have
not been redefined for the subtype.
Method that assumes process control for the duration of its execution and
reports back to the calling component (in this case the work item manager)
after its execution.
Terminating events can be defined for a single-step task described with a
synchronous object method. At runtime, the relevant work item is completed
either when the method has been processed or when one of the events occurs.
A synchronous method can return the following data to the workflow:
34
TABLE ELEMENT
TASK
TASK CONTAINER
TASK GROUP
TERMINATING
EVENT
TOTAL TIME
TRIGGERING EVENT
TYPE LINKAGE
RETURN PARAMETERS
ONE RESULT
EXCEPTIONS
Multiline element in the workflow container, which can contain a list of values.
A table element can be specified in the activity definition. The activity is
executed in parallel processing branches as many times as there are values in
the table.
Goal-oriented business activity description.
The following tasks exist in the workflow context:
SINGLE-STEP TASK (CUSTOMER TASK/STANDARD TASK)
Activity in which an object method is executed on a specific object.
MULTISTEP TASK (WORKFLOW TASK/WORKFLOW TEMPLATE)
Activity whose description includes reference to a workflow definition.
Container of a task for storing data from the task environment.
The task container contains the control information in the form of constants
and object references:
INFORMATION ON EXECUTION OF THE OBJECT METHOD (OBJECT REFERENCE TO THE
OBJECT TO BE PROCESSED, CURRENT AGENT OF WORK ITEM, AND SO ON)
INFORMATION AVAILABLE AFTER PROCESSING THE METHOD
The task container already contains some defined workflow system variables.
You can define other container elements in the task container, which are of
interest, for example, for variable replacement in connection with the
notifications.
Collection of standard tasks, workflow templates and other task groups, which
are used in a common context.
You can set up hierarchies of task groups by inserting task groups into other
task groups.
Task groups can be cross-application. They can include tasks from within one
application component as well as tasks from different application components.
Event whose occurrence terminates a single-step task.
If the indicator confirm end of processing is set for the single-step task, the
end of processing must be confirmed by a recipient even after the event has
occurred.
The event is entered as a terminating event of the single-step task. A singlestep task can have several terminating events.
Single-step tasks that refer to an asynchronous method must have at least one
terminating event. Single-step tasks that refer to a synchronous method can
have terminating events.
Single-step tasks with terminating events can be terminated as follows:
BY THE EVENT OCCURRING
BY AN AGENT EXECUTING THE WORK ITEM AND (POSSIBLY) SETTING IT TO 'DONE'
(ONLY FOR SINGLE-STEP TASKS THAT USE SYNCHRONOUS OBJECT TYPE METHODS)
Sum of process time and wait time.
Event whose occurrence starts a task or a workflow.
The event must be entered as a triggering event for the task to be started, and
the event linkage must be activated. A task or workflow can have several
triggering events.
Information from the event creation context can be passed in the binding from
the event container to the task or workflow container.
The event must be defined as an object type component in the Business Object
Builder.
Assignment of one or several receiver function modules and receiver types to
an event.
To establish the type linkage, the event manager evaluates the type linkage
35
UNTIL LOOP
USER DECISION
VIRTUAL ATTRIBUTE
WAIT STEP
WORK ITEM
WORK
CONTAINER
WORK
DISPLAY
ITEM
WORK
MANAGER
ITEM
ITEM
table. The event receiver with the receiver function module and receiver type
are defined in this table. The event is specified by the object type and event
name. In addition to the instance linkage table, the type linkage table is one of
the two event receiver linkage tables managed in the system.
If events are used in SAP Business Workflow (as triggering and terminating
events, for wait steps), the entries required in the linkage table are made by
the workflow system.
Step type in a workflow definition for processing a sequence of steps
repeatedly at runtime until the termination condition defined in the loop
command occurs.
The system makes the decision about terminating the loop on the basis of a
termination condition created in the condition editor, in conjunction with values
contained in the workflow container.
The first check takes place when the loop has been processed once.
Step type in a workflow definition to take a branch at runtime based on a
decision made by the current user during the current workflow.
At runtime the user decision is represented by a dialog work item (type W work
item).
Attribute for which a read procedure always has to be implemented, since no
field content in the database corresponds to this attribute. Its value is
established by evaluating what may be complex database contents at runtime.
It generally applies that multiline attributes and attributes that reference a
object with several key fields are to be implemented as virtual attributes.
A virtual attribute can return the value of an ABAP Dictionary field or an object
reference.
Step type in a workflow definition for waiting for an event at runtime.
Processing in this workflow branch is continued after the expected event has
occurred.
At runtime a wait step is represented by a type E work item.
Type E work item representing a wait step in a workflow at runtime, which
waits for a published event to occur.
Time during which a work item exists but is not yet being processed. The
calculation of the wait time depends on the type of the work item.
Step type in a workflow definition for processing a sequence of steps
repeatedly at runtime as long as the comparisons defined in the step definition
apply.
To make the decision, the workflow system checks the value of a basis of
comparison (= expression from the workflow container) against the defined
comparison values.
The first check is made before the loop is processed.
Runtime representation of a task or a step in the workflow definition.
There are various types of work item.
Runtime representation of the task container of a single-step task.
All information and activities are displayed, which are relevant in the
environment of the work item in question. Very little technical information is
displayed.
As an alternative to the standard view of the work item display, which supports
the agent in the processing of the current work item, you can use the technical
view of the work item display.
You can change the status or the deadline data of the work item in the
technical view.
Active unit which provides methods for the work items.
The work item manager has the following functions:
36
WORK QUEUE
WORK
QUEUE
WORK ITEM
WORKFLOW
WORKFLOW
CONTAINER
37
WORKFLOW LOG
WORKFLOW
OUTBOX
WORKFLOW
RESUBMISSIONS
WORKFLOW SYSTEM
ADMINISTRATOR
WORKFLOW TASK
TEMPLATE
WORKFLOW
WORKFLOW
ITEM
WORKLIST
WORK
39
What differences are there between a work item and a notification mail?
a) The work item cannot be used to notify several users.
Mails can be routed to several users, just like work items. When a mail is sent, and one
recipient reads and deletes the mail, all other recipients will still have access to their own
copy in their own inbox. However, when a work item is processed by one of the recipients it
will automatically disappear from all the other inboxes. So you can see that a work item is
unsuitable for notifying several users.
It is also worth noting that a mail can be forwarded in many different ways (fax, internet...)
whereas the work item cannot.
b) The work item holds up the workflow
When the workflow sends a mail (usually as a background step) it continues with the
process immediately after transmitting the mail. When a work item is generated, the
workflow will not continue until the work item has been processed. This slows down the
process. Occasionally this is what is intended (using the work item as an approval step
without the ability to reject) but usually you will better off using mails for notifications.
Note: You can send business objects as references with the mail either as a business object
reference attached to the mail or as an URL (ABAP required).
What is the difference between sending a mail to a recipient list compared to
sending individual mails via a dynamic loop?
Performance. Sending 1 mail to 20 recipients will cost considerably less performance than
sending 20 individual mails. If the mail is sent as a SAP Office mail (as opposed to e-mail,
fax...) disk space will also be a factor because the SAP office mail will only exist once in the
database, with references being created for each of the recipients.
The only time you need to consider individual mails with a dynamic loop is when the text of
the mail varies from one recipient to another.
How do I send a standard text as an e-mail from workflow?
It is very easy sending standard text , which may include data from the workflow. You
simply create a background step which sends the work item description. This may include
variables which will be substituted when mail is sent.
In early releases you have to create your own task based on the method SELFITEM
SendTaskDescription. In later releases a wizard is available for creating the step and in
release 4.6 there is even a step type which does this all for you automatically.
Whichever path you take, there is very good online documentation describing exactly what
has to be done.
40
41
How can I make sure that user's access their tasks via the workflow and not via
the menu or launch pad?
The routing mechanism for work items uses roles and organizational assignments to
determine who receives which work item. However the routing does not provide extra
authorization checks based on the routing configuration. If you want to ensure that the
tasks are executed within the workflow, and not via the standard transaction, service or
MiniApp, then you will have to apply your own protection.
The simplest way of doing this is to remove the standard transaction from the user's menu
or Workplace role (but include it in the supervisor's role, just in case).
If you want to allow the user to execute the task from the menu if and only if they have
received the work item then you should replace the standard transaction with your own
custom built transaction. Your own transaction simply calls the standard transaction but
performs it's own authorization check first, based on the routing mechanism used in the
workflow. Tip: Add a second (ored) authorization check to make sure that a supervisor can
execute the transaction in an emergency
Is it possible to execute a work item automatically (lying in inbox)... automatically
when deadline is missed...If so how will you perform it?
When deadline is missed, u can trigger another work item.
Give time constrain to Latest Start and it branches one more outcome (with a clock symbol)
in WF template. Here create an activity and assign the same task to this activity and do
it as a background process.
A work item is in a users inbox. If the user wants to do a particular process
manually without executing the work item what will happen to the work item?
The WI stays in the inbox.
For killing the WI, u can use Process Control Step. (try fork)
How will u delete a work item, which is in the inbox?
Use SWWL transaction
Use RSWWWIDE Standard Report
Use Process Control Step in Workflow template
Use SWUF (Workflow Admin)
What is Check Function Module and where it is used?
Check Function Module, if used, is responsible for triggering a workflow under som
conditions. It will check the condition before triggering the workflow and if the condition is
not satisfied it terminates the flow. Developer has to create this function module (if not
provided by SAP). This is given in SWE2. (Select the linkage and see details)
What is Receiver Function Module and where it is used?
SWW_WI_CREATE_VIA_EVENT is the Receiver function module, which is responsible for
triggering the workflows (for all Workflows in SWE2). This will be assigned automatically
when the linkage (SWE2) is created. This function module is common for all.
How can I pass parameters from an ABAP program to the workflow container?
SWW_WI_START_SIMPLE is the Function Module used for triggering workflow
from ABAP. (Try also SWW_WI_CREATE_VIA_EVENT)
How to Trigger another workflow from a workflow in process? Explain the process
and steps involved in it?
In an Activity, just call the workflow, as u calls the task
42
Workflow is in process. Upon creation of an event, the workflow should end. How
to design this process?
Can use Process Control Activity with the necessary logic.
Depending upon various field values, workflow should be triggered? How to do it?
Field Restriction in SWEC
List some standard FM used for Role Resolution and explain where it is used and
how parameters are passed?
SWX_GET_MANAGER Gives the Superior (output from function module) of the user (input
to function module).
Function modules
You use a function module to define standard roles if the agent for a task must be
found according to extremely complex selection criteria. If you define roles using
function modules, the system finds agents by executing the function. How data is
obtained varies from function to function. You can use predefined functions, or create
your own functions.
Organizational data
You use organizational data to define standard roles if your business processes are
managed on the basis of your organization model. If you define roles using
organizational data, role resolution traces the possible agents for a task by using the
relationships between the task, the objects in Organizational Management, and the
SAP organizational objects.
Responsibilities
You use responsibilities to define standard roles if you need more precise selection
criteria to find agents, but do not want to use function modules. You can also use the
organization model to find possible agents using jobs, positions, etc.
Explain the workflows developed by you. Explain from starting point to end
point of workflow development (Technical point of view).
43
Design Process
Which responsibilities do you have for the scenario?
Design the Multistep task
How must the single-step tasks be defined?
How must the object type be defined?
Which functionality should the method involve?
On the single step level you define the greatest possible set of agents.
On the Multistep level you define the responsible agents.
You can create separate user-dependent or user-independent layouts so that you can
adapt the displayed columns
individually. You can access the function in the
Workplace via an application function key.
You can set filters to set certain criteria for individual columns or several columns
simultaneously, according to which specific work items are then filtered.
You can add dynamic columns in the layout that then display dynamic elements for
certain tasks and users from the work item container. However, this is only possible if all
tasks in the inbox belong to just one task. If they have several tasks in the inbox,
filtering serves no useful purpose because all tasks are first completely read once.
You can define these dynamic columns using transaction SWL1.
What does the substitute rule system look like in the workflow?
You have a choice of two different substitute rulings:
Active substitute ruling (for example, for absence due to vacations): In this case, the
items belonging to the absent person are automatically assigned to the substitutes inbox
(in addition to his own work items).
Passive substitution (for example, for absence due to illness): the substitute must
explicitly assume the substitution and can only view the items of the absent person in
this mode.
How can users be automatically notified that new work items are available for
processing?
Answer: Unfortunately, the dialog box that informs users of new work items which appears
in SAPoffice is not available within SAP Systems. However, the following two options are
provided:
44
In the Workflow Builder, you can designate the item as an express item via additional
data. The user then receives a corresponding express dialog box.
The RSWUWFML report is a more flexible option. This report sends an e-mail to an
external Internet address to notify the user of new work items.
items?
This is where you can use deadline monitoring for work items. In the Workflow Builder, you
can set dates for a requested/latest start/end date for each individual step. You must
schedule the SWWDHEX job via transaction SWU3 for this. Schedule the job permanently in
the production system otherwise it is difficult for the job to schedule individual deadline
monitoring scenarios when workflow is heavy.
Can I also execute work items with external programs such as Outlook?
You can use the Web GUI for HTML instead of the Windows GUI. However, note that some
functions do no work in the WEB GUI, due to technical restrictions in the browser. SAP also
provides interfaces which allow you to process work items with external programs such as
Lotus Notes or Microsoft Outlook.
How do you trace the workflow?
Symptoms worth investigating with the workflow trace :
An event fails to trigger a workflow
Inconsistent data in the workflow
A workflow step does not execute
Starting points for Investigation
Is the binding performed correctly?
Is the target container being filled as you expected?
Are warnings recorded when the condition is evaluated?
45
1. In a workflow process all the users in an Org. unit has to be displayed and a single user
for approval should be selected from that list. What object and how that can be done?
2. A workflow task is pointing to a background job. If there is some error in the background
process how will you notify it to the user? Explain the process.
3. To which agent the task goes first.
4. If the possible agents r not assigned where the workflow will go. Will it be an error?
5. In order to keep the work item even after its executed what to be done.
6. For asynchronous does the terminating event should be given.
7. Is there any relationship between asynchronous and the work item being removed from
the inbox, after it is executed.
8. Approve/Reject should be given after the work item is executed and the transaction is
called. What to be done (use the function module popup_*)
9. What to be done in Role Resolution.
10. Web flow.
11. ITS
12. Workflow event log trace.
13. Done any monitoring other than deadline monitoring.
14. Agent assignment is done in workflow or standard task.
15. Extending events
16. Can we start a WF without using event?
17. Diff between hierarchy and dynamic hierarchy.
18. To add document by the user during the WF process- attach document activity
19. Use 'process control activity' - to skip the work item and continue the WF process.
20. To terminate the WF (will completely stop the WF process and its associated WF's)
21. To cancel the WF (will stop the current WF process alone and not its associated WF's)
22. When & where to use set & get parameters
23. When set container is used whether get container is a must.
24. What are the various ways to trigger an event?
25. What is the diff b/w workflow task and workflow template?
26. What is the diff b/w standard task and customer task?
27. What is the name of the Fun Mod, which is used to create event?
28. What are the various ways to trigger an event?
29. Diff between Version Dependent and Independent Workflow
30. What is Notification
31. What is Modeled Deadline
32. What is Receiver Type FM and Receiver FM?
33. What is Check FM?
34. What are possible ways in which can be assign to a task?
35. Can a Terminating Event be a starting event for another workflow or task if so how?
36. What is Adoption Workflow
37. Diff. type of role resolution?
38. Diff. between rule and role?
39. Consistency check for a standard task?
40. What work queue workitem?
41. What is Position Related substation agent?
42. Which container element is used to store the Administrator?
43. Why we used object type WF_TASK?
44. Who is the agent for background task? WF_BATCH
45. Completely explain one workflow process.
46. Diff between possible agents & responsible agents.
47. If the possible agents r not assigned where the workflow will go. Will it be an error.
48. In order to keep the work item even after its executed what to be done.
49. For asynchronous does the terminating event should be given.
46
ATTRIBUTES
A business object is primarily represented by its attributes. You perform actions, such as
create, update, or delete on the attributes by calling the methods of the object.
FIGURE 1 ATTRIBUTE NETVALUE OF OBJECT BUS2032 (SALESORDER).
The majority of attributes are data-dictionary fields (for example, the NetValue attribute is
defined by VBAK-NETWR). When you access an attribute of an object, you execute a SQL
statement that retrieves the corresponding field in the database.
47
You can also define attributes that do not exist in the data dictionary. These attributes are
called virtual attributes. For example, a business partner has an attribute called BirthDate
that is stored in the data dictionary. You can add a virtual attribute to the BusinessPartner
object called Age. The age of a business partner is not stored in the database, but you can
calculate it using the current date and the birth date of the business partner. If you
implement the ABAP code that calculates Age, every time you access the Age attribute, the
code executes and returns the business partners age.
The BOR lets you define multi-line attributes. These attributes define one-to-many
relationships between an object and other fields. These objects can be defined in the data
dictionary or can also be virtual attributes.
An attribute that uniquely defines an object in the system is called a key attribute. In the
case of a SalesOrder, the key attribute is VBAK-VBELN (the TableName and FieldName). It
is not uncommon for an object to have several key fields. An example of this is object is the
SalesArea (BUS000603) object type which has SalesOrganization (TVTA-VKORG),
DistributionChannel (TVTA-VTWEG) and Division (TVTA-SPARTE) as key fields.
METHODS
As mentioned earlier, the methods of an object represent the actions you take with objects
attributes. An action in this example would include retrieving the status of one or more sales
orders based on specific criteria. Methods are analogous to function modules in that they
have importing and exporting parameters as well as exceptions, which you view by selecting
a method and clicking on the toolbar button. This allows external systems (or internal
developments) to pass and accept parameters from these methods just as if they were
using function modules -- allowing external systems to call methods.
48
SUBTYPING
A subtype of an object is another object whose creation is based upon a parent object (see
the preceding manager/employee example). The subtype maintains references to all the
attributes and methods of its parent object. This means that any methods and attributes
defined on the parent can be executed and accessed on the child object. I have often heard
less-experienced developers refer to subtyping as copying the parent object. Although the
effects can be similar, in order to achieve an understanding of some of the more advanced
concepts, such as interface inheritance, it is important to realize that this is not accurate.
If a subtype object were merely a copy of its parent, then all the code contained within the
parent would be physically copied to the child. This is not the case. The subtype simply
maintains references to its parents methods and attributes. The real difference is that the
subtype lets you redefine these methods and attributes. You can easily add your own
business rules to the parent methods by redefining the subtypes method.
49
It is imperative that once you redefine the method it still behaves in a similar manner. You
are allowed to add extra business logic, but the method must still change the password
rather than do something unexpected, like delete a customer. This is particularly important
when SAP is being accessed from external systems. The external system will expect a
method to provide certain functionality. The developer should take care to ensure that this
expectation is met.
Delegation
Now that you have implemented a new CHANGEPASSWORD method, you need to tell the
SAP system to use the redefined version of CHANGEPASSWORD and not the version that
was delivered on the KNA1 object. This is similar to object-oriented inheritance but the two
concepts do have fundamental differences.
By making an entry in the delegation table, you tell R/3 that before executing a method on
KNA1, it should first check if that method has been redefined on the subtype. If it has, then
the system executes the redefined method. If it hasn't, then the system executes the
original method.
50
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.
51
ROLE RESOLUTION
AGENTS DETERMINATION
Role
Organizational Unit
Job
Position
Work center
User
Expression
Workflow Initiator (Expression)
Superior of workflow Initiator (Role)
Responsibility Rules
Evaluation Paths
Function Modules
SAP Organizational Objects
ROLE RESOLUTION
AGENTS DETERMINATION
52
PFTC
RESPONSIBILITY RULES
If you use responsibilities, you can define the role container using any table fields
or object types. The 'Responsibilities' title element enables you to define any
number of responsibilities. You can then assign agents to them. You can also define
criteria for each responsibility. The responsibility is then valid for the criteria.
53
FUNCTION RH_GET_STRUCTURE.
*"---------------------------------------------------------------------*"*"Lokale Schnittstelle:
*"
IMPORTING
*"
VALUE(ACT_WEGID) LIKE T778A-WEGID OPTIONAL
*"
TABLES
*"
ACTOR_TAB STRUCTURE SWHACTOR
*"
AC_CONTAINER STRUCTURE SWCONT
*"
EXCEPTIONS
*"
NOBODY_FOUND
*"
NO_ACTIVE_PLVAR
ORGANIZATIONAL ATTRIBUTES
RH_OM_ATTRIBUTE_ORGOBJ_FIND
(General Attribute Maintenance: Application Scenario)
FUNCTION rh_om_attribute_orgobj_find .
*"---------------------------------------------------------------------*"*"Lokale Schnittstelle:
*" IMPORTING
*"
VALUE(SCENARIO) TYPE OM_ATTRSCN OPTIONAL
*"
VALUE(BUFFER_REFRESH) TYPE FLAG OPTIONAL
*"
VALUE(PLVAR) TYPE PLVAR OPTIONAL
*"
VALUE(SEARCH_DATE) TYPE DATS DEFAULT SY-DATUM
*" TABLES
*"
AC_CONTAINER STRUCTURE SWCONT OPTIONAL
*"
ACTOR_TAB STRUCTURE SWHACTOR OPTIONAL
*" EXCEPTIONS
*"
NO_SCENARIO
*"
NOTHING_FOUND
*"----------------------------------------------------------------------
FUNCTION MODULES
You can execute any role resolutions using a function module. Some function modules are
supplied by SAP.
To Know standard Roles Available
54
55
FUNCTION RH_GET_STRUCTURE
*"---------------------------------------------------------------------*"*"Lokale Schnittstelle:
*"
IMPORTING
*"
VALUE(ACT_WEGID) LIKE T778A-WEGID OPTIONAL
*"
TABLES
*"
ACTOR_TAB STRUCTURE SWHACTOR
*"
AC_CONTAINER STRUCTURE SWCONT
*"
EXCEPTIONS
*"
NOBODY_FOUND
*"
NO_ACTIVE_PLVAR
*"---------------------------------------------------------------------DATA: PLVAR
LIKE OBJEC-PLVAR.
DATA: OTYPE
LIKE OBJEC-OTYPE.
DATA: OBJID
LIKE OBJEC-REALO.
DATA: TDEPTH
LIKE GDSTR-TDEPTH.
DATA: ORG_AGENT LIKE SWHACTOR.
REFRESH: ACTOR_TAB.
SWC_GET_ELEMENT AC_CONTAINER 'PLVAR' PLVAR.
SWC_GET_ELEMENT AC_CONTAINER 'ORG_AGENT' ORG_AGENT.
IF SY-SUBRC > 0
OR
ORG_AGENT IS INITIAL.
SWC_GET_ELEMENT AC_CONTAINER 'OTYPE' OTYPE.
SWC_GET_ELEMENT AC_CONTAINER 'OBJID' OBJID.
ELSE.
OTYPE = ORG_AGENT-OTYPE.
OBJID = ORG_AGENT-OBJID.
ENDIF.
SWC_GET_ELEMENT AC_CONTAINER 'TDEPTH' TDEPTH.
IF SY-SUBRC > 0.
CLEAR TDEPTH.
ENDIF.
* now read data
CALL FUNCTION 'RH_STRUC_GET'
EXPORTING
ACT_OTYPE
= OTYPE
ACT_OBJID
= OBJID
ACT_WEGID
= ACT_WEGID
ACT_PLVAR
= PLVAR
ACT_BEGDA
= SY-DATUM
56
ACT_ENDDA
ACT_TDEPTH
ACT_TFLAG
ACT_VFLAG
AUTHORITY_CHECK
TABLES
RESULT_TAB
EXCEPTIONS
NO_PLVAR_FOUND
OTHERS
=
=
=
=
=
SY-DATUM
TDEPTH
' '
' '
$CROSS
= ACTOR_TAB
= 1
= 2.
CASE SY-SUBRC.
WHEN 01.
MESSAGE E300(5W) RAISING NO_ACTIVE_PLVAR.
WHEN 02.
MESSAGE E170(5W) WITH PLVAR OTYPE OBJID ACT_WEGID
RAISING NOBODY_FOUND.
ENDCASE.
ENDFUNCTION.
57
VBELN
AUART
AUGRU
NETWR
VKORG
INTO TABLE IT_VBAK
FROM VBAK
WHERE VBELN = SALESNO.
I_MODE ( Additions )
C_MODE_INPLACE_WITH_INFO
C_MODE_INPLACE_BUTTON_ONLY
C_MODE_MODELESS
=
=
=
=
=
CONT
Object of CL_GUI_CUSTOM_CONTAINER
SY-REPID
9000
CL_WAPI_TOOLBOX=>C_MODE_INPLACE_WITH_INFO
WORKITEMID.
58
59
60
ORGANIZATIONAL DATA
If you select this option, role resolution is executed using 'business object types' related in
the organizational model.
For example, you can relate organizational units to the 'country' object type. A value for the
country must then be written to the role container at runtime. Role resolution then returns
all of the organizational units assigned to this country.
If you have code representing a particular laboratory, you can relate this to an
organization unit representing all the people in the laboratory.
If you have code representing an MRP controller, you can relate this a particular job
(or) position in the organizational plan.
Eg:
61
LOCK INDICATORS
The following lock indicators can be set for single step tasks:
Locked against instantiation
The system does not create a work item for the single step that is locked against
instantiation
Locked against execution
The system does create a work item for the single step task that is locked against execution
however it cannot be executed.
Business process models:
The process consultant analyzes the real-life business processes of a company and
tries to map these processes into an optimized, workflow-compatible business process
model.
To create the role:
For process consultant:
SAP_BC_SRV_USER
SAP_BC_BMT_WFM_PROCESS
Person within the system of workflow roles who analyses the existing business
processes, identifies those that are suitable for SAP Business workflow and maps them onto
a business model.
For work developer:
SAP_BC_BMT_WFM_DEVELOPER
Person within the system of workflow roles who implement the workflow based process
model developed by the process consultant and using the SAP Business workflow definition
tools.
For workflow system administrator:
SAP_BC_ENDUSER
SAP_BC_SRV_USER
SAP_BC_BMT_WFM_ADMIN
Person within the system of workflow roles who is responsible for the technical maintenance
of the development environment and the runtime behavior after automatic customizing.
For workflow agent:
SAP_BC_SRV_USER
Person within the system of workflow roles who appears as an end user in productive
workflows.
The workflow agent starts workflows and processes work items. Their work area is the
Business Workplace.
For process controllers:
SAP_BC_SRV_USER
SAP_BC_BMT_WFM_CONTROLLER
62
VERSIONS IN WORKFLOW
Default Version 0000.
To Generate a new version.
Choose Workflow -> Generate Version.
Generates a version 0001 Active Version.
Import & Export parameters are not subject to version change
DISPLAYING VERSIONS
Choose Basic Data.
Version Independent Basic Data
Version Overview
When transported to another system, only the ACTIVE VERSION is transported with a new
free version number.
TABLES AFFECTED
SWDSHEADER
FIELDS
WFD_ID
VERSION
EXETYP
Workflow Definition
Version
Workflow Type
WORKFLOW TYPES
S
E
D
R
C
A
Definition
Runtime
Ad Hoc Definition
Ad Hoc Runtime
Configuration Definition
Configuration Runtime
CHANGE DOCUMENTS
SCDO
SWED
SWEC
BSVW
NACE
AWUW
Overview
Define Workflow Properties
Linkage
Status Management
Message Control
Logistics Information System
EVENT LINKAGE
SWETYPU
SWB_COND
SWUY
Type Linkages
Workflow Start Conditions
Create Workflow Message Linkage
SWFC
SWF_AUTO
63
SUBSTITUTING BY USERS (INFO. FROM EDI BOOK PG. NO. NO. 185 - CHAP. 9)
Substitution is the capability to designate another position as a backup to execute
your work items. The person who wants to assign someone else his or her
substitute has to initiate the process.
1.
2.
3.
4.
Go to SBWP
Choose settings, workflow settings, maintain substitute.
Click the create substitute button.
Enter the user ID of the person who will substitute for you and enter the
date on which you will be gone in the validation period.
If you sets the substitute option correctly, you can log on to the system with his ID
and select yours workitem as follows.
1. Go to SBWP
2. Select settings, workflow settings, adopt substitution
3. From the list of users who have assigned you as the backup.
SUBSTITUTING BY ADMINISTRATOR
The system administrator can set a substitute in the HR module.
1. Execute PO13.
2. Enter the position of the person who needs a substitute. Click the
Relationship Info Type under the Active Tab. Click the Create button.
3. Use B311 in the Type of the Relationship field. Enter S for the Type of
Related Object, and enter the position of the user who will be the
substitute in the ID of the Related Object Field. Save your entry to define
the substitute.
64
AL-EARLYINP
AM_SUBWF
AM_WF_1
AM_WF_1_ERL
AM_WF_ALL
exmpformabs
wf_req_rel
WF Test1
WF Test2
Pool
Contract
Interview
Applicant
Processing
Close
Complete
Process
Assign plan
Release lot
Confirm cert
Inv.postings
L-tInspCompl
Usage dec.
Res.L-tChar.
Selection
Close
Processing
In process
In_process
Process
Complete
Close
In_process
ECO Doc Flow
FIPP_COMPL
WFMC_CUSTOM1
WFMC_CUSTOM2
BSEG_SUBWF01
BSEG_FRAME1
WFMC_CUSTOM3
CreateLetter
CreateLetter
BSEG_SUBWF02
BSEG_SUBWF03
AppEvtCreatr
PrepareHire
MMIVquantity
ArchiveLink - EarlyInput
FI-AA subflow for error handling
FI-AA mass change/retir. w/o rev.type 1
FI-AA retirement with revenue dist.type1
FI-AA mass change/retir. w/o rev.type 2
Workflow template: Notif. of absence
Workflow for purch.req. release
WF test flow with one step
TestWF with parallelism and recursion
Applicant pool
Offer of contract of employment
Interview Applicant
Applicant processing
Process quality notification
Close quality notification
Complete task
Process PM notification
Assign plan
Release inspection lot for inspection
Confirm receipt of certificate
Perform missing inv.postings for lot
Long-term inspection completion
Make usage decision
Results recording long-term inspection
Applicant selection
Close PM notification
Process error records
Process quality notification
PM notification in process
Process service notification
Complete task
Close service notification
Service notification in process
Demo ECM Object equal Document
FIPP_COMPL
WFMC: Customizing Message Control
WFMC: Customizing output type
Release for payment single-stage
Release for payment (frame)
WFMC: Maintain access seq. and cond.tab.
Create + send letter
Create letter
Release for payment two-stage
Release for payment three-stage
Event Creator 'Vacancy assigned'
Prepare hiring
Handling invoice locked due to quantity
65
WS00400027
WS00400032
WS00600011
WS10000050
WS10000051
WS10000052
WS10000054
WS10000056
WS20000006
WS30000015
WS00000016
WS00000023
WS00000024
WS00000025
WS00000026
WS00000027
WS00000033
WS00000038
WS00000039
WS00000042
WS00000044
WS00200025
WS00200028
WS00200034
WS00200035
WS00200036
WS00200037
WS00200038
WS00200061
WS00200062
WS00200063
WS00200065
WS00200066
WS00200067
WS00200068
WS00200069
WS00200070
WS00200071
WS00200072
WS00200073
WS00200074
WS00200075
WS00200081
WS00200085
WS00200095
WS00200096
WS00200097
WS00200098
WS00200099
MMIVprice
FIPP_FRAME_2
ECM flow
crte_contrct
FIPP_FRAME
FIPP_SUBWF01
FIPP_SUBWF03
AL-EARLYINP
FIPP_SUBWF05
AF_process
AL-EARLYINP
AM_SUBWF
AM_WF_1
AM_WF_1_ERL
AM_WF_ALL
AM_WF_2_ERL
exmpformabs
wf_req_rel
ECM flow
ECO flow
ECO BOM flow
WF Test1
WF Test2
Pool
Contract
Interview
Selection
Applicant
Processing
Close
Complete
Process
Assign plan
Release lot
Confirm cert
Inv.postings
L-tInspCompl
Usage dec.
Res.l-t.ins.
Selection
Complete
Close
Processing
In process
In_process
Process
Complete
Close
In_process
WS00400002
WS10000021
WS10000044
WS10000048
WS10000049
WS10000050
WS10000051
WS10000052
WS10000053
WS10000054
WS10000055
WS10000056
WS20000001
WS20000006
WS00000023
WS00000024
WS00000025
WS00000026
WS00000027
WS00000033
WS00000038
WS00000039
WS00000042
WS00000044
WS00200028
WS00200034
WS00200034
WS00200034
WS00200035
WS00200035
WS00200035
WS00200036
WS00200036
WS00200037
WS00200038
WS00200061
WS00200062
WS00200063
WS00200065
WS00200066
WS00200067
WS00200068
WS00200069
WS00200070
WS00200071
WS00200072
WS00200073
WS00200073
WS00200073
ECO flow
AL-EARLYINP
exmpformabs
send_mail
CRTE_CONTACT
crte_contrct
FIPP_FRAME
FIPP_SUBWF01
FIPP_SUBWF02
FIPP_SUBWF03
FIPP_SUBWF04
AL-EARLYINP
Selection
FIPP_SUBWF05
AM_SUBWF
AM_WF_1
AM_WF_1_ERL
AM_WF_ALL
AM_WF_2_ERL
exmpformabs
wf_req_rel
ECM flow
ECO flow
ECO BOM flow
WF Test2
Pool
Pool
Pool
Contract
Contract
Contract
Interview
Interview
Selection
Applicant
Processing
Close
Complete
Process
Assign plan
Release lot
Confirm cert
Inv.postings
L-tInspCompl
Usage dec.
Res.L-T.ins.
Selection
Selection
Selection
WS00200074
WS00200075
WS00200081
WS00200085
WS00200095
WS00200096
WS00200097
WS00200098
WS00200099
WS00400002
WS00400004
WS00400005
WS00400006
WS00400011
WS00400012
WS00400014
WS00400019
WS00400020
WS00400021
WS00400024
WS00400025
WS00400026
WS00400027
WS00600011
WS10000021
WS10000048
WS10000049
WS10000050
WS10000051
WS10000052
WS10000053
WS10000054
WS10000055
WS10000056
WS20000006
WS30000015
Complete
Close
Processing
In process
In_process
Process
Complete
Close
InProcess
ECO Doc Flow
FIPP_COMPL
WFMC_CUSTOM1
WFMC_CUSTOM2
BSEG_SUBWF01
BSEG_FRAME1
WFMC_CUSTOM3
Create Letter
Create Letter
BSEG_SUBWF02
AppEvtCreatr
PrepareHire
MMIVquantity
MMIVprice
ECM flow
AL-EARLYINP
send_mail
CRTE_CONTACT
crte_contrct
FIPP_FRAME
FIPP_SUBWF01
FIPP_SUBWF02
FIPP_SUBWF03
FIPP_SUBWF04
AL-EARLYINP
FIPP_SUBWF05
AF_process
Complete task
Close PM notification
Process error records
Process quality notification
PM notification in process
Process service notification
Complete task
Close service notification
Service notification in process
Demo ECM Object equal Document
FIPP_COMPL
WFMC: Customizing Message Control
WFMC: Customizing message type
Release for payment single-stage
Release for payment (frame)
WFMC: Maintain access seq. and cond. tab.
Create + send letter
Create letter
Release for payment two-stage
Event Creator 'Vacancy assigned'
Prepare hiring
Handling invoice locked due to quantity
Handling invoice locked due to price
Engineering Change Master
ArchiveLink - EarlyInput
Send mail
Create contact
Create contract
Preliminary_Posting (Frame)
Release amount workflow single-stage
Release amount workflow two-stage
Release amount workflow three-stage
Acct assignment approval workflow
ArchiveLink - EarlyInput
Release amount workflow empty
Process notification of absence
68
WORKFLOW PERFORMANCE
GENERAL
To avoid an unnecessarily high number of tRFC calls during workflow implementation,
some activities of the workflow runtime system, such as data flow or processor
determination, are carried out under the userid of the person responsible instead of
under WF-BATCH.
NOTE: Remember to assign this user the necessary authorizations, in particular for the
HR authorization object PLOG. Assign more authorizations to the person responsible (for
example, for PLOG we recommend the profile P_PLAN_ALL) or add empty background
steps to your workflow definition (for example, based on the single step task
TS30000044, object type WFTS, method EMPTY_BACKGROUND). Ultimately, there is a
trade-off between security and performance. (See SAP Note 755767)
Note: The background user for the workflow runtime system or a user who creates an
event always occupies a work process if a transactional RFC is sent. This occurs during
the following actions in workflow:
o When starting event receivers (that contains exiting an asynchronous method).
o When starting a background step whose predecessor was not exited by an event.
Inbox
o The selection time of work items in a user inbox increases with the number of
tasks which the user may process.
o The selection time also increases with the number of available work items.
o Data of a work item may have to be read by the database.
PROGRAMMING TIPS
Reducing the number of work items for each workflow
o Replace reading/calculating background methods by virtual attributes (for the
evaluation of a virtual attribute, no work item is created).
o Group together several small background methods in one large group (a work
item is created for every background step).
Preventing unnecessary tRFCs
o Replace asynchronous methods by synchronous methods (thus the system
does not have to execute the exiting event = tRFC). This is usually possible if
the method is not exited in the update program.
o Do not check input data in the first workflow step but use the option to enter
a check function module in transaction SWE2. Thus you avoid the generation
of unnecessary work items and the relocation of unnecessary tRFCs.
Define the task assignment in the organizational model concretely. (Do not classify
tasks as general tasks). Every user should only be a possible agent of very few
tasks.
BASIS / CONFIG TIPS
Restrict the number of application servers on which you can start event receivers of
events generated on a large-scale. As a result, other application servers will be
available for 'regular' online operations. To do this, create a RFC destination of the
type '3' in transaction SM51 and permit the load distribution. Remember that system
parameters control the intervals according to which the message server searches
free application servers. Then enter this destination in the detail screen for the event
in transaction SWE2.
Remove columns from the starting configuration of the inbox. A subsequent selection
of the database occurs for the following columns:
o Task long name
o Finish by date
o Finish by time
o Overdue (up to and including Release 3.1I)
o Object (in older releases, object key 1)
o Group (in older releases, object key 2)
69
Archive work items that are not required for a longer period and subsequently
update the database indexes (read also notes 72873, 49545). Allow the system to
buffer as much data as possible. To do this, maintain the entries in group WFLOW in
table T77S0 (in particular, entries with identification codes BUF, INBOX, ROLE). With
WFLOW INBOX, the buffer mode is set for tasks that are assigned to a user, as well
as for organizational assignments of users. We can assume the following values:
o 'I' : Buffering in database INDX, refreshment at least once a day
o 'S' : Buffering in the shared buffer on the application server
o ' ' : No buffering
WFLOW ROLE is used to check the result of the agent determination. 'X' (recommended).
The agent is checked if it is a possible agent (and not an excluded agent, and so on).
WFLOW BUF is no longer.
As the system is running, index records are frequently created for the workflow
runtime tables and then deleted again. This has a negative effect on performance
during accesses via these indexes.
ARCHIVING WORKITEMS
Production: In production systems it is recommended you archive workitems using
the object WORKITEM. You can only archive workitems of status COMPLETED or
CANCELLED. (Use transaction SARA) It is NOT recommended you use report
RSWWWIDE in a production system because the report does not check
dependencies, so there is always a danger to delete steps in a flow which is not
completed.
Development/Test: Note(49545) To delete workitems using reports RSWWWIDE
RSWWWIDE - this report deletes the work item including all attachments and
dependent work items, and deletes the work item history.
tRFC and qRFC tables
The system has a very high interface load and/or many tRFC/qRFC entries are in the
error status and/or many tRFC/qRFCs wait for their processing
Before you solve the problem, you must make a more precise analysis of the
problem.
1. Outgoing t/qRFCs
Check whether you use tRFC or qRFC:
Use Transaction SE16 to check how many entries are contained in table
ARFCSSTATE.
Now determine for how many entries field ARFCRETURN is empty in table
ARFCSSTATE. These entries stand for tRFCs which have not been processed
yet or which encountered errors. Tables ARFCSSTATE and ARFCSDATA are
affected here, these tables contain many entries. (refer also to point 5)
2. Incoming t/qRFCs
a) Table ARFCRSTATE contains many entries, it does not matter if these were
written by tRFC or qRFC. Find solutions in Note 366869.
b) Tables TRFCQIN, TRFCQDATA or TRFCQSTATE contain many entries.
70
71
72
SCENARIO ANALYSIS
Scenario I
E-mails went to all the 5000 users: do not know what is the reason? And How?
Solution:
Before analyzing the problem; first stopped generating mails; and stop Scheduling
One using SM37 for stopping the Job Scheduler
Stopped SAP o/p outbound Mailer
Analysis
Workitem could not find the Actual agents; so it is sending mails to all possible
agents.
One person did the Manual posting; And when executed the workitem in the inbox;
It was trying to Mail to the actual agents; since Actual agent has already PO
manually; the workitem couldn't get the actual agent for posting and if passed on to
all Possible agents. So it sends e-mail to all the users.
Other action taken is if they still do manually; one function will check for whether
workitem is already there if there it will deleted the workitem and do the Manual
posting.
Scenario II
During Creation of Sales Order; VA01; for some Sales order workflow is not getting
triggered; for some it is getting triggered
They would have checked only for some order type for triggering. So for
some SO it gets triggered.
Scenario III
When the Approver Approved the Document, Document is/was posted; but when we
actually see it is only in Parked condition. Also workflow gave a popup message
document posted.
Analysis:
While go through identified they were using BDC in the background for posting
While tested BDC it worked properly in foreground; but when posting through
background it failed. After seeing the input file found out some field were blank and
caused error.
Solution:
Rectified the date
Scenario IV
Three documents was Initially parked; Three Different approver? All workitem in
Process and in the inbox
Who did Posting?? Manually
Analysis
Need to find out who did the posting; all the three of them calling and wants to know
who did posting.
From workflow long could able to find out Document got created and work time in
process;
So, for the Question How to find out that who did manual posting:
Went to the table CDPOS -> Changed document table, find out the change history of
the document, and identified the person.
Reverse the Process
Deleted workitem manually
Created SO again.
73
WORKFLOW SCENARIO
1. PURCHASE ORDER CHANGE
If an external material (non-stock material) or service (externally processed activity) has to
be procured for a certain production order, a purchase requisition must be created. The
purchaser responsible processes this requisition and one or more purchase orders are
created as a result. This is noted in the production order.
If changes are made to the materials or services ordered for the production order (changes
to the requirement quantity or requirements date), the system modifies the purchase
requisition automatically. Any purchase orders that have already been created must be
changed manually by the purchaser responsible.
Using SAP Business Workflow, the purchaser responsible can be informed if
Changes are made to the requirement quantity or requirements date for an external
material or externally processed activity
An external material item or external service activity has been deleted
An external activity has been changed to an internal activity
Or if a production order has been technically completed and the external material or
activity are no longer needed
And if one or more purchase orders have already been created.
The purchaser receives a work item containing all of the relevant changes regarding the
external materials and activities. He or she can then display the relevant purchase
requisitions and any purchase orders that have already been created. The purchase orders
can also be edited or new ones created.
people assigned to this job receive a work item in their integrated inbox, where they can
cancel, release or process the credit memo request.
o Cancel credit memo request
The employee has to enter a reason for rejection. The system automatically transfers
the reason for rejection into the credit memo request and stops processing.
o Release credit memo request
The system automatically removes the billing block in the credit memo request and
releases the document for billing.
o Process credit memo request
Here, the user branches into the "Change sales order" transaction, where they can
use all the functions in this transaction. According to the users authorization, he or
she can remove a billing block, enter a reason for rejection, or process individual
items (for example, delete or add order items, or change the order quantity).
The system checks whether the billing block was removed manually. If there is a
billing block, the system re-checks the value of credit memo request and informs the
employee responsible. This process is repeated until the credit memo request has
either been rejected or released.
Below 10,00.00
No approval , directed to release
10,00.00 1,00,00.00
2
1,00,01.00 2,00,00.00
3
75
Check the Purchase order price with Invoice Price if there is any price variance ,Block
the invoice due to Price variance and send an invoice to FI dept to Cross verify. The
Workitem will get terminated until FI dept Changes the invoice or any Reversal is
created or manually release a particular invoice. The Workflow will not be completed
until posting is completed.
Create a function module to approve the incoming invoice.
Final integration and Business Automation processes have to perform in MM, FI
module.
Design and developed workflow template for Sales Order Cancellation Workflow.
Extend Business object VBAK.
Maintain Change document event linkage.
Create new events and methods in the extended subtypes.
Created the role resolution for determining the approvers.
Process Flow:
When a Sales Order Item has been rejected, a work item will be sent for approval to the
Approvers. The Approvers are maintained in Custom Tables in ZWFSO_AGENTS,
ZWFSO_LEVELS. This cancellation has to be carried out at four different hierarchies;
After the cancellation, the change made has to be informed to the agents via a Script
Document. ( Use Dynamic Parallel Approval Procedure ).
Design and develop workflow template for notification of Sales Order Creation.
Extend Business object BUS2032
Create a role to determine the Inside Sales Person.
The notification will also list the materials not maintained in Sales Area.
Will also update schedule line dates using BAPI BAPI_SALESORDER_CHANGE.
Process flow:
Whenever an Intra-Company Sales Order created, the workflow will be triggered and
notifies the Inside-sales person, maintained in a custom table. This notification has to be
sent to both the highest authorities of the two departments. (Use Evaluation Path
Method).
Use Business Objects IDOC and its subtypes for tracking the incoming idoc.
Create a Subtype for the Bus2012 by creating new methods and events.
Create user-defined methods to validate the idoc and to check for any other changes
in the incoming idoc.
Process Flow:
When ever an order confirmation for the PO is received, if the Schedule Quantity
does not match with Vendor Quantity. A Workflow will be triggered to notify
Purchasing group. The change in quantity has to be modified in the PO document.
76
Process Flow:
Whenever any changes in Address Info type, a notification will be given to Payroll
Department, mentioning the change made as an attachment.
8. Inquiry Notification Workflow ( Venkateeshz , Tamilarasan )
Design the workflow and business objects for SD Module. Inquiry and quotation.
Process flow:
After creating the inquiry, the material availability is checked. If material is not
available, it will be sent to PPC Dept.to find out whether item can be made
inhouse/boughtout. If it is bought out, the message will be notified to Finance Dept.
After Approval at Finance Dept it will be notified to purchase dept to procure the item.
10. PURCHASE ORDER APPROVAL WORKFLOW
Workflow have to trigger only when the order value is greater than $2000.00 and the
number of line items is greater than 2, block the purchase order and trigger workflow for
approval. If the Workflow gets started, it will send the Work item to the Manager for
approval process. If he doesnt take any action for a day, the work item will be escalated to
the next level manager for approval process. If the Purchase order is changed during the
approval process, the workflow will be terminated. Use release Strategy Procedure for
releasing a Purchase order .
11. REQUEST FOR QUOTATION WORKFLOW
Trigger workflow whenever RFQ is created.
If the RFQ quantity is greater than 20 . RFQ will automatically block. It has to trigger a
workflow for Release . ( Use release Strategy Procedure ) .
Once the RFQ is released,
A notification containing the details of Vendor, person created the RFQ and purchase
document number is sent to the purchasing group manager for approval.
The manager has been given an option to execute the work item or it can be escalated to
another same level of manager for approval.
The approval status is sent to the creator of the RFQ for further proceedings.
( Use dynamic Circular Approval Procedure )
Add a method in a Business Object to create a report for Blocked RFQs and also for
particular Purchase organization and send an
attachment related to all Purchase
organization agents!
77
79