Introduction to SAP Business Workflow

27
Introduction to SAP Business Workflow Adrian Bruwer 2011-09-09

Transcript of Introduction to SAP Business Workflow

Page 1: Introduction to SAP Business Workflow

Introduction toSAP Business Workflow

Adrian Bruwer2011-09-09

Page 2: Introduction to SAP Business Workflow

SAP R/3 Basis System(BIT601 Unit 1)

Sales &Distribution

MaterialsMgmt.

ProductionPlanning

FinancialAccounting

Controlling

Fixed AssetsMgmt.

QualityMgmt.

PlantMaintenance

HumanResources

Workflow

IndustrySolutions

R/3Client / Server

ABAP/4 ProjectSystem

Logistical Financial

Page 3: Introduction to SAP Business Workflow

WebFlow Engine: Architecture (BIT600 Appendix 1: Review)

(PPOC)

(SWDD)

(SWO1)

Page 4: Introduction to SAP Business Workflow

Workflow Architecture, understanding the Components of a Workflow

(BIT601 Unit 1)

(PPOC)

(SWDD)

(SWO1)

Page 5: Introduction to SAP Business Workflow

What is Business Workflow?(BIT601 Unit 1)

• The key term here is ‘workflow’: the right agent doing the right work at the right time

• The right work: Whatever you want to execute within a workflow. This work must be implemented as a method of a business object type in the Business Object Repository.

• Methods can be implemented as BAPIs. You can then call them from outside the system.

• BAPIs have an established static interface.• The tool for maintaining business object types is the Business Object

Repository (BOR)• At the right time: The process level describes the business process in

a sequence of individual steps. Together, these steps form the workflow definition.

Page 6: Introduction to SAP Business Workflow

What is Business Workflow? cont.(BIT601 Unit 1)

• An individual step can refer to a method in the BOR, but it can also be used to control the process, for example, to allow loop processes, to query conditions or to fill the interface (= container) with values. The tool used for maintaining the process level is the Workflow Builder.

• The right agent: The organizational level establishes the link to the organizational plan.

• A task that can be executed within a workflow has a group of possible agents.

• This group can be restricted by specifying the agent in the workflow step. • At runtime, selected agents receive a work item in their Business

Workplace.• If the work item is executed, the system starts the relevant method of

the business object type.

Page 7: Introduction to SAP Business Workflow

Workflow Concept:(BIT600 Unit 2)

Which processes are particularly suited to the use of workflows?A workflow management system facilitates the electronic processing of

structured processes that:• Include a number of activities• Always occur in a similar or identical form• Involve several people or departments, and• Require a high degree of coordination• Workflow management systems control processes according to a

predefined model and are particularly suited to structured organizations.• Workflow cannot make up for missing SAP functions. If you cannot

execute a function manually, you cannot execute it with a workflow either. The function must exist in the program code before it can be used by workflow.

Page 8: Introduction to SAP Business Workflow

Advantages:(BIT600 Unit 2)

• As soon as a task is due for processing, it is delivered to the user in their electronic inbox (the effort of retrieving the task is avoided, because the system delivers it).

• All the information, explanations and instructions available are delivered to the user at the same time.

• The workflow branches automatically to the correct transactions of the SAP system.

• Deadline monitoring is a means of process control. It includes an option to initiate escalation procedures.

Page 9: Introduction to SAP Business Workflow

Who? What? With what Object? When? In what Order?

(BIT600 Unit 2)

• A workflow definition describes the business process to be mapped, for example approving vacation.• A workflow definition consists of individual, sequential steps.• Each step describes one action in the workflow process e.g. Creating Order, Checking Order, Creating

a loop for resubmission (control step), Waiting for the result of another process (control step).• Workflows are usually triggered by events. These events are not dependent on the workflow, and

must be actively linked to it.• The data is automatically transferred from one workflow step to another workflow step. The interface

for this data flow is the Workflow Container (structures/tables)• A task might execute a transaction, a report, a function module, run a routine in an external system,

update a spreadsheet, or simply act as a reminder that something is to be carried out manually.• A task can be used as a mini workflow itself. For example, in IDoc error handling where we just want

to notify someone that an error has occurred.• If a task is to be executed by a person, an agent must be assigned.• At runtime, the task generates a work item in the agent’s Business Workplace.• The aim of workflow-driven processes is for the correct agents of a process step to be determined

automatically.• The WebFlow Engine makes this automatic agent determination possible by requiring that a number

of possible agents be defined for each individual task.

Page 10: Introduction to SAP Business Workflow

Events:(BIT600 Unit 2)

• The event is only defined in the Business Object Repository.• If the status of an object changes during a process, the application must trigger the relevant

event.• This publishes the event across the system, enabling a workflow to react to it.• Events inform the system that something has happened. The workflow can react to an event

if it is actively linked to the event.• Events (for example, “purchase requisition created”) are published in the system and can be

evaluated by all existing workflows.• An outcome is a possible result of a step. You can define a specific reaction for each outcome

in the workflow.• Possible outcomes of the task “approve request” may be: approved, rejected, revised.• A work item can be terminated by an event, by an exception or by a result of a method.• In the workflow step, the possible outcomes are displayed on the ‘Outcomes’ tab page.• Outcomes can be deactivated, meaning that modeling is no longer necessary.• The workflow then assumes an error status as soon as it reaches the outcome.• There is a step type “Event generator” and “Wait for event”

Page 11: Introduction to SAP Business Workflow

SAP Organizational Management: (BIT600 Unit 3)

• Organizational units reflect the Organizational plan of the enterprise.• They contain positions. The positions are occupied by holders, usually one holder per

position. However, it is also possible for positions to be occupied by more than one holder on a percentage basis.

• Jobs are abstract descriptions of task assignments.• Positions can be linked to jobs. They then inherit all the tasks assigned to the job.• Tasks can be assigned to organizational units, positions or jobs.• Tasks can also be allocated to users. However, this nullifies the flexibility of

assignments in the event of enterprise reorganizations.• The currently valid organizational plan of an enterprise is known to the organizational

management and the WebFlow Engine as an “Active plan variant”• The WebFlow engine uses the current organizational plan to route work items to the

correct recipients.• Changes or redeployments of employees may now only be maintained on the

organization page. Workflow and task definitions remain unaffected.• Use Simple Maintenance to create, Org Units, Positions, Holder, Jobs & Task links.

Page 12: Introduction to SAP Business Workflow

SAP Workflows in the Applications(Also search on Internet for Step-by-step guides)

(BIT600 Unit 4)

Page 13: Introduction to SAP Business Workflow

Find SAP Workflows:(BIT600 Unit 4)(BIT601 Unit 1)

• As of R/3 Enterprise, you can find which applications provide workflows as templates by consulting the documentation for the relevant application. In Release 4.6C, the documentation is available in the SAP Library under Basis Components → Business Management → SAP Business Workflow → Reference Documentation. The templates delivered for different applications are listed under Workflow Scenarios in Applications.

• Some business processes are supported by ready-to-use workflows. These processes are supplied by SAP as SAP Workflows.

• Maintenance of possible agents and activation of event linkages must be performed by the customer themselves.

• To find SAP workflows in the system, choose Tools -> Business Workflow -> Development -> Definition Tools -> Tasks/Task Groups -> Display.

• Workflow templates have a key consisting of the task type WS and a sequence number.• You can use the structure search to locate an SAP Workflow for a specific application area.• You can expand this list until you find the workflow definition and Workflow Builder.• Only if you do not find a suitable template, do you have to plan and implement the workflow

yourself from start to finish.

Page 14: Introduction to SAP Business Workflow

Adapting and Using SAP Workflows(BIT600 Unit 4)

• Determine the business process to be supported by SAP Business Workflow.

• Select an SAP workflow that meets your requirements.

• Create your organizational plan.• Define possible agents for the tasks.• Activate the event linkage for your workflow.• Adjust the info texts for each customer.• Test your settings.

Page 15: Introduction to SAP Business Workflow

Approximate Procedure When Implementing a Workflow Scenario BOTTOM-UP

(BIT601 Unit 1)

• Business Object Repository: Check to see whether a suitable object type exists and whether it has all of the necessary attributes, methods and events. If they are not available, you must enhance the object type to suit your requirements.

• Check whether the system already contains tasks for your required steps. Else create the necessary tasks (TSxxxxxxxx).

• Generate the workflow template and implement the tasks (= business steps), always create the steps that refer to an object method first (these are the business steps). This allows the system to generate the necessary container elements.

• Implement any additional controlling steps such as loops, conditions, container operations, and so on.

• Call transaction SWUS from the Workflow Builder and use it to test the workflow.• Create a link between the workflow and the event. Test: Trigger an event directly in

transaction SWUE.• Trigger the event in the required application.

Page 16: Introduction to SAP Business Workflow

Automatic Workflow CustomizingTransaction SWU3

(BIT600 Unit 5)

Page 17: Introduction to SAP Business Workflow

Initial Workflow setup includes:(BIT600 Unit 5)

• Create WF-BATCH System/Background User using user administration function SU01, assigning this user the authorization profiles “SAP_ALL” and “SAP_NEW”

• Logical RFC Destination WORKFLOW_LOCAL_&MANDT&• Set up Workflow Administrator - responsible for the workflow definition from a technical point

of view• Set an Active Plan version to “01” (PLOGI PLOGI)• Schedule background jobs for

– Deadline Monitoring of Work Items - Job SWWDHEX. You can use transaction SWWA to schedule permanent deadline monitoring in each of your production system clients.

– Work Items with Errors SWWERRE.– Condition Evaluation, Event Queues and Clean-up Tasks

• When the verification workflow is started, the previous customizing activities are tested. A work item is sent to the user who started the verification.

• Create Prefix Numbers for Standard Objects• Maintain a standard domain for Internet mail• In addition to the general customizing for the workflow system, each SAP Workflow also has its

own specific Customizing, which is usually set within the application in the IMG. See detailed documentation in IMG.

Page 18: Introduction to SAP Business Workflow

Business Workplace(BIT600 Unit 6)

• The Business Workplace is the interface between the user and the workflow system.• The content of the worklist is compiled on a user-specific basis, so the worklist

displayed always corresponds to the appropriate role, which can change according to the organizational assignment of the employee.

• The worklist contains all the work items (all the activities to be processed) assigned to this user. The Business Workplace is therefore the most important interface for an employee in their day-to-day work.

• In addition to the worklist (list of work items), the document inbox (e-mail, Internet mail and fax) is also displayed in the Business Workplace.

• There are also six dynamic columns available. Data shown in this dynamic columns can be configured individually for each task.

• You can maintain substitution in two ways, Personal substitute (for an SAP user) or position substitute.

• Recommendation: Every user should maintain a personal substitute.• Attachments do not appear immediately and have to be called using pushbuttons.• The workflow log contains all information about a business process.

Page 19: Introduction to SAP Business Workflow

Business Workplace in R/3(BIT600 Unit 6)

Page 20: Introduction to SAP Business Workflow

Workflow Architecture(BIT600 Unit 7)

• The technical representation of business processes in the SAP system can be carried out as a workflow definition - SWDD

• Tasks represent individual business activities in a workflow. Workflows in turn represent an entire business process - PFTC

• Tasks represent an action that must be carried out. In all cases, they refer to exactly one method of an object type (business transactions). What? With what?

• The action may be a step which the system executes automatically in the background. In this case, there is no assigned agent.

• The action may be a dialog task. In this case, there are possible agents for the task. Who? Additional Data→ Maintain Agent Assignment.

• The work item text is the text in the .Title. column of the worklist.• A notification text can be sent to the message recipient when processing of the work item

is complete.• From an organizational viewpoint, Tasks are the central element of the workflow.• As of Release 4.5, you can create the following types of tasks: Standard task (TS), workflow

template (WS) and task group (TG).• You can call BOR methods or OO ABAP object classes in the tasks of a workflow.

Page 21: Introduction to SAP Business Workflow

Workflow Architecture(BIT600 Unit 7)

• Agent determination:– The system first determines the possible agents defined during the task and then the

responsible agents defined in the workflow.– Selecting these two groups results in an overlap.– The system deletes any excluded agents (on a step level) from this overlap group.– The remaining agents are the work item recipients. They can access the work item.– The first of these agents to access the work item becomes the The first of these agents

to access the work item becomes the actual agent..

• You can maintain the following texts in a Task:– Description (task description, appears in the work item preview in the Business

Workplace and in the work item detail display.– Text on completion (text is sent to a specified user when the work item has been

completed)– Texts for missed deadlines (texts are sent to a specified user if the work item has not

been processed within the time specified)

Page 22: Introduction to SAP Business Workflow

General Information on Task Definitions(BIT600 Unit 7)

Page 23: Introduction to SAP Business Workflow

The Workflow Builder is divided into the following areas:

(BIT600 Unit 7)

• Steps: Tree structure with sequence of the workflow steps. Double click on a step to call the corresponding step definition.

• Containers: Variables of the workflow interface• Tasks: individual set of tasks and workflows for easy inserting and navigation• Document templates: Displays available document templates• Wizards• Teamworking• Overview: display of the whole workflow definition• Step types that can be inserted: All available step types for Drag&Drop into

the workflow definition• Messages: all output generated in where-used lists and workflow tests is

displayed here• Workflows with this definition

Page 24: Introduction to SAP Business Workflow

Adapting and Testing Workflow Templates(BIT600 Unit 7 Solution 12 Page 220)

• PFTC_CHG – Copy and change AF_process to e.g. AF_process&uname& and process notification of absence triggering event FORMABSENC~CREATED, task 30000015

• Call the Workflow Builder - The Workflow definition is displayed. You can go to the step definition by double-clicking on a particular step. All of the .Activity. type steps refer to a standard task.

• In Activity “Approve notification of absence”, Control tab, “Task Properties” box, click on “Agent Assignment” for Task button.

• Follow the rest of the solution for step-by-steps• Also see BIT601 Unit 1 top of Page 6 for design step-by-step

Page 25: Introduction to SAP Business Workflow

Reporting and Trouble-shooting(BIT600 Unit 9)

• You can use the workflow diagnosis if you experience problems with a specific workflow. Run →Tools→ Business Workflow→ Development→ Reporting→Work Item Analysis report.

• You can use transaction SWU7 or SWU4 to test the consistency of a workflow or task definition.

• You should always check transaction SWU3 if you suspect that there is an error in the workflow system. The “Verify Workflow Customizing” screen should only contain green traffic lights before you process a workflow in the development system.

• The RFC protocol provides you with an overview of any RFC problems. The RFC protocol is located in transaction SM58.

• For test purposes, you can manually start a task or workflow in transaction SWUS or using the “Test” icon within the Workflow Builder.

• Graphical Workflow Log. A green line in the graphical display of the workflow definition indicates the flow of workflow steps that were already processed. You can therefore determine the .route. taken by a workflow instance at a glance as well as determine those activities processed in a business process at the same time as your own activities.

Page 26: Introduction to SAP Business Workflow

MAIN Transactions (BIT600 Appendix 3)

• SWO1 - Business Object Builder• SWDD - Main Workflow Builder, Edit WF Definitions• SWUE - Trigger an event/Simulate an event• PFTC - General task maintenance• SBWP - The Business Workplace• SWELS - Event Trace on Business Transactions• SWEL - Display Event Trace• SWETYPV - Display/Maintain Event Type Linkages• PPOC - Simple Maintenance (Org. Structure)�• SWDM - Business Workflow Explorer• SWUS - Test Workflow• SWUI - Start Workflow

Page 27: Introduction to SAP Business Workflow

Tasks and Event Transactions(BIT600 Appendix 3)

• PFTC_INS – Create Task/Task Groups• PFTC_CHG – Change Task/Task Groups• PFTC_DIS – Display Task/Task Groups• PFTC_COP – Copy Task/Task Groups• PFTC_DEL – Delete Task/Task Groups• BSVW – Status management (Events Creation)• NACE – Message Control• AWUW – Logistics Information System (LIS)• SWB_COND – Workflow Start Conditions (Event linkages)• SWI2_FREQ – Work Items Per Task• SWI2_DEAD – Work Items With Monitored Deadlines• SWI2_DURA – Work Items By Processing Duration• SWI11 – Tasks in Workflows• SWI13 – Task profile