Documentos de Académico
Documentos de Profesional
Documentos de Cultura
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.
ADVANTAGES OF USING WORKFLOW
a. Duration of the process is reduced dramatically.
b. The process definition becomes transparent i.e. everyone knows what they are doing and
why.
c. Each process instance is transparent. During the process run and afterwards you can
track who did what, when.
d. The process is under control. We can change the definition on the fly to improve it or
react to sudden changes in the environment.
STEP TYPES
ACTIVITY Execution of a task. This task can be a single-step task or a Multistep task
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 Step type in a workflow definition for creating documents on the basis of
FROM TEMPLATE user-defined 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).
LOOP (WHILE) 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.
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 Step type in a workflow definition to execute one of two defined paths
in the definition. ("Two-way fork"). The Workflow system decides on
the path on the basis of the defined conditions and information
contained in the Workflow container as values.
You define conditions using the conditions editor, which allows you to
define complex and multilevel conditions.
2
workflow container) is checked against the comparison values defined.
WAIT FOR EVENT 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.
PROCESS The functions Cancel work item or Set work item to obsolete are applied to
CONTROL other Work items of the current workflow. It will be useful to cancel any
previous work item.
USER DECISION In User Decision Title (Max. 80 Chars). 4 User parameters from workflow
container can be substituted. [Substitution by position].
Ex : Title : Leave Approval Done by &Workflow Version& Sales Order
Number &Customer No&
P1 : &Wf_Initiator& P2 : &WF_Version&
P3 : &Sales.Salesdocument& P4 : &Sales.OrderingParty. Customer No&
Result :
Title : Leave Approval done by US KAAV02 workflow Version0000 Sales
Order No. 7343 Customer No. 470.
AD HOC ANCHOR U specify workflows that can replace this step. At runtime, an authorized
user can select one of the specified workflows. The steps of this workflow
then dynamically replace the Ad Hoc Anchor.
SUB WORKFLOW An activity that refers to another workflow rather than a task. A binding
from the workflow container interfaces with the sub-workflow container.
3
MACROS (INCLUDE <CNTN01>)
For Declaring Purpose:
BEGIN_DATA << Start of the object declaration >>
END_DATA << End of the object declaration >>
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
4
Copies a container element from a source container to a target container.
SWC_REFRESH_OBJECT <Object>
Invalidates the object reference buffer so that all attributes will be
recalculated when they are next called.
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 Resets the timestamp on all HR buffers
RH_TASK_INBOX_VIEW_REFRESH Refreshes the buffer for the current user only
RH_TASH_AGENTS_INDEX_REFRESH Refreshed the buffer for a particular task ID only
5
_Wf_priority Priority of workflow instance
_Wi_group_id Grouping characteristics for workflow instance
_Workitem Workflow Instance
_Wf_version Definition version of this workflow instance
EVENT TRIGGERING
SWEC - Change documents Status changes of objects which are logged as change
When change documents are documents are reported automatically as events as well.
written (W)
BSVW- General Status Mgt. The system automatically creates an event for objects
Event creation upon status changes that use general status management when an object
status changes. Table: CDHDR
AWUW - Logistics Info. System The occurrence of an exception situation defined within
(LIS) the LIS as an exception is to cause an event to be
When an exception situation occurs created. (W)
(LIS exception)
6
SWEHR1/2/3 - HR Master Data Must carry out the following Personnel Management
When HR master data changes Customizing activities:
IMG under Personnel Management Global Settings in
Personnel Management Business Workflow Events.
7
WORKFLOW AFFECTED TABLES
REPORTS
RSWWWIDE – Delete work items (SWWL)
RHSOBJCH - fix PD Control Tables
RSWUWFML/ RSWUWFML2 - sends an e-mail to an external Internet address
to notify the user of new work items.
RSWNSENDMAIL1 – Send E-Mail to external Id with Subject and Content
RSWELOGD - Delete Event Trace
8
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
PFT Maintain customer task
PFTC General task maintenance
PFTC_DEL Tcode to delete Task/Workflow
PFTC_INS, PFTC_CHG, PFTC_DIS, PFTC_COP – Task (Std. WF)
PFAC_INS, PFAC_CHG, PFAC_DIS, PFAC_DEL – Role Resolution
PPOCW – Create Organizational Plan
9
SWELS Switch Event Trace On/Off
SWF3 Workflow Wizard Explorer
SWF4 Workflow Wizard Repository
SWI1 Selection report for workflows Utilities Work item selection
SWI2 Work item analysis Reporting Work item analysis
SWI2_DURA To find duration of work item.
SWI3 Workflow outbox Runtime tools Workflow outbox
SWI4 Task analysis Reporting Task analysis
SWI5 Workload analysis Reporting Workload analysis
SWI6 Object links Runtime tools Object links
SWI7 Workflow resubmission folder From Integrated Inbox or Workflow Outbox
SWI8 Error overview Part of administration of workflow runtime system
(transaction SWUF)
SWL1 Settings for dynamic columns Customizing, part of ongoing settings
SWLC Check tasks for agents
SWLD Workbench for Workflow 4.0
SWLP Copy plan version
11
AGENTS
E
Agents are the people
•
who may execute
a workflow task
P • “Possible Agents” are
those users who are
authorized to start and
execute a task, but may
not be the “selected
agents”
• “Responsible Agents”
R
are the people you
want to execute a
specific workitem
• “Excluded Agents” are
A people you do NOT want
to execute the workitem,
even though they are a
possible or a responsible
agent. For example, a
person who is
responsible for
approving travel
expenses should
probably not be allowed to approve their own travel expenses
12
APPROVAL PROCEDURE
Hierarchical Approval
Dynamic Hierarchical Approval
Extended Hierarchical Approval
Parallel Approval
Circular Approval
Dynamic Circular
Parallel Circular
Dynamic 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).
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.
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:
The workflow system automatically makes proposals for the following binding definitions.
Workflow container to task container.
Task container to workflow container
Task container to method container
Method container to task container.
WORK ITEM
A work item is an object that represents a task or action in the workflow system at runtime.
The following are the types of work items:
14
TASKS
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.
15
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
TRANSACTION CHANGE
BUSINESS OBJECT DESCRIPTION
DOCUMENT
GENERAL
DECISION For User Decision
SOFM Office Document (For
SW attachment )
PURCHASE RELATED
BUS2010 RFQ ME41 EINKBELEG
BUS2011 VENDOR QUOTATION ME47 EINKBELEG
BUS2012 PURCHASING ORDER ME21 EINKBELEG
BUS2105 PURCHASE REQUISITION ME51 BANF
LFA1 VENDOR MASTER MK01 KRED
BUS1001 MATERIAL MASTER MM01 MATERIAL
BUS2013 SCHEDULING AGREEMENT ME31L EINKBELEG
BUS2014 PURCHASE CONTRACT ME31K EINKBELEG
BUS2081 INCOMING INVOICE MIRO
BUS2081 PARKING MIR7
SALES RELATED
BUS2030 CUSTOMER INQUIRY VA11 VERKBELEG
BUS2032 SALES ORDER VA01 VERKBELEG
LIKP OUTBOUND DELIVERY(SHIP) VL01 LIEFERUNG
BUS1065 HR Master data PA30 -- NO ---
BUS0012 Cost Center KS12 KOSTL
BUS2094 CREDIT MEMO FB75 LIEFERUNG
MASTER DATA
BUS1006 Business Partner
BUS1178 Product
BUS2300 Product Catalogue
18
WORKFLOW - FAQS
What do you mean by role Finding the responsible agents and assigning task to him
resolution
How will u raise the EXIT_RETURN <Exception> <Var1> <Var2> <Var3> <Var4>
Exception?
How does triggering local This step enables you to trigger a local event. A local event can, for
events work? example, start a local Workflow.
You define local events in the version-dependent basic data of the
Workflow.
What are the five attributes Interfaces
used in business object? Key fields
Attributes
Methods
Events
What are the types of data ABAP dictionary – reference table/reference field
u can create for attribute? Object type – Inverse attribute
What is meant by a Single- Its defines an activity that can be executed within a workflow or
step task? Independently and no agents are assigned to a single-step task.
19
What is the function module SWE_EVENT_CREATE,
for triggering the event? SAP_WAPI_ CREATE_EVENT.
What is CHECK function It is a transaction which used to prevent a linkage being triggered
module? when an event occurs
What is meant by event Events which are in queue are called an event queue. This is
queue? achieved by TRFC for starting the receivers not being called
immediately
Which container operation Workflow container
can be modified?
What does a check box If it is checked the graphics will not be displayed in the business
“Step not in workflow log” Workflow log and if it not checked it will be displayed.
do? What happens when it
is checked and when it is
not checked?
What is the difference b/w A release strategy workflow is exclusively for purchase order and
regular workflow and purchase requisition and other than this other workflows is regular
release strategy workflow? workflow
What are the difference Rule (PFAC) assigns agents at Run time based on Organization,
b/w a rule and a role? Responsibilities and Function Modules.
Role (PFCG) assigns agents at Static Mode and gives the authority
check
Multi step task 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)
How do you trigger a workflow Manually
Calling a Start Transaction
Calling a Form Transaction
20
Binding First Ref : Binding takes place before execution ( WF - > Task )
Sec. Ref : Binding takes place after execution ( Task -> WF )
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 user’s 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
Synchronous Method 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
Asynchronous Method It does not report back directly to the calling component after its
execution. Dialog Step
No return Parameters, One Result & Exceptions
It reports back to the It does not reports back directly to the calling component
calling component after its execution
21
The workflow didn’t 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.
Condition Based Starting W/F 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. It’s not
available in release prior to Release 4.6C.
How will u delete a work item, Use SWWL transaction
which is in the inbox? Use RSWWWIDE Standard Report
Use Process Control Step in Workflow template
Use SWUF (Workflow Admin)
How can I pass parameters SWW_WI_START_SIMPLE is the Function Module used for
from an ABAP program to the triggering workflow from ABAP.
workflow container? (Try also SWW_WI_CREATE_VIA_EVENT)
How to Trigger another In an Activity, just call the workflow, as u calls the task…
workflow from a workflow in
process?
How can you make event SWEC
linkage? SWE2
SWB_COND
US - User
O - Organization Unit
S - Position
AG - Role
AC - Rule
A - Work Center
P - Applicant
C - Job
F - Location
K - Cost Center
KU - Customer
P - Person
TG - Task Group
TR - Transaction
U - Company
UG - User Group
WA - Work Area
WE - Workflow Event
WF - Workflow Task
WI - Workitem
T / TS Task
22
ACTIVITY 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)
ADVANCE WITH Execution property of the workflow system. A work item for which this indicator
IMMEDIATE DIALOG 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.
AFTER METHOD 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.
AGENT 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
APPROVAL TASK 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.
ASYNCHRONOUS Method that does not report back directly to the calling component (in this case
METHOD 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.
ATTACHMENT 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.
ATTRIBUTE 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
BACKGROUND Work item representing a single-step task whose execution does not require
WORK ITEM 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 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.
BINDING Assignment of values to a container element at runtime.
The assignment rules to be observed are first defined in the binding definition.
BUSINESS Tool for:
WORKFLOW DISPLAYING ALL TASKS ASSIGNED TO A SELECTED SEARCH RANGE
EXPLORER 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
CHECK FUNCTION Function module called SYNCHRONOUSLY IN THE LUW of the event receiver by
MODULE 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.
COMPOSITION "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.
CONTAINER 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.
CONTAINER General information about the structure of the data to be stored in a container.
DEFINITION 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 Entry in a container. It is defined by specifying the following:
ELEMENT ID
NAME
DATA TYPE REFERENCE
CONTAINER Step type in a workflow definition for performing elementary arithmetic
OPERATION operations or value assignments on individual elements of the workflow
container at runtime.
CREATION Point in time at which a work item was first created with the status ready or
DATE/TIME waiting. The latter applies if a "requested start" was declared for the work
item.
CUSTOMER TASK A single-step task created by a customer to meet their specific requirements.
The following apply to customer tasks:
OBJECT TYPE T IN ORGANIZATIONAL MANAGEMENT
CLIENT-SPECIFIC
VALIDITY PERIOD
PLAN VERSION-SPECIFIC
DATA TYPE Description of the data type of the value that can be assigned to a variable (for
REFERENCE example attribute or container element) at runtime. The data type reference is
created during definition and enables the system to perform checks at
definition time.
A data type reference may be:
VIA FIELD REFERENCE TO AN ABAP DICT. TABLE OR STRUCTURE & FIELD.
VIA STRUCTURE REFERENCE TO AN ABAP DICTIONARY STRUCTURE OR TABLE.
VIA REFERENCE TO AN OBJECT TYPE.
DATABASE FIELD When this type of attribute is defined, reference is made to a database field as
ATTRIBUTE the source of the required information.
An attribute whose source is a database field can either return the database
field contents or an object reference, which is automatically generated from the
field content.
DEADLINE Functions in the workflow runtime system, which monitor start and end
MONITORING deadlines for the processing of selected work items.
The monitoring of the requested start ensures that the work item appears in a
Business Workplace at a defined point in time, and not before.
MISSED DEADLINE NOTIFICATION
Recipients of a missed deadline message are notified with a missed
deadline work item in their Business Workplaces.
MODELLED DEADLINE MONITORING
The reaction is modelled in the workflow definition.
DECISION TASK Single-step task with which the workflow system executes a user decision in
the workflow. The method "process" of object type "DECISION" is always
executed with a decision task. Decision tasks can differ in the following ways:
TEXTUAL CONTENT (TASK DESCRIPTION, NOTIFICATIONS)
ASSIGNMENT OF POSSIBLE AGENTS
The decision task TS00008267 (generic decision task) supplied by SAP is used
as standard in the user decision. You can specify another decision task when
defining the user decision.
DEFAULT Attribute or key field of an object, which is entered in the basic data of the
ATTRIBUTE object type on the tab page Defaults.
The value of the default attribute is displayed when an object is to be described
in greater detail. This applies, for example, if a list of objects is displayed. The
default attribute of an object can also be used as a sort key in the Business
Workplace.
Often the default attribute is a key field of the object. If no default attribute is
defined for object type, the key fields of the object are displayed.
25
DEFAULT METHOD 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.
DEFAULT ROLE 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.
DELEGATION TYPE Object type whose definition is considered at runtime instead of the definition
(SWO6) 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.
DIALOG WORK Type W work item that represents a single-step task at runtime, which requires
ITEM 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 single-
step task is called. Dialog work item execution can be deadline-monitored.
DOCUMENT 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
DOCUMENT FROM Step type in a workflow definition for creating documents on the basis of user-
TEMPLATE defined 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).
END 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.
ENTITY TYPE Each object type can be assigned to an entity type, which further classifies the
object type in the company environment.
EVALUATION PATH 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.
EVENT 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
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.
EVENT CONTAINER 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.
EVENT CREATION 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.
EVENT MANAGER 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)
EVENT PARAMETER 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.
EVENT RECEIVER 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.
EXCEPTION 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.
EXCLUDED AGENT 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.
EXPRESSION Umbrella term for constant, variable and system field.
In the context of an expression the following terms have the following
27
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.
FORM TASK 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.
GENERAL TASK 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.
IMPLEMENTATION ABAP program containing the implementation of methods and attributes of the
PROGRAM 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.
INHERITANCE 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.
INSTANCE LINKAGE 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.
INTERFACE Collection of attribute, method and event definitions for an object type, which
are used in a common context.
28
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.
INTERFACE TYPE 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.
KEY FIELD 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 END 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.
LATEST END Deadline by which the processing of a work item MUST BE TERMINATED.
LATEST START Deadline by which one of the recipients of a work item MUST HAVE STARTED to
process it.
LINKAGE TABLE 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.
LOOP Repeated processing of steps within the workflow definition.
UNTIL and WHILE are available as loop types.
MESSAGE User who is informed when a work item or workflow has been fully processed
RECIPIENT FOR and its status set to completed .
COMPLETION 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).
MESSAGE User who is notified if the workflow runtime system discovers a missed
RECIPIENT FOR deadline.
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.
METHOD 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
You can specify the following for each method:
IMPORT PARAMETERS (FOR SYNCHRONOUS AND ASYNCHRONOUS METHODS)
A RESULT (ONLY SYNCHRONOUS METHODS)
EXPORT PARAMETERS (ONLY SYNCHRONOUS METHODS)
EXCEPTIONS (ONLY SYNCHRONOUS METHODS)
METHOD Method parameters are used to exchange information between the caller of a
PARAMETER method and the method. They can be defined for each method as part of the
object type definition.
Parameters of a method are values which are either passed to the method
(import parameters) or are returned from the method (export parameters) at
runtime.
The interface of the method call is hence determined with the definition of the
parameters.
A method will rarely, however, have more than one return value which is
returned specifically as its result. Parameters are therefore generally only used
as import parameters of the method.
MISSED DEADLINE Work item for notifying the message recipients for missed deadline if the
WORK ITEM runtime system discovers a missed deadline for a work item.
The notification takes place in the form of a type D work item in the Business
Workplaces of the relevant recipients. The recipients are specified when the
step is defined. The notification text is entered when the task to be monitored
is defined.
When a missed deadline work item is executed, the most important information
about the monitored work item is displayed.
MULTIPLE Step type in a workflow definition to process one of more defined branches of
CONDITION the workflow definition at runtime. This is based on information from the
context of the workflow or the objects processed. The value of the basis of
comparison (expression from workflow container) is checked against the
comparison values defined.
MULTISTEP TASK Task containing a workflow definition. It describes the formal "framework"
(interface, triggering events) for a workflow definition.
Multi-step tasks can be split into workflow templates and workflow tasks.
WORKFLOW TEMPLATE WORKFLOW TASK
ORG. OBJECT TYPE WS ORG. OBJECT TYPE WF
CROSS-CLIENT CLIENT-SPECIFIC
ANY PLAN VERSION PLAN VERSION-SPECIFIC
NO VALIDITY PERIOD VALIDITY PERIOD
NODE Superordinate term for steps, outcomes, triggering events and operators in a
workflow definition.
NOTIFICATION OF Notification of the recipient of the completion message.
COMPLETION The notification of completion is sent as a mail document and displayed in the
Business Workplace of the relevant recipient. Notifications of completion are
sent if the following apply:
THE WORK ITEM IS SUCCESSFULLY TERMINATED (STATUS Completed)
AN APPROPRIATE RECIPIENT IS ENTERED IN THE DEFINITION
The notification of completion contains the notification text defined for the task,
and a reference to the workflow log or work item display.
OBJECT Any type of related information which can be accessed uniquely under an
identifying key. Most of this information is generally stored in an ABAP
Dictionary table.
Objects are created at runtime and are the specific instances of a previously
defined object type which have been assigned values.
OBJECT MANAGER The tools provided for object handling and object type handling are referred to
as a whole as the object manager.
30
OBJECT REFERENCE Reference to the data of an object in the Business Object Repository. Object
data is made available at runtime in an internal table. The object reference
contains a reference to this internal table.
OBJECT STATUS Attribute whose value is an object status (CO status management).
ATTRIBUTE
OBJECT TYPE Description of data (objects) in the system created at definition time in the
Business Object Builder. Examples:
DOCUMENTS (INVOICES, PURCHASE REQUISITIONS, JOB APPLICATIONS, AND SO
ON)
MASTER DATA (CUSTOMER, MATERIAL, VENDOR, AND SO ON)
TRANSACTION DATA (ORDER, QUOTATION, AND SO ON)
Object types are described and implemented by specifying the following
components:
BASIC DATA
KEY FIELDS
ATTRIBUTES
METHODS WITH PARAMETERS, RESULT AND EXCEPTIONS
EVENTS WITH PARAMETERS
IMPLEMENTATION PROGRAM
The Business Object Repository provides a full directory of all object types.
The object type must be defined before its data (objects) can be used in the
system.
OBJECT TYPE You define and implement object types by specifying their components in the
COMPONENT Business Object Builder. An object type is made up of the following
components:
BASIC DATA
KEY FIELDS
ATTRIBUTES (= OBJECT PROPERTIES)
METHODS (= OPERATIONS ON OBJECTS) WITH PARAMETERS, RESULTS AND
EXCEPTIONS
EVENTS WITH PARAMETERS
IMPLEMENTATION IN PROGRAM
ORGANIZATIONAL Certain Organizational Management objects are important for the integration of
MANAGEMENT SAP Business Workflow and PD Organizational Management. The objects are
OBJECT identified using a 2-character identifier for their object type and an 8-digit
number or 12-character name.
The follow object types are used for the organizational plan and for the
specification of agents and responsibilities:
O - ORGANIZATIONAL UNIT
C – JOB
S – POSITION
US – USER
P - EMPLOYEE
A - WORK CENTER
AC - ROLE
Tasks are identified as follows:
STANDARD TASKS (TS), CUSTOMER TASKS (T )
WORKFLOW TEMPLATES (WS), WORKFLOW TASKS (WF)
The Organizational Management objects also have an abbreviation (which is
not necessarily unique) and a descriptive name.
POSSIBLE AGENT User who is organizationally authorized to start a task and execute the
associated work item.
The possible agents are not usually expressed with a full list of all user names,
but with organizational units, positions and jobs. The possible agents of a task
31
are specified in the task definition.
Without possible agents a task cannot be executed or started in dialog.
PROCESS CONTROL Step type in a workflow definition for performing the following operations at
runtime:
CANCEL WORK ITEMS OF THE CURRENT WORKFLOW
SET WORK ITEMS OF THE CURRENT WORKFLOW TO OBSOLETE
TERMINATE THE WORKFLOW
CANCEL THE WORKFLOW
PROCESS TIME Time during which a work item is being processed. The calculation of the
process time depends on the type of the work item.
RECEIVER SWW_WI_CREATE_VIA_EVENT is the Receiver function module, which is
FUNCTION MODULE 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.
TEMPLATE RECEIVER FUNCTION MODULE SWE_CD_TEMPLATE_REC_FB IS
AVAILABLE IN THE FUNCTION GROUP SWE_TEMPLATE.
The interface of this function module is standard and predefined. The receiver
function module expects the ID of the event, the event container and the name
of the receiver type as input parameters. Return parameters are not passed by
the receiver function module.
The receiver function module is called with the above parameters if the event
entered in the type linkage table occurs and the check function module (if any)
terminates without an exception.
The receiver function module must be marked as RFC-enabled.
RECEIVER INSTANCE Instance that is continued or terminated when an event occurs for an object.
The receiver instance is entered in the instance linkage table at runtime by the
potential event receiver. When the event manager sets up the instance linkage,
it writes the receiver instance into the event container and passes it to the
receiver function module declared in the instance linkage table for further
processing.
In a workflow, wait steps and activities that reference a single-step task with a
terminating event create an entry in the instance linkage table. The number of
the work item of the wait step or activity is used as the receiver instance. The
system makes the entry.
RECEIVER TYPE OPTIONAL INPUT PARAMETER for the receiver function module.
The receiver type is stored in the type linkage table and is entered by the
system. The entry is made at definition time if triggering events are defined for
tasks. The entry is made at runtime if a wait step or activity that references a
single-step task with a terminating event is executed.
WITH TRIGGERING EVENTS OF TASKS, THE RECEIVER TYPE IS THE ID OF THE TASK
TO BE STARTED.
WITH WAIT STEPS OR TERMINATING EVENTS OF SINGLE-STEP TASKS, THE
RECEIVER TYPE IS "EVENTITEM" OR "WORKITEM".
RECEIVER TYPE Function module for DYNAMIC DETERMINATION of the receiver type.
FUNCTION MODULE The receiver type function module is called before the receiver function module
is called, provided it is entered in the type linkage table.
The event container is evaluated in the receiver type function module, and a
receiver type determined from the information contained. Usually no receiver
type function module is required.
If you think you need your own receiver type function module, the template
function module SWE_CD_TEMPLATE_RECTYPE_FB is available in the
function group SWE_TEMPLATE.
REQUESTED END Deadline by which the processing of a work item SHOULD be terminated.
REQUESTED START EARLIEST POINT IN TIME AT WHICH THE WORK ITEM CAN BE EXECUTED.
32
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.
RESPONSIBLE User assigned locally to a step in the workflow definition.
AGENT The system establishes the recipient(s) of a work item from the intersection of
responsible and possible agents.
RESULT 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.
ROLE 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>"
ROLE DEFINITION 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.
ROLE RESOLUTION 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 SAP Business Workflow comprises technologies and tools for the automatic
WORKFLOW 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.
SAPFORMS 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.
SECONDARY Method that is executed in addition to the main method in the execution of a
METHOD 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
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.
STANDARD TASK 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
START 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.
STEP 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.
STEP DEFINITION Part of a workflow definition. The step definition contains all the data relevant
to the step. The scope depends on the step type defined.
STEP NAME Name to label a step in the workflow definition.
SUBSTITUTE Collection of a substitute's "rights".
PROFILE 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.
SUBTYPE 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.
SUBWORKFLOW 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.
SUPERTYPE 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.
SYNCHRONOUS Method that assumes process control for the duration of its execution and
METHOD 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
RETURN PARAMETERS
ONE RESULT
EXCEPTIONS
TABLE ELEMENT 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.
TASK 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.
TASK CONTAINER 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.
TASK GROUP 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.
TERMINATING Event whose occurrence terminates a single-step task.
EVENT 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 single-
step 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)
TOTAL TIME Sum of process time and wait time.
TRIGGERING EVENT 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.
TYPE LINKAGE 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
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.
UNTIL LOOP 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.
USER DECISION 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).
VIRTUAL ATTRIBUTE 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.
WAIT STEP 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.
WAIT STEP WORK Type E work item representing a wait step in a workflow at runtime, which
ITEM waits for a published event to occur.
WAIT TIME 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.
WHILE LOOP 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.
WORK ITEM Runtime representation of a task or a step in the workflow definition.
There are various types of work item.
WORK ITEM Runtime representation of the task container of a single-step task.
CONTAINER
WORK ITEM All information and activities are displayed, which are relevant in the
DISPLAY 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.
WORK ITEM Active unit which provides methods for the work items.
MANAGER The work item manager has the following functions:
36
THE WORK ITEM MANAGER CAN INITIATE CALLING OF BACKGROUND PROCESSES.
THIS IS NECESSARY BECAUSE ACTIVITIES IN THE WORKFLOW DEFINITION CAN
REFER TO OBJECT METHODS WHICH RUN IN THE BACKGROUND.
THE WORK ITEM MANAGER IS RESPONSIBLE FOR DEADLINE MONITORING AND
INITIATING APPROPRIATE MEASURES (ESCALATION).
THE WORK ITEM MANAGER MAKES AVAILABLE THE EVENT INTERFACE. IT ACTS AS
THE RECEIVER OF EVENTS FOR TASKS WHICH ARE TERMINATED BY AN EVENT AND
FOR WAIT STEPS.
WORK ITEM TEXT Text that appears in the Business Workplace to describe the work item. The
work item text is defined with the single-step task.
The work item text can include up to four expressions that refer to the task
container. A text is then displayed at execution time, which incorportaes the
current values of the container elements.
WORK ITEM TYPE There are various types of work item.
The work item type determines the internal processing. The type also
determines which statuses and status transitions are allowed.
Certain work items are displayed to a user in their Business Workplace,
depending on the type. Other work items are only used and processed
internally within the system.
Work items of the following types are displayed in the Business Workplace:
DIALOG WORK ITEM (TYPE W)
Runtime representation of single-step tasks requiring user dialog.
MISSED DEADLINE WORK ITEM (TYPE D)
Work item for notification upon missed deadline.
WORK QUEUE WORK ITEM (TYPE A)
Runtime representation of a work queue.
There are other work item types that can only be seen using the selection
report for displaying work items.
WORK QUEUE List of objects that are to be processed once and together within a specified
period.
The work queue provides a "framework" for the individual entries to be
processed and manages the list of objects to be processed, including their
statuses and the tasks to be executed on them. The status of the work queue
work item (type A) indicates the processing status of the work queue overall.
WORK QUEUE Work item of type A, which represents a work queue at runtime.
WORK ITEM Work items of type A are displayed in the Business Workplace. The processing
status of the work queue overall can be derived from the status of the work
item.
WORKFLOW Execution of a multistep task at runtime.
A workflow consists of a sequence of steps, which are processed either by
people or automatically by the system.
The chronological and logical sequence of the steps, linked to the evaluation of
conditions, is monitored by the workflow manager and can be controlled
flexibly with event-related response mechanisms.
From a technical point of view, a workflow is represented by a workflow work
item (type F).
WORKFLOW The workflow container contains workflow-specific system variables and other
CONTAINER container elements to be defined explicitly.
The container elements for which the import or export indicator is set form the
data interface of the workflow. This interface applies to all versions of the
workflow definition.
Container elements for which no import or export indicators are set are local
container elements in the workflow definition. They are subject to versioning
and are only valid in the versions of the workflow defintion in which they were
37
defined. They can be used as indicators or internal counters amongst other
things.
WORKFLOW LOG Log for a workflow, which contains all the workflow steps whose processing has
been at least started so far.
You can double-click in a workflow log to display work items (and change them
if you have the appropriate authorization).
Any errors during a workflow are displayed in the workflow log and can be
analyzed with the help of the error messages displayed.
You can go to the following, amongst other things, from the workflow log:
ATTACHMENTS
AD HOC OBJECTS
PROCESSED WORK ITEMS
SUBWORKFLOWS
AGENTS INVOLVED
WORKFLOW User-specific list of work items for the tasks that were:
OUTBOX STARTED BY THE USER IN DIALOG
TRIGGERED BY AN EVENT CONTAINING THE NAME OF THE USER IN THE CONTAINER
ELEMENT _EVT_OBJECT IN ITS EVENT CONTAINER
The workflow outbox is part of the Business Workplace.
WORKFLOW User-specific list of work items "resubmitted" by this user. The work items are
RESUBMISSIONS displayed with their resubmission dates.
WORKFLOW SYSTEM Person responsible for the workflow definition from a technical point of view.
ADMINISTRATOR The workflow system administrator can be set globally in the administration
data of the Workflow Builder, or individually for each workflow definition in its
basic data. The maintenance of the global workflow system administrator is
part of Workflow Customizing.
A workflow system administrator is assigned to each workflow at runtime. The
entry in the basic data is evaluated for this. Only if this is blank is the entry in
the administration data evaluated.
The system administrator of a subworkflow is derived automatically from the
data of the superordinate workflow. This also applies if another system
administrator is maintained in the basic data of the subworkflow.
Neither changes to the basic data or the Customizing settings nor
organizational reassignments have any effect on workflows that have already
been started.
The workflow system administrator should be able to repair errors in
workflows. If a workflow that has been started assumes the error status, the
workflow system administrator receives a mail in their Business Workplace
inbox. The workflow log can be used to perform analyses and remove errors.
If a workflow fails to start, only the workflow system administrator entered in
the Workflow Builder is notified.
Information about the workflow system administrator is available as an
attribute in the workflow container element _Workitem.
WORKFLOW TASK Multistep task created by a customer to meet their specific requirements.
These tasks contain a workflow definition.
The following apply to workflow tasks:
ORGANIZATIONAL OBJECT TYPE WF
CLIENT-SPECIFIC
VALIDITY PERIOD
PLAN VERSION-SPECIFIC
TEMPLATE Multistep task with the following properties:
WORKFLOW ORGANIZATIONAL OBJECT TYPE WS
CROSS-CLIENT
UNRESTRICTED VALIDITY PERIOD
38
ANY PLAN VERSION
Executable workflows are supplied by SAP as workflow templates. You can:
USE THEM AS MODELS FOR DEFINING YOUR OWN WORKFLOW TEMPLATES
CONFIGURE THEM MAKING YOUR OWN AGENT AND DEADLINE ENTRIES
WORKFLOW WORK Type F work item that represents a multistep task at runtime.
ITEM There is one workflow work item for every multistep task started. The workflow
log and workflow container of this workflow work item can be accessed:
FOR ERROR DIAGNOSIS AND CORRECTION
IF NO WORK ITEMS ARE DISPLAYED FOR INFORMATION ABOUT STEPS ALREADY
PROCESSED (INCLUDING THEIR CURRENT AGENTS, NOTES AND AD HOC OBJECTS)
FOR REPORTING PROCESSES COMPLETED
Workflow work items are not displayed in the Business Workplace, but can be
found using the work item selection. If a workflow task or workflow template is
referenced as an activity within a workflow definition, this step is also
represented with a workflow work item.
WORKLIST List of all work items that are assigned to a specific user at a particular time.
This user is one of the recipients of each work item.
The worklist is located in the workflow inbox in the Business Workplace.
39
QUESTIONS AND ANSWERS
What is the table for USER MASTER, WORKFLOW LOG, WORKFLOW CONTAINER,
WORKFLOW DEFINITION and AGENT OF WORKFLOW?
USER-MASTER - USR01
WORKFLOW LOG - SWWLOGHIST
WORKFLOW CONTAINER – SWD_WFCONT
WORKLOW DEFINITION - SWDSHEADER
AGENT OF WORKFLOW - SWWWIAGENT
What differences are there between a work item and a notification mail?
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).
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.
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
How do I send a complex text from the workflow?
You may create mails using SAPscript. These mails can include conditions which are
evaluated in order to determine which text blocks which are used in the mail. Workflow
variables can be used in these conditions and workflow variables can be substituted into the
body of the e-mail text.
If you this is not enough for you will probably want to write your own ABAP routines for
generating the text and generating the attachments to go with the text.
Use the function group SO01 which contains functions of the form SO_*_API1 which are
ideal for creating your own sophisticated messages. There are plenty of advantages of how
these are used within the SAP system.
There are wizards (Release 3.1) which will create workflows for you to send reports to a
distribution list. You can specify whether the results should be transmitted or evaluated at
the time the recipient wishes to view the report. It is usually better to send the evaluation
because this allows the recipient to see the results instantaneously, without having to wait
for the report to execute first.
Deadlines
How can I configure the workflow so that different types of messages are sent out
to different people depending on how late the processing is?
1. Specify a deadline period for the step.
2. Specify a name for the event. This adds new branch from the step. More...
3. Add a new step to the branch which sends a mail message.
4. Add another step to the branch which sends out the second deadline warning (see mail
steps above). Use deadlines in this step to configure an earliest start so that the second
message is not sent until a further time has elapsed.
5. Repeat step 5 as often as you like.
How can I configure the workflow so that when the deadline is missed the
workflow step is simply skipped?
This is tricky to explain but easy to implement once you know how.
Follow these steps (in later releases there is a wizard which takes you through the steps):
1. In the terminating events view of the workflow step activate the "obsolete" event and
give it a name. More...
2. Specify a deadline period for the step.
3. Specify a name for the event. This adds new branch from the step. More...
4. Add a new step to the deadline path. This step must be of type "process control".
5. Select the control "Make step obsolete" and use the search help to specify the workflow
step that has the deadline. Only steps with obsolete paths defined will be displayed.
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
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).
Have you used the Role Resolution? How did you do that?
There are various ways of defining roles. You can use the following:
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.
Before you can use the Workflow module, you must first execute the basic Customizing in
transaction SWU3.
All of the listed points should be green (the number range for customer tasks is no longer
required). A detailed description of the activities is provided in the relevant information
buttons. You can also execute some (but not all) of the points using the Automatic
Customizing button. See the online documentation for an exact description of what happens
there. The RFC destination must work correctly and the user (usually WF BATCH) should
have the SAP_ALL profile.
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?
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.
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.
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 it’s 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
BUSINESS OBJECTS – SWO1
A business object is a problem-domain entity that you model in the SAP system, such as
SalesOrder, BillingDocument, and Employee. The BOR stores all the objects in the R/3
system. The repository is a group of all the objects in the R/3 system.
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.
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
FIGURE 4 METHODS OF SALES ORDER.
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
FIGURE 5 REDEFINITION OF CHANGE PASSWORD METHOD.
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
FIGURE 7 EXECUTION FLOW FOR METHODS WITH DELEGATION.
This delegation is powerful because it lets you implement your own business logic without
modifying any SAP code. As long as the objects are properly delegated, your method will be
executed.
51
ROLE RESOLUTION
AGENTS DETERMINATION
Role
Organizational Unit
Job
Position
Work center
User
Expression
Workflow Initiator (Expression)
Superior of workflow Initiator (Role)
ROLE RESOLUTION
Responsibility Rules
Evaluation Paths
Function Modules
SAP Organizational Objects
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
EVALUATION PATHS - OOAW
WF_ORGUN / WF_ORGUS / US_CHEF / SAP_HOLD.
PROCEDURE TO DO:
Determine the evaluation path you want to use
Create a rule as normal, setting the type to “Function to be executed” (i.e) this is a
function module based rule.
Enter the function module RH_GET_STRUCTURE
Automatically an additional field Evaluation path appears. Enter your evaluation path ID
in this field.
Create the following rule container elements
OTYPE / OBJID / ORG_AGENT
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.
54
1) use Transaction PFAC
55
CALLING FUNCTION MODULE
CALL FUNCTION 'RH_GET_STRUCTURE'
* EXPORTING
* ACT_WEGID =
TABLES
ACTOR_TAB =
AC_CONTAINER =
* EXCEPTIONS
* NOBODY_FOUND = 1
* NO_ACTIVE_PLVAR = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
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.
56
ACT_ENDDA = SY-DATUM
ACT_TDEPTH = TDEPTH
ACT_TFLAG = ' '
ACT_VFLAG = ' '
AUTHORITY_CHECK = $CROSS
TABLES
RESULT_TAB = ACTOR_TAB
EXCEPTIONS
NO_PLVAR_FOUND = 1
OTHERS = 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.
*************************************************************************
*************************************************************************
*************************************************************************
IF SY-UNAME = 'KAAV02'.
AGENTS-OTYPE = 'US'.
AGENTS-OBJID = 'KAAV02'.
APPEND AGENTS.
ENDIF.
57
*“Macro Commands to assign values to Container
SWC_CONTAINER MY_CONTAINER.
SWC_CREATE_CONTAINER MY_CONTAINER.
SWC_CREATE_OBJECT SALESORDER 'BUS2032' SALESNUMBER.
SWC_SET_ELEMENT MY_CONTAINER ‘Salesorder' SALESORDER.
SWC_CONTAINER_TO_PERSISTENT MY_CONTAINER.
SELECT VBELN
AUART
AUGRU
NETWR
VKORG
INTO TABLE IT_VBAK
FROM VBAK
WHERE VBELN = SALESNO.
I_MODE ( Additions )
C_MODE_INPLACE_WITH_INFO - Show Only Toolbar Embedded (0 / 1)
C_MODE_INPLACE_BUTTON_ONLY - Show Only, Text, Links
C_MODE_MODELESS - Show Toolbar, Text, Links in Modular window
58
RAISING A BUSINESS OBJECT EVENT WITH A CONTAINER
The following code raises the EVENTRAISED event linked to the sales order business
object BUS2032 and passes in the variable WEATHEROUTSIDE with the value SUNNY.
INCLUDE <CNTN01>.
SWC_CONTAINER LT_EVENT_CONTAINER.
SWC_CREATE_CONTAINER LT_EVENT_CONTAINER.
59
ACTIVATING GENERIC BUSINESS OBJECT SERVICES
If you want to have the same functionality that is available when you push the Services for
Object button located at the top of each SAP related document you can do the following:
1) Enable your functionality as an object in the BOR using SWO1 - Make sure it generates
2) Add this code to your EDIT dialog (in the PAI section after pushing a button) that you use
against that object.
CASE ok_code.
WHEN 'OBJSERV'.
l_borident-objkey = zcustomobj-id.
l_borident-objtype = 'ZCUSTOM'.
l_borident-logsys = 'DEVCLNT005'.
ENDCASE.
60
Testing Role Resolution : PFAC
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.
Eg:
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.
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
The workflow agent starts workflows and processes work items. Their work area is the
Business Workplace.
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 : WF DEFINITION BASIC DATA
FIELDS
WFD_ID Workflow Definition
VERSION Version
EXETYP Workflow Type
WORKFLOW TYPES
S - Definition
E - Runtime
D - Ad Hoc Definition
R - Ad Hoc Runtime
C - Configuration Definition
A - Configuration Runtime
CHANGE DOCUMENTS
SCDO Overview
SWED Define Workflow Properties
SWEC Linkage
BSVW Status Management
NACE Message Control
AWUW Logistics Information System
EVENT LINKAGE
SWETYPU Type Linkages
SWB_COND Workflow Start Conditions
SWUY Create Workflow Message Linkage
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. Go to SBWP
2. Choose settings, workflow settings, maintain substitute.
3. Click the create substitute button.
4. 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 your’s 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
64
THE FOLLOWING IS AN EXTRACT FROM TABLE HRP1000
WS00000016 AL-EARLYINP ArchiveLink - EarlyInput
WS00000023 AM_SUBWF FI-AA subflow for error handling
WS00000024 AM_WF_1 FI-AA mass change/retir. w/o rev.type 1
WS00000025 AM_WF_1_ERL FI-AA retirement with revenue dist.type1
WS00000026 AM_WF_ALL FI-AA mass change/retir. w/o rev.type 2
WS00000033 exmpformabs Workflow template: Notif. of absence
WS00000038 wf_req_rel Workflow for purch.req. release
WS00200025 WF Test1 WF test flow with one step
WS00200028 WF Test2 TestWF with parallelism and recursion
WS00200034 Pool Applicant pool
WS00200035 Contract Offer of contract of employment
WS00200036 Interview Interview Applicant
WS00200038 Applicant Applicant processing
WS00200061 Processing Process quality notification
WS00200062 Close Close quality notification
WS00200063 Complete Complete task
WS00200065 Process Process PM notification
WS00200066 Assign plan Assign plan
WS00200067 Release lot Release inspection lot for inspection
WS00200068 Confirm cert Confirm receipt of certificate
WS00200069 Inv.postings Perform missing inv.postings for lot
WS00200070 L-tInspCompl Long-term inspection completion
WS00200071 Usage dec. Make usage decision
WS00200072 Res.L-tChar. Results recording long-term inspection
WS00200073 Selection Applicant selection
WS00200075 Close Close PM notification
WS00200081 Processing Process error records
WS00200085 In process Process quality notification
WS00200095 In_process PM notification in process
WS00200096 Process Process service notification
WS00200097 Complete Complete task
WS00200098 Close Close service notification
WS00200099 In_process Service notification in process
WS00400002 ECO Doc Flow Demo ECM Object equal Document
WS00400004 FIPP_COMPL FIPP_COMPL
WS00400005 WFMC_CUSTOM1 WFMC: Customizing Message Control
WS00400006 WFMC_CUSTOM2 WFMC: Customizing output type
WS00400011 BSEG_SUBWF01 Release for payment single-stage
WS00400012 BSEG_FRAME1 Release for payment (frame)
WS00400014 WFMC_CUSTOM3 WFMC: Maintain access seq. and cond.tab.
WS00400019 CreateLetter Create + send letter
WS00400020 CreateLetter Create letter
WS00400021 BSEG_SUBWF02 Release for payment two-stage
WS00400022 BSEG_SUBWF03 Release for payment three-stage
WS00400024 AppEvtCreatr Event Creator 'Vacancy assigned'
WS00400025 PrepareHire Prepare hiring
WS00400026 MMIVquantity Handling invoice locked due to quantity
65
WS00400027 MMIVprice Handling invoice locked due to price
WS00400032 FIPP_FRAME_2 Preliminary posting (frame), sequential
WS00600011 ECM flow Engineering Change Master
WS10000050 crte_contrct Create contract
WS10000051 FIPP_FRAME Preliminary_Posting (Frame)
WS10000052 FIPP_SUBWF01 Release amount workflow single-stage
WS10000054 FIPP_SUBWF03 Release amount workflow three-stage
WS10000056 AL-EARLYINP ArchiveLink - EarlyInput
WS20000006 FIPP_SUBWF05 Release amount workflow empty
WS30000015 AF_process Process notification of absence
WS00000016 AL-EARLYINP ArchiveLink - EarlyInput
WS00000023 AM_SUBWF FI-AA subflow for error handling
WS00000024 AM_WF_1 FI-AA mass change/retir. w/o rev.type 1
WS00000025 AM_WF_1_ERL FI-AA retirement with revenue dist.type1
WS00000026 AM_WF_ALL FI-AA mass change/retir. w/o rev.type 2
WS00000027 AM_WF_2_ERL FI-AA retirement with revenue dist.type2
WS00000033 exmpformabs Workflow template: Notif. of absence
WS00000038 wf_req_rel Workflow for purch.req. release
WS00000039 ECM flow Engineering change master (template)
WS00000042 ECO flow Demo ECM object unequal BOM
WS00000044 ECO BOM flow Demo ECM bill of material
WS00200025 WF Test1 WF test flow with one step
WS00200028 WF Test2 TestWF with parallelism and recursion
WS00200034 Pool Applicant pool
WS00200035 Contract Offer of contract of employment
WS00200036 Interview Interview applicant
WS00200037 Selection Applicant selection
WS00200038 Applicant Applicant processing
WS00200061 Processing Process quality notification
WS00200062 Close Close quality notification
WS00200063 Complete Complete task
WS00200065 Process Process PM notification
WS00200066 Assign plan Assign plan
WS00200067 Release lot Release inspection lot for inspection
WS00200068 Confirm cert Confirm receipt of certificate
WS00200069 Inv.postings Make missing inventory postings for lot
WS00200070 L-tInspCompl Long-term inspection completion
WS00200071 Usage dec. Make usage decision
WS00200072 Res.l-t.ins. Record results of long-term inspection
WS00200073 Selection Applicant selection
WS00200074 Complete Complete task
WS00200075 Close Close PM notification
WS00200081 Processing Process error records
WS00200085 In process Process quality notification
WS00200095 In_process PM notification in process
WS00200096 Process Process service notification
WS00200097 Complete Complete task
WS00200098 Close Close service notification
WS00200099 In_process Service notification in process
66
WS00400002 ECO flow Demo ECM Object equal Document
WS10000021 AL-EARLYINP ArchiveLink - EarlyInput
WS10000044 exmpformabs Example workflow: Notif. of absence
WS10000048 send_mail Send mail
WS10000049 CRTE_CONTACT Create contact
WS10000050 crte_contrct Create contract
WS10000051 FIPP_FRAME Preliminary posting (framework)
WS10000052 FIPP_SUBWF01 Release amount workflow single-stage
WS10000053 FIPP_SUBWF02 Release amount workflow two-stage
WS10000054 FIPP_SUBWF03 Release amount workflow three-stage
WS10000055 FIPP_SUBWF04 Full release workflow
WS10000056 AL-EARLYINP ArchiveLink - EarlyInput
WS20000001 Selection Applicant selection
WS20000006 FIPP_SUBWF05 Betragsfreigabeworkflow leer
WS00000023 AM_SUBWF FI-AA subflow for error handling
WS00000024 AM_WF_1 FI-AA mass change/retir. w/o rev.type 1
WS00000025 AM_WF_1_ERL FI-AA retirement with revenue dist.type1
WS00000026 AM_WF_ALL FI-AA mass change/retir. w/o rev.type 2
WS00000027 AM_WF_2_ERL AM Standard mit Erlös (Typ 2)
WS00000033 exmpformabs Workflow template: Notif. of absence
WS00000038 wf_req_rel Workflow for purch.req. release
WS00000039 ECM flow Engineering change master (template)
WS00000042 ECO flow Demo ECM object unequal BOM
WS00000044 ECO BOM flow Demo ECM bill of material
WS00200028 WF Test2 TestWF with parallelism and recursion
WS00200034 Pool Applicant pool
WS00200034 Pool Applicant pool
WS00200034 Pool Applicant pool
WS00200035 Contract Offer of contract of employment
WS00200035 Contract Offer of Contract
WS00200035 Contract Offer of Contract
WS00200036 Interview Interview Applicant
WS00200036 Interview Interview Applicant
WS00200037 Selection Applicant selection
WS00200038 Applicant Applicant processing
WS00200061 Processing Process quality notification
WS00200062 Close Close quality notification
WS00200063 Complete Complete task
WS00200065 Process Process PM notification
WS00200066 Assign plan Assign plan
WS00200067 Release lot Release inspection lot for inspection
WS00200068 Confirm cert Confirm receipt of certificate
WS00200069 Inv.postings Perform missing inv.postings for lot
WS00200070 L-tInspCompl Long-term inspection completion
WS00200071 Usage dec. Make usage decision
WS00200072 Res.L-T.ins. Record results of long-term inspection
WS00200073 Selection Applicant selection
WS00200073 Selection Selection procedure
WS00200073 Selection Applicant selection
67
WS00200074 Complete Complete task
WS00200075 Close Close PM notification
WS00200081 Processing Process error records
WS00200085 In process Process quality notification
WS00200095 In_process PM notification in process
WS00200096 Process Process service notification
WS00200097 Complete Complete task
WS00200098 Close Close service notification
WS00200099 InProcess Service notification in process
WS00400002 ECO Doc Flow Demo ECM Object equal Document
WS00400004 FIPP_COMPL FIPP_COMPL
WS00400005 WFMC_CUSTOM1 WFMC: Customizing Message Control
WS00400006 WFMC_CUSTOM2 WFMC: Customizing message type
WS00400011 BSEG_SUBWF01 Release for payment single-stage
WS00400012 BSEG_FRAME1 Release for payment (frame)
WS00400014 WFMC_CUSTOM3 WFMC: Maintain access seq. and cond. tab.
WS00400019 Create Letter Create + send letter
WS00400020 Create Letter Create letter
WS00400021 BSEG_SUBWF02 Release for payment two-stage
WS00400024 AppEvtCreatr Event Creator 'Vacancy assigned'
WS00400025 PrepareHire Prepare hiring
WS00400026 MMIVquantity Handling invoice locked due to quantity
WS00400027 MMIVprice Handling invoice locked due to price
WS00600011 ECM flow Engineering Change Master
WS10000021 AL-EARLYINP ArchiveLink - EarlyInput
WS10000048 send_mail Send mail
WS10000049 CRTE_CONTACT Create contact
WS10000050 crte_contrct Create contract
WS10000051 FIPP_FRAME Preliminary_Posting (Frame)
WS10000052 FIPP_SUBWF01 Release amount workflow single-stage
WS10000053 FIPP_SUBWF02 Release amount workflow two-stage
WS10000054 FIPP_SUBWF03 Release amount workflow three-stage
WS10000055 FIPP_SUBWF04 Acct assignment approval workflow
WS10000056 AL-EARLYINP ArchiveLink - EarlyInput
WS20000006 FIPP_SUBWF05 Release amount workflow empty
WS30000015 AF_process 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.
70
COOL WORKFLOW FUNCTION MODULES
For locking of work items against execution, use the function module
SWW_WI_DISABLE
For unlocking of work items against execution, use the function module
SWW_WI_ENABLE
To read the container elements of a particular work item, use the function module
SWW_WI_CONTAINER_READ
We can change the attributes of the deadline monitoring for a particular work item
by using the function module SWW_WI_DEADLINES_CHANGE
objtype = 'BUS1001006' (e.g. Material - Substitute with the applicable business object)
objkey = material number
top_level_items = 'X' or space
selection_status_variant = 0000
71
TROUBLESHOOTING WHEN THE WORKFLOW DOES NOT START CORRECTLY
If the workflow does not start this is either because it is not being triggered properly or the
workflow definition is not complete. First determine how the workflow should be started.
Directly? Via a customizing table? Via an event? Transaction SWUD offers intelligent
diagnosis help to establish if the flow was started, if the triggering event was fired, if the
flow is syntactically correct, if users are assigned to all the tasks...
The most probable cause of a workflow being started twice is that it is triggered by two
separate mechanisms simultaneously. For example if the flow is being triggered by an
event, check that this event is only firing once. For example, you might find that it has fired
once due the customizing for change documents AND once due to the customizing of status
changes. Transaction SWUD will allow you to determine how many times the event is firing.
If it is only firing once, check that the workflow is not additionally being started directly by a
program or customizing tables. Check that the workflow is not customized to trigger on two
separate events.
There is a wizard in the workflow editor which will help you send straightforward e-mails
from the workflow. The wizard generates a step based on the business method SELFITEM
Send Task Description. You cannot modify the business object SELFITEM and delegate so if
you want to do something more sophisticated you should build your own method in another
object based on the function modules SO_xxx_API1. These function modules are the APIs
for sending mail and are fully documented. Use the where-used list to see examples.
In an early stage of the project you should consider the issue of how users are going to be
notified off and access work items. Usually this decision will not influence the definition of
the workflows but there may well be organizational issues involved which you should
consider early on. ASAP contains a table of alternative methods. The most common being:
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
73
WORKFLOW SCENARIO
74
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 user’s 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.
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.
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
9. HR INFO TYPE NOTIFICATION WORKFLOW
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.
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 doesn’t 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 .
If the RFQ quantity is greater than 20 . RFQ will automatically block. It has to trigger a
workflow for Release . ( Use release Strategy Procedure ) .
77
12. PURCHASE ORDER – CREDIT LIMIT CHECK
When a Purchase order is received from a customer check the debtor balance
including the PO value. If the debtor balance is more than 60 days excluding the PO then
escalate to the next level of approval. Assign a limit to the customer and check if the
balance exceeds this limit also escalate to the next level. On approval release the sales
order. Inform by mail to the party with a copy to the Sales Manager. Once the customer
makes the old payment to clear the debtor balance check again to release the PO.
78
Dheepak Notes:-
HR_FBN_GET_USER_EMAIL_ADDRESS :- On giving Sap user name it will return the
Mailing address of the user
Ex :-
input :-
USER_ID dheepak
REACTION 0
output :-
EMAIL_ADDRESS - dheepak.sekharan@in.sealconsult.com
79