workflow material

Upload: anjan01

Post on 03-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Workflow Material

    1/117

    IBM Global Services

    Copyright IBM Corporation 2003

    SAP Business Workflow

  • 7/29/2019 Workflow Material

    2/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Course Content

    IntroductionIntroduction

    Workflow architectureWorkflow architecture

    Workflow Definition and workflow TemplateWorkflow Definition and workflow Template

    Workflow steps in detailsWorkflow steps in details

    TaskTask

    Business Objects and MethodsBusiness Objects and Methods

    Container Structure and Container ProgrammingContainer Structure and Container Programming

    EventsEvents

    Organisational structure and role resolutionOrganisational structure and role resolution

    Different types of AgentDifferent types of Agent

    Workflow and ALEWorkflow and ALE

  • 7/29/2019 Workflow Material

    3/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    SAP Business Workflow

    SAP Business Workflow is a cross-application tool that makes it possible

    to integrate business tasks/processes between applications.

    This tool was introduced in R/3 Release 3.0A, and received a substantialfacelift in the Enjoy Release, 4.6A,which warranted the new name Workflow

    Builder.

  • 7/29/2019 Workflow Material

    4/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Need of Workflow

    Hmm ! Time to put in aHmm ! Time to put in apurchase requisitionpurchase requisitionrequestrequest

    11

    33

    I guess Id better sendI guess Id better sendoff some inter-officeoff some inter-officemail to ask themail to ask theapprovers to approveapprovers to approve

    my requisition.my requisition.

    22 I wonder whoI wonder whoapproves buyingapproves buyingthis stuff?this stuff?

    55

    Time drags on . . .Time drags on . . .Meanwhile, inMeanwhile, inMr. Managers office . . .Mr. Managers office . . .What shall I do next?What shall I do next?

    44

    TIME ISTIME IS

    MONEY!!!MONEY!!!

  • 7/29/2019 Workflow Material

    5/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Drawbacks

    Inefficiency.

    Each lacks a way to trace where a task is.

    Who executed or is executing it.

    How much time it required.

  • 7/29/2019 Workflow Material

    6/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Why SAP Workflow

    Workflow ensures that the right work is sent to the right person at the

    right time in the right sequence with the right information.

    Tool for the automization ofbusiness processes

    Not tied up to any paricular application Operates uniformly accross applications

    Coordinate all participating tasks

    Provide users with active support

    Intelligent routing

  • 7/29/2019 Workflow Material

    7/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    SAP Business Workflow

    Architecture

  • 7/29/2019 Workflow Material

    8/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Architecture

    OrganisationalLevel

    OrganisationalLevel

    Process LevelProcess Level

    Business

    ObjectLevel

    Business

    ObjectLevel

  • 7/29/2019 Workflow Material

    9/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Definition

  • 7/29/2019 Workflow Material

    10/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Definition

    Workflow definition consists of

    1. Basic Data

    2. Information about triggering events

    3. Initial Values

    4. Containers

    5. Bindings

    A workflow definition describes the workflow process

  • 7/29/2019 Workflow Material

    11/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Builder

    The workflow definition is created in the Workflow Builder and displayed graphically in a network.

    Transaction: SWDD

    Menu Path:

    Tools Business Workflow Development Definition tools Workflow Builder.

  • 7/29/2019 Workflow Material

    12/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Definition - Steps

    A workflow definition is made up of individual modular steps.

  • 7/29/2019 Workflow Material

    13/117|

    IBM Global Services

    Copyright IBM Corporation 2003

    Example: Workflow Definition

  • 7/29/2019 Workflow Material

    14/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    How are Workflows Created in a System

    Within workflow templates, there is a key with the following structure:

    - A WS task abbreviation for the workflow template

    - An 8-digit sequence number

    From the structure of the 8-digit number, the system knows whether the

    template is a standard template delivered by SAP or one created by the

    customer.

    Customer-defined templates start with the prefix number that was defined in

    Customizing for the system and client.

  • 7/29/2019 Workflow Material

    15/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Working with Workflow

  • 7/29/2019 Workflow Material

    16/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Design

  • 7/29/2019 Workflow Material

    17/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    How workflow gets executed

  • 7/29/2019 Workflow Material

    18/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Toolbox - SWUS

    Transaction:Transaction: SWUS.SWUS.

    Menu Path:Menu Path: Tools -> Business Workflow -> Development -> Runtime Tools-> StartTools -> Business Workflow -> Development -> Runtime Tools-> Start

    Workflow (Test Environment).Workflow (Test Environment).

  • 7/29/2019 Workflow Material

    19/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow Steps

  • 7/29/2019 Workflow Material

    20/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow definition steps

    Workflow definition is made up of individual steps. When creating a step in a

    workflow definition, the step type must be specified first.

    There are1. Steps which refer to business activities (activities & user decision)

    2. Steps which are used forinternal process control and monitoring

    (condition, multiple condition, loop, etc)

  • 7/29/2019 Workflow Material

    21/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Business Activities Steps

    Activity- Can be a single step task with basic business functionality

    - Can be a multi-step task, which reference to a workflow definition

    User Decision

    - This provides an opportunity for user interaction with the system.

    - The response to this decides the selection of the subsequent step.

    Document from template

    - PA document is created from a document template using variables in the text that arefilled during program execution.

    Web Activity

    - Selected container elements are posted using http protocol in XML or SOAPmessage

    Subworkflow

    - An activity which refers to a workflow rather than a task

  • 7/29/2019 Workflow Material

    22/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Condition- Branch on the basis of control information from the runtime dependent

    context of the workflow.

    - An attribute of this object can also be accessed for condition evaluation

    - Condition evaluation can be done by

    Field comparison e.g constants , object attribute, system fields

    Multiple condition

    - In contrast to condition, multiple condition makes it possible for the workflowdefinition to branch in more than two branches.

    - For evaluation of the multiple condition, the value of the basis ofcomparison is checked at runtime against the comparison values andbranched accordingly.

    Internal process control Steps

    IBM Gl b l S i

  • 7/29/2019 Workflow Material

    23/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Internal process control (contd.)

    WHILE Loop

    - Steps are processed repeatedly until the conditions contained in the WHILEstep no longer apply.

    Until Loop

    - Steps are processed repeatedly until the condition contained in the UNTILstep is true.

    Fork

    - Used for parallel processing branches.- Only a part of the parallel processing branches actually has to run to

    continue the workflow.

    - Dynamic parallel processing is also possible

    IBM Gl b l S i

  • 7/29/2019 Workflow Material

    24/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Internal process control (contd.)

    Send mail

    - Text entered in this step can be used to send a mail to the agent assigned

    Container operations

    - Used to perform arithmetic operation of value assignment to workflowcontainer elements using constants and data in the workflow container .

    IBM Gl b l S i

  • 7/29/2019 Workflow Material

    25/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Internal process control (contd.)

    Event Creator

    - An event is created when this step in the workflow is reached.

    - Other workflows can be started as a reaction to the event created in this

    step. This event must be the triggering event of the relevant workflow tasks

    and/or templates.

    WAIT for event

    - Used to stop the whole execution of the workflow until the event is created

    in the system.

    - Used to wait for events for parallel processing

    IBM Gl b l S i

  • 7/29/2019 Workflow Material

    26/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Task & Workflow Definition

    IBM Global Services

  • 7/29/2019 Workflow Material

    27/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    TasksTasks

    Single stepSingle step

    MultistepMultistep

    Standard Task(TS)Standard Task(TS)

    Customer Task(T)Customer Task(T)

    Workflow Template(WS)Workflow Template(WS)

    Workflow Task(WF)Workflow Task(WF)

    Tasks are used to describe a business process

    IBM Global Services

  • 7/29/2019 Workflow Material

    28/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Similarities and differences of task types

    Customer Task (Type T) Standard Task (Type TS)Workflow Task (Type WF) Workflow Template (Type WS)

    Created by customer Created by SAP andcustomer

    With validity period Without validity period

    Client-dependent Client-independent

    Must be linked to its possible Must be linked to itspossibleagents when it is defined agents when it is defined

    IBM Global Services

  • 7/29/2019 Workflow Material

    29/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Single and Multistep Tasks

    TasksTasks

    Single stepSingle step

    MultistepMultistep

    ReferencesReferences one object typeone object type

    methodmethod and displays one stepand displays one step

    in the business processin the business process

    Represents theRepresents the businessbusiness

    processprocess and is a sequence ofand is a sequence of

    individual tasks and controlindividual tasks and control

    stepssteps

    Transaction : PFTCTransaction : PFTC

    Menu Path -> Tools -> Business Workflow -> Development -> Definition tools ->TasksMenu Path -> Tools -> Business Workflow -> Development -> Definition tools ->Tasks

    IBM Global Services

  • 7/29/2019 Workflow Material

    30/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Single-step tasks

    Single-step tasks describe elementary business activities.

    Single-step tasks operate on an object and refer to one object method

    each

    Single-step tasks are linked to their possible and permitted agents

    whose organizational assignments are described in the organizational

    plan of the enterprise.

    Executable single-step tasks are represented by work items at runtime.

    IBM Global Services

  • 7/29/2019 Workflow Material

    31/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Workflow definition - Multistep tasks

    A workflow definition has a modular structure consisting of individualsteps which are linked together.

    The multistep tasks form the business framework for a workflow definitionand each references one workflow definition.

    A step in a workflow definition can be an activity.

    An activity always refers to one task (= single-step task or multistep task).

    An activity with one simple triangle refers to a task.

    An activity with three triangles refers to a workflow (subworkflow).

    IBM Global Services

  • 7/29/2019 Workflow Material

    32/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Task Definition Synchronous and

    Asynchronous Methods

    IBM Global Services

  • 7/29/2019 Workflow Material

    33/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Defining a Task

    IBM Global Services

  • 7/29/2019 Workflow Material

    34/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Settings for Tasks

    Background Confirm end of

    processingSAPphones

    Task executed in

    background

    depending on

    object method

    At runtime user can create

    attachments

    User explains explicitly

    that work item is no longer

    is to be processed

    The workflow dials

    the telephone

    number attached to

    the current customer

    IBM Global Services

  • 7/29/2019 Workflow Material

    35/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Important Task Attributes

    General

    -Workitems can be executed and forwarded to any SAP User

    General Forwarding Allowed

    -Workitems can be forwarded to any user

    General Forwarding Not Allowed

    -Work items can be forwarded to possible users

    Forwarding not allowed

    -No forwarding allowed

    IBM Global Services

  • 7/29/2019 Workflow Material

    36/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Work Item

    Executable single-step tasks are represented by work items at

    runtime.

    Object that represents a task or action in the workflow system at

    runtime.

    Depending on the work item type, some of these work items are

    displayed in a user's work list. Other work items, on the other hand,

    are only used and processed internally.

    The work items are displayed in the integrated inboxes of their

    selected agents, and can be reserved and executed from there.

    IBM Global Services

  • 7/29/2019 Workflow Material

    37/117

    |

    IBM Global Services

    Copyright IBM Corporation 2003

    Work Items Types

    IBM Global Services

  • 7/29/2019 Workflow Material

    38/117

    | Copyright IBM Corporation 2003

    Workitem Types

    W: Dialog work item

    Runtime display for a single step task with a user dialog

    D: Missed deadline work item

    The message recipient for the missed deadline is informed.

    F: Workflow work item

    Runtime representation of a multi step task

    B: Background work item

    Runtime display for a task executed in the background.

    E: Wait step work item:

    Runtime display for a wait step in the workflow definition.

    IBM Global Services

  • 7/29/2019 Workflow Material

    39/117

    | Copyright IBM Corporation 2003

    Workitem Text

    Title of workitem in the Business Workplace

    First create the workitem text and position the cursor to include a varible

    Choose the 'Insert variable' icon under the workitem text

    Processes request from &_WI_Object_ID.CreatedBy&

    Example

    IBM Global Services

  • 7/29/2019 Workflow Material

    40/117

    | Copyright IBM Corporation 2003

    Task and its various component in SAP

    IBM Global Services

  • 7/29/2019 Workflow Material

    41/117

    | Copyright IBM Corporation 2003

    Business Object Definition

    and Implementation

    IBM Global Services

  • 7/29/2019 Workflow Material

    42/117

    | Copyright IBM Corporation 2003

    SAP Business Workflow has been developed on an object-oriented basis.

    The business object types are identified and described with their

    object methods in the Business Object Repository(BOR) of theR/3 System.

    Generally one object is created in the system and then processed ina workflow over several steps by various employees.

    Object Types & Workflow

    IBM Global Services

  • 7/29/2019 Workflow Material

    43/117

    | Copyright IBM Corporation 2003

    Workflow deals with object types. Object types are definitions ofdata. In order to access database data, workflow uses the object

    type interface.

    Most of the information represented by object types is available in

    the ABAP/4 Dictionary.

    Objects are created at runtime and are specific instances ofdefined object types.

    Many object types are delivered by SAP. In addition, the customer

    can create new object types or extend SAP objects by creatingsubtypes (child objects). New customer objects or subtypes may

    be desired if the delivered SAP object does not contain all the

    characteristics (attributes) or processing options (methods) desired.

    Object Types & Objects

    IBM Global Services

  • 7/29/2019 Workflow Material

    44/117

    | Copyright IBM Corporation 2003

    Object Type - Definition

    IBM Global Services

  • 7/29/2019 Workflow Material

    45/117

    | Copyright IBM Corporation 2003

    Interfaces

    Interfaces are a combination of attributes, methods, and events to be used in

    common among multiple object types. The purpose of interfaces is to define

    common functionality in one object type, and to assign that common

    functionality via an interface to multiple object types across the Business

    Object Repository. This avoids redundancy of data and functionality

    definition.

    Each new object type automatically receives the interface IFSAP, the SAP

    standard interface. IFSAP provides every object type with the following:

    - Method Display

    - Method ExistenceCheck

    - Attribute ObjectType

    IBM Global Services

  • 7/29/2019 Workflow Material

    46/117

    | Copyright IBM Corporation 2003

    Key Fields

    Key fields are designed to uniquely identify the object type.

    If the key field has a data type reference of a dictionary table field, the runtime

    system will look to that table field to retrieve the value of the key when

    processing the object. When the key field is created, the ABAP/4 program code

    is generated automatically when the object type is generated.

    IBM Global Services

  • 7/29/2019 Workflow Material

    47/117

    | Copyright IBM Corporation 2003

    Attributes

    Attributes provides access to data.

    ABAP Dictionary Field Virtual

    IBM Global Services

  • 7/29/2019 Workflow Material

    48/117

    | Copyright IBM Corporation 2003

    Methods

    Methods incorporate the permitted functions available for an object.Methods have importing and exporting parameters as well as exceptions.

    Methods can be created using :

    IBM Global Services

  • 7/29/2019 Workflow Material

    49/117

    | Copyright IBM Corporation 2003

    Methods

    ImportImportParametersParameters

    METHODMETHOD

    Res

    ult

    Res

    ult

    ExportExport

    ParametersParameters

    Exceptio

    Exceptio

    ns

    ns

    IBM Global Services

  • 7/29/2019 Workflow Material

    50/117

    | Copyright IBM Corporation 2003

    Dialog / or background :

    Execution of the method is via a work item in a usersintegrated inbox or in background by the workflow runtimesystem. Background methods cannot use messages orexceptions because they cannot be processed by the

    background system and will result in termination of theprogram.

    Synchronous / Asynchronous

    Synchronous methods finish executing before handingcontrol back to the calling program. These types of

    methods can return export parameters, results andexceptions. Asynchronous methods do not return control tothe calling program immediately. Once executed, theydepend upon events to communicate the results of themethod back to the calling program. Asynchronous objectmethods cannot have results, export parameters or

    exceptions.

    Methods - Call attributes

    IBM Global Services

  • 7/29/2019 Workflow Material

    51/117

    | Copyright IBM Corporation 2003

    - Result:

    Synchronous methods may return an export parameter as a result. A

    result can be defined like a dictionary field or an object type .

    - Instance independence:

    Indicates whether an object reference is passed to the method by binding

    at the time of execution. Methods that generate and return an object

    reference, such as Create, or methods that generate a report listing should

    be instance independent.

    Methods - Call attributes

    IBM Global Services

  • 7/29/2019 Workflow Material

    52/117

    | Copyright IBM Corporation 2003

    Import /Export Parameters

    The method parameter container contains references to all import,export and result parameters which need to be exchanged back andforth between the calling program (single-step task) and themethod. Binding is necessary between the single-step task and themethod parameter container to accomplish the data transfer.

    Import parameters are those values which are necessary toexecute the method. Import parameters are retrieved from thecontainer CONTAINER using the macro instructionsSWC_GET_ELEMENT (single-line) or SWC_GET_TABLE (multiline).

    Export parameter values are passed to the container CONTAINER using themacro instructions SWC_SET_ELEMENT (single-line) or SWC_SET_TABLE(multiline). The result parameter is passed to the CONTAINER elementRESULT via the same macro instructions.

    IBM Global Services

  • 7/29/2019 Workflow Material

    53/117

    | Copyright IBM Corporation 2003

    Exceptions

    Error handling is accomplished through the use of method exceptions(synchronous methods only).

    The workflow definition can branch according to these possible errorstates and allow for subsequent steps to handle these conditions.Messages and exceptions cannot be used with background methods

    because they will terminate the program.

    Number of the exception:0001-1000: exceptions defined for interfaces1001-7999: application-specific exceptions (free for SAPdevelopment)8000-8999: exceptions raised by the object manager9000-9999: exceptions defined by the customer (free forcustomers)

    IBM Global Services

  • 7/29/2019 Workflow Material

    54/117

    | Copyright IBM Corporation 2003

    Exceptions are implemented within a method, between the macroinstructions BEGIN_METHOD and END_METHOD.

    EXIT_RETURN Code Variable1 Variable2 Variable3 Variable4.Code = the 4-digit number of the exceptionVariable1 through Variable4 correspond to up to 4 variableswhich can be derived from the message issued with theexception.

    The following exceptions (for temporary errors) are also available toallow exiting of the program:

    EXIT_OBJECT_NOT_FOUND = object not found

    EXIT_CANCELLED = cancelled by the user

    Exceptions

    IBM Global Services

  • 7/29/2019 Workflow Material

    55/117

    | Copyright IBM Corporation 2003

    Events describe the change in the status of an object.Workflow are usually started using events

    Events

    IBM Global Services

  • 7/29/2019 Workflow Material

    56/117

    | Copyright IBM Corporation 2003

    Object Type - Release Status

    Not accessible at runtime.

    Only in test or internal use, possibly unstable.

    Released for use by the customer.

    The functionality has been replaced. The oldfunctionality is still supported for two releases.

    IBM Global Services

  • 7/29/2019 Workflow Material

    57/117

    | Copyright IBM Corporation 2003

    Subtype

    The subtype inherits all attributes, methods and events of the supertype and isopen for new customer-specific attributes, methods and events. The key fields

    of the supertype and subtype must be identical. This means that any methods

    and attributes defined on the parent can be executed and accessed on the

    child object.

    IBM Global Services

  • 7/29/2019 Workflow Material

    58/117

    | Copyright IBM Corporation 2003

    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.

    CallingCalling

    ProgramProgram

    KNA1KNA1

    Method:Method:

    Change passwordChange password

    ZKNA1ZKNA1

    Method:Method:

    Change passwordChange password

    Transaction: Menu Path: SW01ToolsBusiness Workflow - Development - Definition tools - Business ObjectBuilder - Settings - Delegate

    IBM Global Services

  • 7/29/2019 Workflow Material

    59/117

    | Copyright IBM Corporation 2003

    Objects in the workflow

    IBM Global Services

  • 7/29/2019 Workflow Material

    60/117

    | Copyright IBM Corporation 2003

    Business Object Repository (BOR)

    Transaction: Menu Path: SW01Transaction: Menu Path: SW01ToolsTools Tools - Business Workflow Defination tool Busniness Object BuilderTools - Business Workflow Defination tool Busniness Object Builder

    IBM Global Services

  • 7/29/2019 Workflow Material

    61/117

    | Copyright IBM Corporation 2003

    Containers and Bindings

    - Workflow -

    IBM Global Services

  • 7/29/2019 Workflow Material

    62/117

    | Copyright IBM Corporation 2003

    Types of Containers

    IBM Global Services

  • 7/29/2019 Workflow Material

    63/117

    | Copyright IBM Corporation 2003

    Workflow Container

    The workflow container containsworkflow-specific system variables

    and other elements which are

    defined explicitly.

    As part of the definition of theworkflow task, the import and export

    parameters of the workflow are

    defined as elements of the workflow

    container.

    When the workflow is defined in theworkflow editor, elements can also

    be added to the workflow container.These elements are then "local

    variables" within a workflow definition

    and can be used, for example, to set

    up a counting loop.

    IBM Global Services

  • 7/29/2019 Workflow Material

    64/117

    | Copyright IBM Corporation 2003

    Task Container

    Each task container alreadycontains the workflow system

    variable and any additional elements

    for the method parameters of the

    referenced object method.

    You have to add additional elementsto the task container for additional

    values are required for variable

    replacement in the work item text or

    in the long texts

    IBM Global Services

  • 7/29/2019 Workflow Material

    65/117

    | Copyright IBM Corporation 2003

    Other Types of Containers

    Event parameter container

    Contains an element which can take the (object) reference to the object

    whose change of status is announced via the event.

    Role parameter container

    Contains the elements required as input in connection with the role

    resolution to be run at runtime.

    Method parameter containerContains elements which will be required as import and export parameters

    in connection with the method execution.

    IBM Global Services

  • 7/29/2019 Workflow Material

    66/117

    | Copyright IBM Corporation 2003

    What is a Container?

    Field valuesField values

    Multiline listsMultiline listsof field valuesof field values

    ObjectObject

    referencesreferences

    ContainerDefinition

    ContainerInstance

    ApplicationApplicationDataData

    R/3

    Definition Runtime

    IBM Global Services

  • 7/29/2019 Workflow Material

    67/117

    | Copyright IBM Corporation 2003

    Defining Container Elements

    Element nameElement name Data typeData type DescriptionDescription Multi-lineMulti-line ValueValue

    referencereference

    Element 1Element 1 Database FieldDatabase Field Description 1Description 1

    Element 2Element 2 Database FieldDatabase Field Description 2Description 2 XX

    Element 3Element 3 Object TypeObject Type Description 3Description 3 XX

    Definition Runtime

    IBM Global Services

  • 7/29/2019 Workflow Material

    68/117

    | Copyright IBM Corporation 2003

    Binding

    A binding is simply the art of of pouring selected container elements fromone container into another.

    The binding editor is available when defining:

    Workflow definitions

    Triggering events

    Workflow steps

    Workflow steps ( Standard roles/ Object methods with parameters)

    The binding editor always references the container to receive theapplication data. Binding definitions can reference:

    ConstantsVariables (container elements)

    System fields

    IBM Global Services

  • 7/29/2019 Workflow Material

    69/117

    | Copyright IBM Corporation 2003

    Container & Dataflow

    TaskTaskContainerContainer

    MethodMethodContainerContainer

    EventEventContainerContainer

    WorkflowWorkflowContainerContainer

    triggeringtriggeringeventevent

    triggeringtriggeringeventevent

    syncsynctasktasksyncsynctasktask

    syncsyncmethometho

    dd

    syncsyncmethometho

    dd

    syncsynctasktasksyncsynctasktask

    syncsyncmethometho

    dd

    syncsyncmethometho

    ddrolerolerolerole

    asyncasynctasktaskasyncasynctasktask

    asyncasyncmethometho

    dd

    asyncasyncmethometho

    dd

    44

    terminatingterminatingeventevent

    terminatingterminatingeventevent

    1122

    33

    5566

    77

    88

    99

    10101111

    1212 1313

    14141515

    RoleRoleContainerContainer

    IBM Global Services

  • 7/29/2019 Workflow Material

    70/117

    | Copyright IBM Corporation 2003

    Container Data Structure

    SWC_CONTAINERSWC_CONTAINER

    SWC_CREATE_CONTAINERSWC_CREATE_CONTAINER

    SWC_RELEASE_CONTAINERSWC_RELEASE_CONTAINER

    DeclareContainer

    InitializeContainer

    ReleaseContainer

    IBM Global Services

  • 7/29/2019 Workflow Material

    71/117

    | Copyright IBM Corporation 2003

    Writing/Reading Container Elements Defined

    as Field Values

    SWC_GET_ELEMENTSWC_GET_ELEMENT

    SWC_SET_ELEMENTSWC_SET_ELEMENT

    Variable

    ContainerInstance

    Variable

    SWC_GET_TABLESWC_GET_TABLE

    SWC_SET_TABLESWC_SET_TABLE

    delete value

    InternalInternal

    TableTable

    InternalInternalTableTable SWC_DELETE_ELEME

    NTSWC_DELETE_ELEME

    NT

    IBM Global Services

  • 7/29/2019 Workflow Material

    72/117

    | Copyright IBM Corporation 2003

    Writing to Container Elements Defined as Object Types

    ContainerInstance:

    CONTAINER

    Object

    Element:MATRLDeclare a variable as an object:

    DATA: MATERIAL TYPE SWC_OBJECT.

    Create an instance of your object in your program:SWC_CREATE_OBJECT MATERIAL MARA MATNR.

    Declare a variable as the key of your object:DATA: MATNR LIKE MARA-MATNR.

    Fill the key with a value:MATNR = 123456.

    Object type from B.O.R.

    Key of object you previously defined

    ransfer value of your object instance to the container element:SWC_SET_ELEMENT CONTAINER MATNR MATERIAL

    IBM Global Services

  • 7/29/2019 Workflow Material

    73/117

    | Copyright IBM Corporation 2003

    Reading Container Elements

    Defined as Object Types

    ContainerInstance:

    CONTAINER

    Declare a variable as an object:DATA: MATERIAL TYPE SWC_OBJECT.

    ObjectElement:MATRL

    Read value of container element to your object:SWC_GET_ELEMENT CONTAINER MATRL MATERIAL.

    Declare a variable as the key of your object:DATA: MATNR LIKE MARA-MATNR.

    Read the object type key into your variable:SWC_GET_OBJECT_KEY MATERIAL MATNR.

    Declare a variable to hold the object type:DATA: OBJTYPE LIKE SWOTOBJID-OBJTYPE.

    Obtain the object type from your object type variable:SWC_GET_OBJECT_TYPE MATERIAL OBJTYPE.

    IBM Global Services

  • 7/29/2019 Workflow Material

    74/117

    | Copyright IBM Corporation 2003

    Writing to Container Elements Defined as Multiline Object

    Types

    ContainerInstance:

    CONTAINER

    Element:PRItems

    Declare a variable as an internal table object:DATA: REQITEMS TYPE SWC_OBJECT OCCURS 0.

    Create an instance of your object for each table line:SWC_CREATE_OBJECT REQITEM BUS2009 PREQKEY.

    Once the internal table is filled, transfer the internal table to themultiline container element:

    SWC_SET_TABLE CONTAINER PRItems REQITEMS.

    Since this internal table has no header, declare awork area: DATA: REQITEM TYPE SWC_OBJECT.

    Declare key fields of the object(e.g. called PREQKEY) and fill them

    (e.g. within a select loop).

    Append the object instance to the internal table:APPEND REQITEM TO REQITEMS.

    IBM Global Services

  • 7/29/2019 Workflow Material

    75/117

    | Copyright IBM Corporation 2003

    Reading Container Elements

    Defined as Multiline Object Types

    ContainerInstance:

    CONTAINER

    ObjectElement:PRItems

    Read value of multiline container elementinto your internal table object:

    SWC_GET_TABLE CONTAINER PRItems REQITEMS.

    Declare your object:

    DATA: REQITEM TYPE SWC_OBJECT.

    Loop through your internal table objectREQITEMS into individual REQITEM entries.

    Perform operations as needed.

    Use this macro to get the keys of each entry:SWC_GET_OBJECT_KEY REQITEMS PREQKEY

    Use this macro to get the object type of each entry:SWC_GET_OBJECT_TYPE REQITEMS OBJTYPE.

    Declare a variable to hold the object type:DATA: OBJTYPE LIKE SWOTOBJID-OBJTYPE.

    IBM Global Services

  • 7/29/2019 Workflow Material

    76/117

    | Copyright IBM Corporation 2003

    Events

    IBM Global Services

  • 7/29/2019 Workflow Material

    77/117

    | Copyright IBM Corporation 2003

    An event describes a possible status change for an object in the SAPSystem.

    Before an event can be used in a workflow, it must be defined in theBusiness Object Repository for the object type.

    Events must be triggered explicitly. The application itself can be thetriggering agent.

    Event

    IBM Global Services

  • 7/29/2019 Workflow Material

    78/117

    | Copyright IBM Corporation 2003

    Types of Event Creation

    ChangeChange

    DocumentDocumentChangeChange

    DocumentDocument

    StatusStatus

    ManagementManagementStatusStatus

    ManagementManagement

    MessageMessage

    ControlControlMessageMessage

    ControlControl

    SpecificSpecific

    HR TablesHR TablesSpecificSpecific

    HR TablesHR Tables

    ABAP CodeABAP Code

    In User ExitIn User ExitABAP CodeABAP Code

    In User ExitIn User Exit

    IBM Global Services

  • 7/29/2019 Workflow Material

    79/117

    | Copyright IBM Corporation 2003

    Using Customizing for event trigger

    Menu Path :Basic menu -> Tools -> Business Workflow -> Development -> Definition toolsMenu Path :Basic menu -> Tools -> Business Workflow -> Development -> Definition tools-> Events-> Events

    IBM Global Services

  • 7/29/2019 Workflow Material

    80/117

    | Copyright IBM Corporation 2003

    Event Creation of Change Document

    ChangingChanging

    Master dataMaster data

    ChangingChanging

    Master dataMaster data

    Event linkage isEvent linkage is

    done to connect todone to connect to

    the workflow/ taskthe workflow/ task

    Event linkage isEvent linkage is

    done to connect todone to connect to

    the workflow/ taskthe workflow/ task

    Event creationEvent creation

    (SWEC)(SWEC)

    Event creationEvent creation

    (SWEC)(SWEC)

    Change loggedChange logged

    usingusing

    change documentschange documents

    Change loggedChange logged

    usingusing

    change documentschange documents

    IBM Global Services

  • 7/29/2019 Workflow Material

    81/117

    | Copyright IBM Corporation 2003

    Event Creation of Status Management

    Event linkage isEvent linkage is

    done to connect todone to connect to

    the workflow/ taskthe workflow/ task

    Event linkage isEvent linkage is

    done to connect todone to connect to

    the workflow/ taskthe workflow/ task

    Event creationEvent creation

    ((BSVWBSVW ))

    Event creationEvent creation

    ((BSVWBSVW ))StatusStatus

    ManagementManagement

    StatusStatus

    ManagementManagement

    When user status

    changes to E002 ,

    event is triggered

    IBM Global Services

  • 7/29/2019 Workflow Material

    82/117

    | Copyright IBM Corporation 2003

    Event Creation of Message Control

    Create Message type and defineCreate Message type and define

    workflow as transmission mediumworkflow as transmission medium

    Create Message type and defineCreate Message type and define

    workflow as transmission mediumworkflow as transmission medium

    Create Condition TableCreate Condition TableCreate Condition TableCreate Condition Table

    Create Access SequenceCreate Access SequenceCreate Access SequenceCreate Access Sequence

    Assign Access SequenceAssign Access Sequence

    to defined message typeto defined message type

    Assign Access SequenceAssign Access Sequence

    to defined message typeto defined message type

    Define Condition RecordsDefine Condition RecordsDefine Condition RecordsDefine Condition Records

    Assign message type To procedureAssign message type To procedureAssign message type To procedureAssign message type To procedure

    Triggering an event using message control occurs with NAST.

    Maintain the processing program RSWEMC01

    with the FORM routine CREATE_EVENT for

    the output type EVEN and transmission

    medium 9.

    IBM Global Services

  • 7/29/2019 Workflow Material

    83/117

    | Copyright IBM Corporation 2003

    Using ABAP Code

    This is using done by writing custom code e.g. by using SAP FM likeSWE_EVENT_CREATE inside user exits, BADI etc.

    CALL FUNCTION 'SWE_EVENT_CREATE'EXPORTING

    OBJTYPE = OBJTYPE

    OBJKEY = OBJKEYEVENT = EVENTCREATOR = APPLICANTSTART_WITH_DELAY = ' '

    IMPORTINGEVENT_ID = EVENTID

    TABLES

    EVENT_CONTAINER = CONTAINEREXCEPTIONSOBJTYPE_NOT_FOUND = 01.

    IF SY-SUBRC = 0.COMMIT WORK.

    ENDIF.

    IBM Global Services

  • 7/29/2019 Workflow Material

    84/117

    | Copyright IBM Corporation 2003

    Event Creators, Receivers and Event Linkage

    PublishedEvents

    Receivers

    EventEventEventEvent

    LinkageLinkageLinkageLinkage

    Creator

    Anybody wantthis event?

    IBM Global Services

  • 7/29/2019 Workflow Material

    85/117

    | Copyright IBM Corporation 2003

    Type Linkage Entry

    Transaction:Transaction: SWE2SWE2

    Menu Path :Basic menu -> Tools -> Business Workflow ->Menu Path :Basic menu -> Tools -> Business Workflow -> Utilities > Other tools >Event linkageUtilities > Other tools >Event linkage

    IBM Global Services

  • 7/29/2019 Workflow Material

    86/117

    | Copyright IBM Corporation 2003

    Event Trace

    Transaction:Transaction: SWELSWELMenu Path :Basic menu -> Tools -> Business Workflow -> Development -> Utilities ->Menu Path :Basic menu -> Tools -> Business Workflow -> Development -> Utilities ->

    Events -> Event Trace.Events -> Event Trace.

    IBM Global Services

  • 7/29/2019 Workflow Material

    87/117

    | Copyright IBM Corporation 2003

    Organisational Structure

    IBM Global Services

  • 7/29/2019 Workflow Material

    88/117

    | Copyright IBM Corporation 2003

    Organizational Structure Business Scenario

    An organizational plan in SAP describes the organizational structureof a company.

    The workflow system finds the agents of the individual tasks by

    evaluating the organizational plan

    The functions to create and maintain organizational plans are partof the Personnel Planning and Development (PD) part of the SAP

    HR module

    You must connect this organizational structure to the workflow

    IBM Global Services

    O i ti l M t

  • 7/29/2019 Workflow Material

    89/117

    | Copyright IBM Corporation 2003

    Organizational units contain positions, occupied by employees.

    Jobs are abstract descriptions of task assignments.

    Positions can be linked to jobs. They inherit all the tasks assigned tothat job.

    Users. A user is an SAP logon user ID. It thus represents a singleperson.

    Persons. A person is a specific employee created in the HR module.

    Workflow tasks can be assigned to organizational units, positions,jobs or users.

    The workflow system uses organizational structure to route work itemsto the correct recipients

    Organizational Management

    IBM Global Services

  • 7/29/2019 Workflow Material

    90/117

    | Copyright IBM Corporation 2003

    Create Organisational Plan

    Create root organizational unitCreate root organizational unit

    Additional organizational unitsAdditional organizational units

    Create jobsCreate jobs

    Create positionsCreate positions

    Assign HoldersAssign Holders

    Assign tasksAssign tasks

    Transaction: Menu Path: PPOCWTransaction: Menu Path: PPOCWToolsTools Business Workflow - Development - Environment - Organizational Management -Business Workflow - Development - Environment - Organizational Management -

    Simple Maintenance Org plan basic data - CreateSimple Maintenance Org plan basic data - Create

    Create Executive BoardCreate Executive Board

    Create Sales region , ProductionCreate Sales region , Production

    Administrator , Sales ManagerAdministrator , Sales Manager

    Sales Manager eastern ZoneSales Manager eastern Zone

    Create Sales OrderCreate Sales Order

    IBM Global Services

    Assigment Workflow Task Organizational

  • 7/29/2019 Workflow Material

    91/117

    | Copyright IBM Corporation 2003

    Position: SecretaryPosition: SecretaryPosition: SecretaryPosition: Secretary

    Position: FI administrator 1Position: FI administrator 1Position: FI administrator 1Position: FI administrator 1

    Position: FI administrator 2Position: FI administrator 2Position: FI administrator 2Position: FI administrator 2

    Organizational unit: FI departmentOrganizational unit: FI departmentOrganizational unit: FI departmentOrganizational unit: FI department

    Position: Head of FI depatmentPosition: Head of FI depatmentPosition: Head of FI depatmentPosition: Head of FI depatment

    Job for FI employeeJob for FI employeeJob for FI employeeJob for FI employee

    User 1User 1User 1User 1

    Manager jobManager jobManager jobManager job

    Job for secretaryJob for secretaryJob for secretaryJob for secretary

    User 2User 2User 2User 2

    User 3User 3User 3User 3

    User 2User 2User 2User 2

    TaskTask

    TaskTask

    TaskTask

    Assigment Workflow Task Organizational

    Objects

    IBM Global Services

  • 7/29/2019 Workflow Material

    92/117

    | Copyright IBM Corporation 2003

    Agent Assignment and

    Role Resolution- Workflow -

    IBM Global Services

  • 7/29/2019 Workflow Material

    93/117

    | Copyright IBM Corporation 2003

    Agent

    Agent is an executor of a work item.

    Agent is responsible for executing a task in a workflow.

    Agent is determined by the system either through organizational chart

    or directly if user is assigned as agent for a particular task.

    If the agents of the individual workflow steps are determined using thecustomer-specific organizational chart, your agent assignment in the

    workflow remains flexible to change.

    IBM Global Services

  • 7/29/2019 Workflow Material

    94/117

    | Copyright IBM Corporation 2003

    Types of Agents

    Deadline AgentsDeadline AgentsDeadline AgentsDeadline Agents

    Notification AgentsNotification AgentsNotification AgentsNotification Agents

    Processing AgentsProcessing AgentsProcessing AgentsProcessing Agents

    Selected agentsSelected agents

    are those possibleare those possibleagents who areagents who are

    elected to execute aelected to execute a

    task at runtimetask at runtime

    Selected agentsSelected agents

    are those possibleare those possibleagents who areagents who are

    elected to execute aelected to execute a

    task at runtimetask at runtime

    Possible agentsPossible agents

    are a collection ofare a collection of

    agents who qualify toagents who qualify to

    execute a work itemexecute a work item

    Possible agentsPossible agents

    are a collection ofare a collection of

    agents who qualify toagents who qualify to

    execute a work itemexecute a work item

    Actual agentActual agent is theis the

    agent among thoseagent among those

    selected agents whoselected agents who

    actually processes theactually processes the

    work itemwork item

    Actual agentActual agent

    is theis the

    agent among thoseagent among those

    selected agents whoselected agents who

    actually processes theactually processes the

    work itemwork item

    IBM Global Services

  • 7/29/2019 Workflow Material

    95/117

    | Copyright IBM Corporation 2003

    Role Resolution

    List of possible agents

    (executors) of a task

    (All supervisors in a dept.)

    Selected Agent(s)

    (Mr. Banning)

    RoleRoleResolutionResolution

    (Supervisor of

    User PBACON)

    Role = Rules

    A role defines rules by which selected agents can be determined at runtime through

    role resolution. Role resolution restricts the number of possible agents.

    IBM Global Services

  • 7/29/2019 Workflow Material

    96/117

    | Copyright IBM Corporation 2003

    Standard Rules

    A rule container is defined for each rule.

    The rule parameters determine which information is required for the rule resolution

    to be executed at runtime.

    If an error occurs during rule resolution, setting the termination indicator for the rule

    resolution determines how the workflow will continue:

    Flag is selected - the workflow assumes an Error status and a notification is sent

    to the workflow administrator.Indicator is not activated - the workflow forwards this work item to ALL possible

    agents.

    IBM Global Services

  • 7/29/2019 Workflow Material

    97/117

    | Copyright IBM Corporation 2003

    Rule Basics

    Transaction : PFAC_INS(Create)Transaction : PFAC_INS(Create)Menu Path: Tools Business Workflow Development Definition tools Rules for AgentMenu Path: Tools Business Workflow Development Definition tools Rules for Agent

    Assignment Create/Change/Display.Assignment Create/Change/Display.

    Each rule gets a 8 digit generated by the system prefixed with AC

    Rules can be tested using PFTC or by function module RH_GET_ACTORS

    IBM Global Services

  • 7/29/2019 Workflow Material

    98/117

    | Copyright IBM Corporation 2003

    Rule Definition in a Activity Step Type

    Various options to create standard rules :

    1. Responsibility (Pure configuration no ABAP coding)

    Defined Value ranges are assigned to Agents

    Data is filled from workflow container at runtime

    1. Evulution paths (Pure configuration no ABAP coding)

    1. Organizational data (Pure configuration no ABAP coding)

    Jobs , positions

    1. Functions to be executed ABAP Code Function Module

    IBM Global Services

  • 7/29/2019 Workflow Material

    99/117

    | Copyright IBM Corporation 2003

    Rule Definition with Responsibility: Example

    JonesJones SmithSmith

    AnnaAnna

    MichaelMichael

    WilliamWilliamRossRoss

    DavidDavid

    GeorgeGeorge

    PeterPeter

    Employee Names A-KEmployee Names A-KEmployee Names A-KEmployee Names A-K

    Employee Names L-ZEmployee Names L-ZEmployee Names L-ZEmployee Names L-Z

    Mr. MillerMr. Miller

    Position : AdministratorPosition : Administrator

    HRHR

    Mr. MillerMr. Miller

    Position : AdministratorPosition : Administrator

    HRHR

    Mr. AndrewMr. Andrew

    Position : AdministratorPosition : Administrator

    HRHR

    Mr. AndrewMr. Andrew

    Position : AdministratorPosition : Administrator

    HRHR

    IBM Global Services

  • 7/29/2019 Workflow Material

    100/117

    | Copyright IBM Corporation 2003

    Rule Definition with Responsibility: Example

    Container ElementContainer Element Data TypeData Type NameName

    ElementElement UnameUname NameName

    Value From From To Name

    A* K* Employees from A-Z

    L* Z* Employees from L-Z

    Rules Container DefinitionRules Container Definition

    Areas of ResponsibilityAreas of Responsibility

    Mr. AndrewMr. Andrew

    Mr. MillerMr. Miller

    Which Value?Which Value? Which AgentWhich Agent

    IBM Global Services

  • 7/29/2019 Workflow Material

    101/117

    | Copyright IBM Corporation 2003

    Evaluation path as Rule

    Evaluation path describes how to find one or more organizational objects based

    On an initial organizational units

    ExampleEvaluation pathEvaluation path MeaningMeaning

    WF_ORGUNWF_ORGUN Get organization unit for a user id/person idGet organization unit for a user id/person id

    WF_ORGUSWF_ORGUS All users of a organization unit,job, positionAll users of a organization unit,job, position

    US_CHEFUS_CHEF Superiors of a usersSuperiors of a users

    SAP_HOLDSAP_HOLD Holder of a positionHolder of a position

    Transaction : OOAWTransaction : OOAW

    Menu Path:Menu Path:

    IBM Global Services

  • 7/29/2019 Workflow Material

    102/117

    | Copyright IBM Corporation 2003

    Evaluation path as Rule contd.

    Here are the basic steps:

    1. Determine the evaluation path that needs to be used

    2. Create a rule setting the type Function to be executed.

    3. Enter function module RH_GET_STRUCTURE

    4. Enter the evaluation path determined in step 1 above

    5. Following rule container needs to be created

    NameName Data type refData type ref DescriptionDescription ExampleExample

    OTYPEOTYPE OBJEC-OTYPEOBJEC-OTYPE Type of organizational management objectType of organizational management object USUS

    OBJIDOBJID OBJEC_REALOOBJEC_REALO ID of organizational management objectID of organizational management object SMITHSMITH

    ORG_AGENTORG_AGENT WFSYST_AGENTWFSYST_AGENT Organizational management objectOrganizational management object USSMITHUSSMITH

    IBM Global Services

  • 7/29/2019 Workflow Material

    103/117

    | Copyright IBM Corporation 2003

    Role Resolution with Function Modules

    ParameterParameter

    TypeTypeNameName Data Type RefData Type Ref MeaningMeaning

    TableTable

    AC_CONTAINERAC_CONTAINER

    SWCONTSWCONT

    Incoming rule containerIncoming rule container

    TableTable ACTOR_TABACTOR_TAB SWHACTORSWHACTOR Outgoing list of agents in agent formatOutgoing list of agents in agent format

    ExceptionException NOBODY_FOUNDNOBODY_FOUND Exception indication no agents foundException indication no agents found

    Role resolution with function module should be done only for complex criteria

    Here are the basic steps:

    1. A function module with the following interface is created

    2. Create a rule setting the type Function to be executed.

    3. Enter the created function module name4. Create container elements.

    IBM Global Services

    Execution of a Role Resolution

  • 7/29/2019 Workflow Material

    104/117

    | Copyright IBM Corporation 2003

    Via organizational objects: Role resolution utilizing organizational dataanalyses

    the assignment of an organizational object (plant, laboratory, MRPcontroller,

    planner group, shipping point, sales office) to a position ororganizational unit.

    Plant Laboratory Sales Office

    Execution of a Role Resolution

    via Organizational Objects

    IBM Global Services

    & f

  • 7/29/2019 Workflow Material

    105/117

    | Copyright IBM Corporation 2003

    Tasks: Possible Agents & Default Roles

    UserUser PositionPosition JobJob Org. UnitOrg. Unit PersonPerson

    TASKTASK

    Default roleDefault role

    Possible agentsPossible agents

    BusinessBusiness

    WorkplaceWorkplace

    The workplace displays the

    work items for a agent

    IBM Global Services

    How are Selected Agents Determined With and

  • 7/29/2019 Workflow Material

    106/117

    | Copyright IBM Corporation 2003

    o a e Se ected ge ts ete ed t a d

    Without a Default Role?

    Possible Agents

    Task definition withno default role

    Task definition withdefault role

    TriggeringTriggeringEventEvent

    IBM Global Services

    How are Selected Agents Determined With a

  • 7/29/2019 Workflow Material

    107/117

    | Copyright IBM Corporation 2003

    How are Selected Agents Determined With a

    WF Agent?

    All possible agents whoqualify to execute task

    Step definition at workflowdefn. level with an agentspecified. This overrides

    default role at task defn. level

    Task definition with

    no default role

    Task definition withdefault role

    TriggeringTriggeringEventEvent

    IBM Global Services

  • 7/29/2019 Workflow Material

    108/117

    | Copyright IBM Corporation 2003

    Workflow and ALE

    IBM Global Services

    ALE error handlingALE error handling

  • 7/29/2019 Workflow Material

    109/117

    | Copyright IBM Corporation 2003

    ALE error handlingALE error handling

    U s e r a c t io nR / a c t io n3

    E x e c u t e W o r k i te m

    F i x e r ro r a n d r e p r o c e s s I D o co rF l a g I D o c f o r d e l e t io n

    E r r o r i n i n b o u n d f u n c t io n m o d u l e

    A L E t r i g g e r s e r r o r e v e n t

    W o r k i t e m a p p e a r s in u s e r 's I n b o x

    D i s p l a y I D o c f o r u s e r p r o c e s s i n g

    ( ID o c m e t h o d " In p u t F o r e g r o u n d " )

    A L E t r i g g e r s e n d e v e n t

    W o r k it e m c o m p l e t e d

    i n p u t E r r o r O c c u r r e d

    in p u t F i n i s h e d

    IBM Global Services

  • 7/29/2019 Workflow Material

    110/117

    | Copyright IBM Corporation 2003

    Workflow and ALE

    Error Notification

    Active Monitoring

    IDOC Processing

    Notification of successful posting

    IBM Global Services

  • 7/29/2019 Workflow Material

    111/117

    | Copyright IBM Corporation 2003

    Workflow and Error Notification

    D e t e r m i n e

    R e c i p i e n t s

    U s e r c h e c k s i n b o x

    a n d e x e c u t e s t h e

    w o r k i t e m

    F i x t h e e r r o r

    P u r g e t h e I D o c

    R e s t a r t t h e

    p r o c e s s

    U s e r / G r o u p

    g e t s n o t i f i e d

    v i a a w o r k i t e m

    C a n e r r o r b e

    f i x e d ?

    E n d

    E x c e p t i o n

    R a i s e d

    Y e s

    N o

    B u s i n e s s U s e r A n a l y s i s

    IBM Global Services

    A ti M it i

  • 7/29/2019 Workflow Material

    112/117

    | Copyright IBM Corporation 2003

    Active Monitoring

    Active monitoring allows to specify threshold values for the state of the system

    For e.g threshold can be on the number of IDocs in error or the time limit

    Report Program RSEIDOCA can be executed periodically

    Selection screen takes as input the threshold values and persons to be notified

    When defined threshold is exceeded Single Step Task TS30200088 is executed

    IBM Global Services

  • 7/29/2019 Workflow Material

    113/117

    | Copyright IBM Corporation 2003

    Setting up Inbound Process via Workflow

    The standard system can be configured to start a WF for an incoming IDoc.

    Useful when review is essential before posting

    Custom. SAP does not deliver standard.

    The settings are:

    --Create the custom task or WF--Create a new process Code ( WE42) and attach this

    custom WF/Task.

    --In the Partner Profile, attach the new Process code

    IBM Global Services

  • 7/29/2019 Workflow Material

    114/117

    | Copyright IBM Corporation 2003

    Notification of Successful Posting

    The ALE/EDI interface can raise events on successful posting of an IDOC.

    The settings are:

    --Identify the Appl.Obj created by the Idoc. Txn: WE57

    --Identify the event that needs to be raised.

    --Go to BD67, select Process code and populate Object

    type and Event.

    --Identify/Create tasks/WF and enable event linkage.

    IBM Global Services

    ALE error handlingALE error handling

  • 7/29/2019 Workflow Material

    115/117

    | Copyright IBM Corporation 2003

    ALE error handlingALE error handling

    Necessary Steps:

    Create new object type in Business Object Repository for IDOC; objectis child of IDOCAPPL

    Create new customer task

    Create event-couplings linking

    Event inputErrorOccured linked to standard task

    Event inputFinished to function module

    To support mass processing:

    Create new object type as child of IDOCPACKET

    Maintain process code to refer the above objects and events

    IBM Global Services

  • 7/29/2019 Workflow Material

    116/117

    | Copyright IBM Corporation 2003

    Business Workflow

    Customization- Workflow -

    IBM Global Services

    Workflow Customizing - SWU3

  • 7/29/2019 Workflow Material

    117/117

    Workflow Customizing SWU3