You are on page 1of 87

SAP Business Workflow

University of Applied Sciences, Heidelberg

TABLE OF CONTENTS

ACKNOWLEDGEMENTS 1 INTRODUCTION
1.1 1.2 2.1 2.2 2.3 3.1 3.2 3.2.1 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.4 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.2 4.3 4.4 5.1 5.2 5.3 5.3.1 5.3.2 5.4 5.4.1 5.4.2 5.4.3

3 7 9

Motivation............................................................................................................... 7 Features ................................................................................................................... 8 Data Needed by Workflow ................................................................................... 10 What Data Already Exists?................................................................................... 10 Making the Most of the Data ................................................................................ 10

2 BUSINESS PROCESS

3 ARCHITECTURE OF SAP BUSINESS WORKFLOW

12

Workflow Management System ........................................................................... 12 Event Driven Process Chains (EPCs) ................................................................... 16 Modeling Rules of EPCs 16 Technical Principles of SAP Business Workflow ................................................ 17 Business Process and Work Items. 17 Workflow and workflow definition 17 Tasks 18 Object types and objects 18 Modular Architecture of Business Workflow....................................................... 19

4 CONFIGURING THE SYSTEM

21

Automatic Workflow Customizing....................................................................... 21 Configuring a Client specific RFC Destination. 22 Scheduling background jobs 22 Setting an active plan version 22 Maintaining a workflow system administrator 23 Start Verification workflow .................................................................................. 23 Workflow Scenarios.............................................................................................. 23 Customizing for Tasks and Workflows ................................................................ 24

5 SAP BUSINESS WORKPLACE

25

Introduction........................................................................................................... 25 Features ................................................................................................................. 25 Working with SAP Business Workplace. ............................................................. 26 Worklist 27 Work Item Preview 27 Work Item Delivery .............................................................................................. 27 Inbox Features 27 Work Item Text 28 Work Item Functions 29

6 AGENTS AND ORGANISATIONAL STRUCTURE

31

6.1 Understanding Agent Assignment ........................................................................ 31 6.2 Agent Assignment using the Organizational Structure......................................... 34 6.2.1 The Basic Organizational Plan 35 4

SAP Business Workflow 6.2.2 7.1 7.2 7.3 7.3.1 7.3.2 7.3.3 7.3.4 7.4 7.5 7.6 7.7 8.1 8.2 8.3 9.1 9.2 9.3 10.1 10.2 10.3 10.3.1 10.3.2 10.4 10.5 10.6 11.1 11.1.1 11.1.2 11.1.3 11.2 11.3 11.4 Without an Organizational Plan

University of Applied Sciences, Heidelberg 37

7 CREATING WORKFLOWS

38

Introduction........................................................................................................... 38 Features ................................................................................................................. 38 The Work Flow Builder ........................................................................................ 39 Feel of Workflow Builder 39 Building the First Workflow 42 Step Types and Their Symbols 43 Dead Line Monitoring 46 Creating a Task ..................................................................................................... 46 Creating Container Elements ................................................................................ 48 Binding Definition ................................................................................................ 53 Linking workflow within or Between Systems .................................................... 56

8 BUSINESS OBJECTS

57

Basics of Business Objects ................................................................................... 57 Business Objects in Workflow.............................................................................. 58 Business Object Tools........................................................................................... 59

9 EVENTS

62

Understanding Events ........................................................................................... 62 Defining Events .................................................................................................... 62 Event Container. ................................................................................................... 66

10 INTERNET AND BEYOND

67

Web flow Function ............................................................................................... 68 Defining the Web Server ...................................................................................... 68 WF-XML .............................................................................................................. 71 Features 72 Configuring the System 72 SOAP (Simple Object Access Protocol)............................................................... 74 WSDL (Web Service Description Language)....................................................... 75 Business Document Navigator.............................................................................. 75

11 WORKFLOW IMPLEMENTATION IN SD MODULE

77

Sales and Distribution Module.............................................................................. 77 Overview 77 Organizational Structures 78 Customers and Business Partners 78 Creating a Sales Order .......................................................................................... 79 Linking the Workflow to the SD Module ............................................................. 81 Implementation of WF-XML in SD Application.................................................. 83

CONCLUSION DECLARATION REFERENCES LIST OF FIGURES LIST OF TABLES

87 88 89 90 90

SAP Business Workflow

University of Applied Sciences, Heidelberg

ABSTRACT
This report discusses the Architectural Design of SAP Business Workflow and its role implementation in the SAP Sales and Distribution Functional Module (SD).In my projects, SAP Business Workflow uses the existing transactions and functions in the SD module of the SAP System without changing them to form new business processes. The main aim of my thesis was therefore to utilize the workflow tools and its components in order to automate SD functions in the real time business process.

SAP Business Workflow

University of Applied Sciences, Heidelberg

INTRODUCTION

SAP Business Workflow/Web Flow/Intelligent ERP is a part of SAP R/3 Basis and has been designed as a cross-application tool enabling integration of transactions beyond the limits of applications. It enhances ready-made standard application software and its is used in particular, to adapt the standard functionality of the SAP R/3 system to the specific requirements of a company and provide technologies and tools for processing and controlling cross-application processes automatically. 1.1 Motivation SAP Business Workflow is intended to manage business processes automatically or semiautomatically by controlling the sequences of activities. It integrates and complements the available comprehensive business functionality of the R/3 System and provides the infrastructure and tools that enable to manage the businesss processes efficiently. It gets the data quickly to the right person - even if that person is in a different office or location, and makes it easy for approvers to deal with the transaction and send it on to the next step.

Workflow enables to define business processes according to the company-specific rules, models or organizational standards. One can monitor the Workflow and view information on the current status of a task or work item at any point. With SAP Workflow, approvers can indicate total or partial approval of transactions in the same approval process. Competitive factors such as high quality, quicker delivery times, and greater customer orientation require modern companies to have a flexible and process-oriented organizational structure. However, there are some historical problems and weaknesses in conventional office and administrative processes such as: x High cycle times due to extensive time spent waiting and in transport. x Inadequate process transparency related to extensive division of labor x Traditional task assignments (limitation of responsibility and functionally oriented areas of responsibility)

SAP Business Workflow

University of Applied Sciences, Heidelberg

Employees are integrated in the automated processes, eliminating the need to perform redundant, manual functions. Up-to-date information and access to required documents at any time increases employee productivity. SAP Workflow capitalizes on the investment made in the SAP System and exploits the capabilities and benefits of the architecture, services, and integrated applications to facilitate the automation of business processes. Whenever there is a change to the organization, the changes are automatically reflected in Workflow. And since SAP Workflow is position-based, instead of person-based, there is no need to update the Workflow routes every time an employee changes jobs 1.2 Features Business Workflow provides a number of tools for defining and analyzing workflows as well as for monitoring operation. x The Workflow Builder for displaying and making changes to workflows. x There are several Workflow Wizards to support the definition of workflows, with which creation of specific parts of a workflow is easy. x The Business Object Builder is used to define and analyze the business object types, which further make the functions of the SAP System available to the workflow. x Workflow Triggering Events are used and triggered automatically by the SAP System if a pre-defined situation arises. x Web Flow Functions can be used to execute workflows between different companies and the data required can be sent as XML documents. Business Workflow can also respond to suitable inbound XML documents. x The end user receives information about the activities that they carry out in their Business Workplace or in the Workflow Inbox Mini App or in the iView Universal Work list of the enterprise portal. Simplifies continuous business engineering and process change management with user-friendly tools for defining and dynamically changing Workflow tasks. x Conforms to the Workflow standards of the Workflow Management Coalition (WfMC).

SAP Business Workflow

University of Applied Sciences, Heidelberg

BUSINESS PROCESS

Business Process is A collection of activities that takes one or more kinds of input and creates an output that is of value to the customer. Or A group of business activities undertaken by an organization in pursuit of a common goal.

Sales Area Manager

Sales Associate

Sends Customer Order for Approval

Checks customer details and order

Approves the order for production

Creates an online order

Finished Product Delivery (3rd Party) Design and Production Team Customer

Figure: 2.1. Swim Lane Diagram of a Process. [OD]

Gathering requirements for a workflow is very much similar to gathering requirements for a business process. Many individual pieces of data may be used across a workflow, but there are often close relationships among them. In particular, much of the data is related directly to the entities involved in the business process In-fact in workflow terminology these entities are called as business objects. However, before starting to collect data into the business objects we need to know what data is needed by the defined workflow.

SAP Business Workflow 2.1 Data Needed by Workflow

University of Applied Sciences, Heidelberg

Data may be used for a variety of purposes in a workflow .For example considering the workflow that controls the follow-on processing of a sales order, a lot of data related to the particular sales order is supposed to be gathered for processing. x Data used in performing tasks. When a workflow is started, the triggering mechanism usually passes some key information to the workflow, for example an order number to a workflow when a order is created or changed in the SD functional module. The workflow then passes this information on to each task to be performed. x Data used to determine who should perform the task. For the workflow to be executed a particular person (agent) is responsible for the business process to continue .For example for displaying or making changes in the sales order created earlier, a person is chosen in the organizational unit depending on his or her position x Data used to determine escalation times. If the workflow has to be completed within one week after order creation date/time, order creation date and order creation time must be made available to the workflow.

2.2

What Data Already Exists?

Workflows provide some data by default which includes: x Workflow system information, such as the workflow initiator, that is the person who triggers the process. x Details of the tasks just executed, such as who executed it, start and finish times. 2.3 Making the Most of the Data

From the data perspective, when considering a task related to a particular customer in the sales transaction the customers customer number, name address and contact details are very much important. SAP has defined Business objects which collect the data, encourages consistency and ensures reusability. In-fact collected data into the business objects is more than just a matter of convenience.

10

SAP Business Workflow

University of Applied Sciences, Heidelberg

Implementation of a Workflow System should only happen after process have been fully optimized. The workflow life cycle places the Implementation of workflows into a larger cyclical relationship as show in the fig below: Workflow Implementation Process Analysis & Optimisation Workflow Evaluation Workflow Usage

.Identification of process

Figure:2.2. Process Flow Diagram. [WFN]

An abstract view of a workflow is when business objects are processed in a previously defined specific sequence and the processing is done in different steps and by different users.

11

SAP Business Workflow

University of Applied Sciences, Heidelberg

ARCHITECTURE OF SAP BUSINESS WORKFLOW

Workflow is: Software that integrates business rules and people, independent of the triggering event, to enable and control access to knowledge and information while coordinating all the roles in a business process, including internal workers, customers, suppliers, software agents and applications.

3.1

Workflow Management System

Workflow Management System (WFMS) is a generic software package used to build a Workflow System (WFS).More than 250 workflow management systems are available. However, workflow management systems x facilitate workflow management efforts (analyze/change) x lead to concrete concepts and terms. x process optimisation which leads to high speed, security and transparancy. The basic concept of the Workflow Management System is as show below:

Workflow management system

Control (process logistics)

DBMS
Execution(task orientation)

Applications
Figure:3.1. Basic Concept of Workflow Management System [GITN] x Separation of control and execution

12

SAP Business Workflow

University of Applied Sciences, Heidelberg

Buildtime Workflow Defination Tool

Process Definition

Application Who? Organizat. System call 1 Workflow Engine


Call Method

Worklist Interact via

Object/ Method

Worklflow Handler What?


2

Runtime

exec send User Interface

Figure:3.2 .Basic Architecture of a Workflow[WFN]

13

SAP Business Workflow

University of Applied Sciences, Heidelberg

From the below figure 3.2 the basic building blocks of the SAP Business Workflow are shown: During the Build time process of the Work Flow (WF). x Actual design/blueprint of the workflow is implemented in the WFMS. x The roles are accomplished by Process Blueprint Group or WF Architect. x During the Runtime Process x The operation of the WF is under control of the WFMS x The roles are accomplished by the WF. Administrator or the WF User who is an Occasional User. The components of the SAP Business Workflow are: Workflow Definition Tool x Helps in Creating, Displaying and Processing the Design of the workflow. x Handles different versions of workflows. x Often uses EPCs. x Stores the WF Processes in Libraries and later they are tested and Simulated.

Workflow Engine x Controls the execution of the WF Definition: x Helps in Creating/Maintaining the Work list and data transfer between individual steps of a workflow definition. x Provides initial data for a workflow x Calculates the deadline for steps in a workflow definition x Execution of container operations, process controls and event creators x Evaluates the conditions

Work Flow Handler: It is a very important component of the Business Workflow where it x Controls the processing of individual steps x Monitors the deadlines for individual steps x Assigns agents for those individual steps x Logs all the activities executed on a step in the workflow log

14

SAP Business Workflow Applications.

University of Applied Sciences, Heidelberg

There are many applications in the SAP system, but the workflow only x Access the functions of the applications x The APIs & x The objects, its methods and related events.

Organization Unit. x It is a structural unit of a particular organization where x Tasks are assigned to roles, positions, jobs of the organization x Simultaneous consideration of organizational definition/changes are processed x Automatic routing adjustments are made for employee changes or reassignments x Automatic substitutions are done like e.g. illness, vacation

User Interface. It is an Easy to use tool from the business and success point of view. There are many possible User Interfaces like the x Build in GUI of the WFMS. x Special Forms (Web forms, Smart forms). x Hand-helds may contain SAP Portal Soft wares. x Mail system (e.g. Outlook, Lotus notes).

15

SAP Business Workflow 3.2

University of Applied Sciences, Heidelberg

Event Driven Process Chains (EPCs)

What Object and Event? Triggered by System/User? Time Aspect? What Step Type? ApplicationTask

Process

Structure

Dataflow
4 5

User Decision Condition Loop What Object and Method? Responsibility Time? Media?
6

7 Figure:3.3 .EPC Model Diagram [WFN] 3.2.1 Modeling Rules of EPCs

x EPCs consist of events, functions and connectors. x Every EPC starts and ends with at least one event. x EPCs have certain directions describing the process flow. x Events and functions are used alternate, functions never follow functions, events never follow events. x Events and functions have not more than one incoming and one outgoing process flow. x Organizational units, Application Systems and Data are added to an Extended EPC (eEPC)

16

SAP Business Workflow

University of Applied Sciences, Heidelberg

3.3 Technical Principles of SAP Business Workflow The definition and execution of a workflow can be divided into four main areas. A user executes workflows in his or her Business Workplace where the work items that they are allowed to execute are displayed. x A workflow must be defined to be executed. To this end, a workflow definition is created in the Workflow Builder. This definition contains steps that are executed at runtime. The steps either control the workflow directly or contain a reference to a task. x The task refers to a method of an object type in the Business Object Repository (BOR) and can be executed at runtime either automatically (background task) or by a user (dialog task).

Figure:3.4. Technical Diagram of SAP Business Work flow[SI] 3.3.1 Business Process and Work Items. Work items are displayed to the user for execution in their Business Workplace. For example, work items represent a step at runtime that is to be executed. There are various types of work item. Only certain types are displayed in the Business Workplace. 3.3.2 Workflow and workflow definition To define a workflow before execution, this workflow definition is made up of steps that control the workflow or refer to the tasks to be executed. You can make additional specifications about agents and deadline monitoring for a step. These specifications are 17

SAP Business Workflow

University of Applied Sciences, Heidelberg

evaluated at runtime by the work item manager. The workflow is started either manually by the user or by the system. For the system to start a workflow, the workflow definition must contain at least one triggering event (for example the event material created). When the event occurs, the relevant workflow is started automatically. When you activate a workflow definition, you automatically generate a runtime version. When the workflow is started (manually or automatically), the relevant runtime version is used for the execution. If the workflow definition is changed later and a new runtime version is generated, these changes do not affect workflows that are already being executed. 3.3.3 Tasks Tasks describe elementary business activities. Tasks always refer to a method of an object type. Possible agents are defined for tasks. Tasks can refer to automatically executable methods (background tasks) or they can require a user to execute them (dialog tasks). 3.3.4 Object types and objects An object type describes the data with which you want to work in a workflow (for example the object type Material). An object is an individual data record of an object type. Attributes are defined for an object type, which make up its data record (such as material name, material number). Every object type has methods in which activities are defined that can be executed with the data (for example, create material). You can call the transactions and functions of the SAP System in a method, as can your own or other applications. Events are another important component of an object type. The events describe the status changes that an object can undergo (for example, material deleted or material changed). A workflow can be started by an event of this kind being triggered. The Business Object Repository provides an overview of all the object types in the SAP System. You can use or extend the existing object types as well as create new object types.

18

SAP Business Workflow 3.4

University of Applied Sciences, Heidelberg

Modular Architecture of Business Workflow

Step 4
WorkflowDefinition

Step 3

Single Tasks

Create SalesOrder

Change SalesOrder

Display SalesOrder

Object
Method

Object: SalesOrder Methods: Create Change Display

Step 2

Step 1 Business Application

Sales Order Form SD Functional Module(Application)

Figure:3.5. Modular Structure of SAP Business Work Flow with an Example. [WFN]

Step 1: During this process the appropriate Application is selected. Here in the above example the Sales Order Application is taken into consideration under the Sales and Distribution Functional Module. Step 2: Here the Object name Sales Order(BUS2032) and its methods Create, Change and Display are defined.

19

SAP Business Workflow

University of Applied Sciences, Heidelberg

Step 3: Here the Single Step tasks are defined and the above objects and its methods are used for the process to take place. Step4: The Single Step Tasks or Activities are used to build the Workflow along with other step types and operators.

20

SAP Business Workflow

University of Applied Sciences, Heidelberg

CONFIGURING THE SYSTEM

Customizing the system is the very first step that one will take when they plan to use workflow. There are default values for most of the steps but one would prefer to always go back and fine tune the system. 4.1 Automatic Workflow Customizing

Workflow Consultants usually get a thrill out of visiting a system that has not yet been set up for a workflow. Such systems are recognized by calling up Workflow Customizing (transaction SWU3) or and seeing row after row of red crosses, signifying customizing activities that have not yet been performed.

Figure: 4.1.Automatic Workflow Customizing [WFS] Pressing the single button Perform Auto-Customizing ( ), a few seconds later the red

crosses in the run-time list will be transformed into green ticks as shown the fig 4.1 below. All systems go. Only those activities in the selected branch that currently have not

21

SAP Business Workflow

University of Applied Sciences, Heidelberg

been configured (red crosses) are executed automatically, in order to prevent overwriting previous customizing activities You can execute all activities manually with the Execute button ( ). In this way you

can check what the automatic customizing has customized and adjust it as necessary. All activities that one performs, either manually or as part of auto-customizing, are logged under the name of the user. These logs are stored in the database and are very useful when you are in a system where several independent workflow teams are at work, which is often the case. By viewing the logs you can avoid the typical tugs of war that take place when different teams tweak the settings independently. The logs are displayed in the bottom frame of the screen and can also be read from the database using the menu option Extras. Logs.

Automatic Customizing covers all the activities that concern the technical basic settings. The following standard settings are amongst those made: 4.1.1 Configuring a Client specific RFC Destination. If there is not one already, a user (including password) is created for the logical destination WORKFLOW_LOCAL_<client>. Specify a user that was created in the current client with the user type background and that has the authorization SAP_ALL. If this function is executed automatically, the user WF-BATCH is created. If it does not exist already, this user is assigned to your authorization profile. To facilitate error-free running of the workflow system, ensure that the user WF-BATCH is assigned the authorization SAP_ALL. 4.1.2 Scheduling background jobs You can plan this to run dynamically, every time a deadline is due instead of at regular intervals. However, this will lead to serious performance degradation in the whole system if many work items with deadlines must be monitored. 4.1.3 Setting an active plan version The active plan version is set to 01 if no active plan version has been maintained yet. Classifying SAP tasks and SAP workflows as general tasks

22

SAP Business Workflow

University of Applied Sciences, Heidelberg

The generic decision task (standard task for user decision) and other tasks that are used in the SAP workflows that are supplied are classified as "general tasks". Some SAP workflows can also be classified as general. 4.1.4 Maintaining a workflow system administrator If no workflow system administrator has been maintained yet, your user name (the current SY-UNAME) is entered as the system administrator. After automatic customizing, carry out the following tests.

4.2 Start Verification workflow Select Start verification workflow (

) to start a workflow that tests some of the basic

functions of the runtime system. Once you have triggered the workflow you will see a message that confirms that the workflow has been triggered viewing the long text of this message, you will see instructions about what to do next. x Go to the Business Workplace ( ). A work item will be visible there.

x Executing the work item you will be faced with a decision. Execute Immediately or Execute in one minute. x A mail message is will be visible for you that the first work item has been executed successfully and a second mail message confirming that the workflow has completed successfully. 4.3 Workflow Scenarios Many SAP applications use SAP Business Workflow enabling preconfigured workflow scenarios to be reused in various situations. The scenarios can either be implemented without any changes or configured for your business processes by making minor adjustments. These workflow scenarios reduce implementation time significantly and have been optimally configured for the respective application functions. Many workflow scenarios are integrated in IDES (International Demonstration and Education System). It is possible to simulate the business processes of a model company in this fully configured system.

23

SAP Business Workflow Purpose

University of Applied Sciences, Heidelberg

As far as possible in the technical and business sense, the workflow scenarios can be run directly without any modifications. However, there are always some settings which must be entered in your system and which cannot be supplied by SAP.

4.4 Use

Customizing for Tasks and Workflows

In this IMG activity you activate triggering events of tasks and workflows and assign possible agents to them. Integration This IMG activity enables you to set up centrally in the implementation phase all the tasks and workflows that you will use. However, you can also carry out the steps required individually within the relevant definitions. You only have to call the definition in display mode to carry out the activities described. You do not have to call the definition in change mode. Prerequisites You must know: Which of the tasks and workflows belong to workflow scenarios that you want to use and the application component to which these tasks and workflows are assigned. Features The Customizing of tasks and workflows involves the following activities: Activation of triggering events. If SAPs usage of the task or workflow includes starting with a triggering event, the type linkage is supplied inactive and you have to activate it if required. This is the only way to restrict the workflow functions to the areas in which you actually want to use them. Assignment of possible agents All tasks that are represented by dialog work items when they are executed must be assigned to their possible agents or be classified as general tasks. Whether a task is executed as a single step or as a step in a workflow is immaterial. All workflows that are to be started in dialog also have to be assigned to their possible agents. [PWAR]

24

SAP Business Workflow

University of Applied Sciences, Heidelberg

SAP BUSINESS WORKPLACE

The users who participate in SAP Business Workflow in their enterprise must have the Business Workplace. The sending of documents to and from the R/3 applications is also handled by the Business Workplace. Therefore, a direct link to the Business Workplace is provided in many applications. 5.1 Introduction

The Business Workplace provides a standard working environment in which every R/3 user can carry out their share of the business and communication processes in the enterprise. There, they receive all the work items that are assigned to them in the course of SAP Business Workflow and process the documents that were sent to them from people or from R/3 applications. Each user has a folder in which they can manage documents and work processes. Furthermore, each user can read information that has been published within their work group or throughout the company or make this information available themselves.

5.2

Features

Business Workplace are use to x Start workflows x Processing work items x Sending Data to Users Organizational Units and Business Objects (Internal Sending) x Sending Data (External Sending) via the Internet Fax, and R/3 to R/3 Systems. x Incoming documents can be distributed centrally or can trigger processing directly. x Administration documents User-specific private folders, public and group-specific shared folders are used x Organization of your own work processes in object folders x Attachments can be send to different users

25

SAP Business Workflow

University of Applied Sciences, Heidelberg

x In an Office organization it is used for Resubmissions, Substitutes Automatic replies, and Automatic forwarding. 5.3 Working with SAP Business Workplace. You can start workflows and edit work items as well as create, edit and send documents and messages in the Business Workplace. The following screens are available in the Business Workplace

WorkList

Overview Tree

WorkItem Preview

Figure:5.1. Preview Pane in the Business Workplace. [SD]

The following workflow functions are available under the Inbox node, which is under the initial node Workplace: Workflow Grouped according to task Grouped according to content

26

SAP Business Workflow

University of Applied Sciences, Heidelberg Grouped according to content type Grouped according to sort key

Overdue entries Deadline messages Incorrect entries The following functions are available under the Outbox node, which is under the initial node Workplace: Started workflows Work items executed by me Forwarded work items Workflow resubmissions 5.3.1 Worklist The wordlist is displayed in the upper right corner of the Business Workplace screen. Depending on whether you are in the workflow inbox, the workflow outbox or the workflow resubmissions, you have various functions available to you, which are described at the respective locations. 5.3.2 Work Item Preview In the lower right corner of the Business Workplace screen, the work items selected in the worklist are displayed in a preview. Not all the functions of the work item display or the workflow log are available. You can customize the work item preview by using a user exit. 5.4 Work Item Delivery Choosing the best work item delivery scheme for different users groups not only determines how easy it is for them to take part in the process, but also what ad hoc features they can use to enhance its efficiency. 5.4.1 Inbox Features x Before describing the inbox features, it is worth reminding the major difference between a work item and e-mail.

27

SAP Business Workflow

University of Applied Sciences, Heidelberg

x An email tells you what work needs to be done. A work item brings the work to you. If you want to remove e-mail from your inbox, you simply delete it. The only way for you to remove a work item from your inbox is to complete the work, or forward it to another agent. x From the modeling point of view, if a workflow sends an e-mail it immediately continues to the next step. However, if it generates a work item it will be held up until the work item completes. x The other difference is that an email is usually copied by the main system when it is sent to several addresses. When one addresses deletes their email, copies of the email remain in the other addresses inboxes However, although a work item can be assigned to several agents, as soon as one agent reserves or completes it, it automatically disappears when an alternative branch makes this step obsolete or the workflow is cancelled. 5.4.2 Work Item Text

The work item text is easy to set up and it can have a dramatic influence on the success of the process and on the amount of administration needed to cope with exceptional circumstances. Such circumstances are x New employee arrives. x Created Sales order with display of sales order number. x Employee absent without configuring a substitute. The work item text comes in two parts. Short Text- one line which should include variables. Task description several lines with sophisticated formatting and variables. Work Item Activity
Display SalesOrder Nr. &_WI_OBJECT_ID.NUMBER&, created at &_WI_OBJECT_ID.CREATEDATE&

Interface Container _WI_Object_Id.Number _WI_Object_Id.Createdate 28

SAP Business Workflow

University of Applied Sciences, Heidelberg

5.4.3 Work Item Functions The following list contains all possible functions that can be available for a work item.on the application tool bar. Depending on the workflow definition, work item type and status, only the functions that can be executed are displayed or a work item.

With this you can execute a work item that has either the status ready or the status in process. When a dialog work item is executed, the object method to which the task for this work item refers is executed. When a missed deadline work item is executed, the most important information is displayed via the monitored work item.

If a return value was returned to the workflow system when the work item is executed by the executing method, you can display it. With this you can forward the work item to other users.

With this you can resubmit the work item at a later date.

With this you change the priority of the work item. With this all the deadlines of the work item are displayed and you can change them. Display With this you can display the work item attachments. Create With this you can create a work item attachment. Reserve With this you can reserve a dialog work item with the status ready for processing. The usual recipient of the work item can thus no longer execute this work item. The status of the work item changes from ready to reserved. Replace With this you can make a work item that you have reserved for processing available to all recipients for processing again. All recipients can execute the work item again. The status of the work item changes from reserved back to ready.

29

SAP Business Workflow

University of Applied Sciences, Heidelberg

With this you can reject processing of a work item. For more information, see reject execution. Mail With this you send a mail to a user. Log You use this function to go to the view of the relevant workflow log. Graphic You use this function to go to the view of the relevant graphical workflow log. [SI]

30

SAP Business Workflow

University of Applied Sciences, Heidelberg

AGENTS AND ORGANISATIONAL STRUCTURE

Delivering the work-items to the correct agents or persons is one half of the task in real time business. Having a strategy to keep this working, despite organizational changes and personal fluctuation is the other half.

So every work item must be processed by either: x The Workflow/Web flow Engine i.e by using the system user ID WF-BATCH or x An Agent. Agents are the people who perform the work in the workflow. They do the work that cannot be done automatically by the Work Flow Engine. Hence agents are the decision makers in every business process. Once the business issues have been resolved, one needs to decide how much configuration and /or development needs to be done to determine the agents.

6.1

Understanding Agent Assignment

The main function of any agent is to complete the work items that are sent to their workflow inbox by the workflow as quickly and accurately as possible .In-fact a lot of care must be given to ensure that the correct agents receive the work items. For each and every work item several groups of agents may need to be considered by the Work Flow Engine in order to select the correct agents. When designing, implementing and maintaining a workflow and related data, you need to understand how the workflow views these different groups of agents if you are to ensure that the workflow comes to the correct decision. The groups of agents include: x Possible Agents: Those who are allowed to do the work. x Responsible Agents: Those who do the work in a particular case. x Excluded Agents: Those who should not do the work in a particular case.

31

SAP Business Workflow

University of Applied Sciences, Heidelberg

These three groups can overlap and intersect for each work item, as shown the fig 6.1.The recipients can only be determined correctly by evaluating all three agents.

Possible Agents

Excluded Agents

Recipients

Responsible Agents

Figure 6.1: Recipients of a Dialog Work Item of a Workflow. [PWAR]

Recipients who are also know as selected agents actually receive work items in their workflow inbox automatically. i.e they are the initial recipients .If they are permitted to do so, they can opt to forward work to other possible agents.. Finally the person who has actually executed and completed the work is know as the actual agent.

Possible Agents.  People who are allowed executing work items based on a particular underlying task.  Always assigned to a task on which many work items may be based, not to the work item itself.  Making someone a possible agent of a task does not automatically give them access to any data or routine (e.g transaction or report) called by a task. Responsible Agents.  People who want to execute a particular work item.

32

SAP Business Workflow

University of Applied Sciences, Heidelberg

 Usually assigned at the workflow step level.  They can also be assign at the task level via the default agent determination rule option in the task definition. Example difference b/w Possible and Responsible agents. Possible Agents- All managers in a particular area for all groups of items approves the sales order report to the Sales Clerk. Responsible Agents: A particular manager for a particular set of item is responsible for approving the sales order report to the Sales Clerk. x Excluded Agents.  People that you do not want to execute a particular work item a particular work item, even though they are a possible or responsible agent.  They are also useful for segregating duties within business processes.  Excluded agents are always assigned by an expression to the workflow step.  Excluded agents does not have to be a possible or responsible agent. x Recipients.  People who automatically receive a work item in their inbox when the work item is created .  They are the possible agents of the task  Restricted to the list of responsible agents for the work item  Recipients can forward work items to other agents if allowed. x Actual Agents.  User who is currently processing the work item.  User who last processed the work item.  Decision maker in the company. x Deadline and Notification Agents.  Dead line Agents  People who receive escalation work items when a deadline has been exceeded.

33

SAP Business Workflow

University of Applied Sciences, Heidelberg

 Usually entered on the relevant deadline tab(latest start,requested end or lasted end)of the workflow step.  Receive deadline work items, which consist of a reminder to escalate a task and a Done It button.  Notification Agents  People who are notified via an email when a work item has been completed.  Usually entered on the notification tab of the workflow step.

You can also make a task with the attribute general task instead of assigning specific possible agents. A general task effectively has no security over it. That is , any one can execute the task. When displaying a task via menu option Additional Data.Agent Assignment. Maintain (transaction PFTC_DIS)The attributes of the task general task can be assigned here. In order to know whether the work item can be forwarded or not is determined by the attributes of the underlying task. Relevant options are:

General Task Work Items can be forwarded to any user and executed by any user. General forwarding Work items only can be forward to any user. No general forwarding Work items can only be forwarded to possible users No forwarding Forwarding not allowed. [PWAR]

6.2 Agent Assignment using the Organizational Structure As you know every workflow agent must have a user ID. So when you are assigning agents to a work item, whether via possible agents, responsible agents or excluded agents, its is essential to assign user ID.

34

SAP Business Workflow

University of Applied Sciences, Heidelberg

Assigning user ids directly is very maintenance intensive. Some times people join, change positions and roles, transfer between departments and leave organizations continuously. Keeping up with the current agent assignment is very hard. Hence there are better ways to identify agents and they are the design of the organizational plan. 6.2.1 The Basic Organizational Plan The basic organization plan consists of different relationships, represented as a hierarchical organizational structure, between different organizational objects such as. Organizational Units Each unit represents a group of people such as a team, section, department, work area, laboratory, helpdesk, or shared services center. Jobs Each job describes a functional role within the organization. They equate to a job description. They may represent a full time or part-time role in your organization. Positions Each position represents a headcount placement, e.g. a physical desk or vacancy. Users Each user is the actual user ID of a person in your organization. Persons Are objects which hold the positions within the organizational structure. Most organizational objects and relationships have validity periods. By default the validity period is usually set to start on the date on which the organizational object or relationship is created and finish on 31st December 9999.Organizational objects and relationships are maintained via Organizational Management transactions such as PP0M (Organization and staffing) or PP0MW(Organization and staffing -Workflow View.)

35

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure: 6.2. Organizational Plan Maintenance .[WFS]

Common relationships between the different parts of the organizational plan include.  Organizational units can be hierarchically linked to other organizational units, giving you an organizational hierarchy, e.g. teams within sections within departments.  Each organizational unit may be linked to several positions where the positions represent employees belonging to the team, section, department etc.  A position may be linked to jobs, where the job describes what the person in the position does. One job may be linked to several positions, for example when several people perform similar activities.  A user may be linked to a position, where the user ID is that of the person currently holding the position. One user may hold several positions

36

SAP Business Workflow

University of Applied Sciences, Heidelberg

 Workflow tasks may be linked to one or more organizational units positions jobs or users. Hence by assigning a workflow task to a job you are specifying all of the users who are linked to all of the positions linked to that job as agents for that task. E.g. if manager is a job and approve leave request is a task, then assigning the task approve leave request to the job manager means all managers are able to approve leave requests. 6.2.2 Without an Organizational Plan Maintaining an organizational plan can be a burden, particularly if there is no specific section or department dedicated to its maintenance .The alternatives to using an organizational plan for possible agent assignment include:  Setting tasks as general tasks in the task attributes. This allows all users to execute work items based on the task. Remember however that this effectively means that there will be no security on your tasks.  Assigning task to security role assignment can be made via the usual task agent assignment (via transaction PFTC_DIS), menu path Additional Data Agent Assignment Maintain) or via the profile generator (PFCG).

37

SAP Business Workflow

University of Applied Sciences, Heidelberg

CREATING WORKFLOWS

A lot of time is involved in blueprinting the process and developing subsidiary reports and transactions, rather than developing workflows in the Workflow Builder, but nevertheless it is an important tool. Used effectively it offers features that can save weeks of development time and increase the effectiveness of the workflows.

7.1

Introduction

The Workflow Builder (transaction SWDD or Definition Tool Workflow Builder) is this is the main Business Workflow tool for creating, displaying and processing workflow definitions. Within the workflow builder one can create all components of a workflow, including all containers you need for getting the data from one step to another. You can test workflow definitions and generate operable versions. This chapter will describe the main features of the Workflow Builder, giving a good foundation from which to embark on your own development.

7.2

Features

In order to understand the main parts of a workflow it is better to start of with a simple description of them here.  Most workflows are started by an event; for example when data is entered or changed, when an email is arrived or when an error occurs which usually happens in the business application.  Data from this event needs to be passed to the workflow via a binding.  Each workflow has a number of workflow steps that execute the activities or control the workflow.  The workflow container is used to hold all the data needed by the workflow. Data may be passed from one step to another  The activities are handled within the tasks. The same task can be used in several steps of a workflow or even in the steps of several different workflows.

38

SAP Business Workflow

University of Applied Sciences, Heidelberg

 The task has a task container, which holds all the data necessary for that task. In order to pass data from the workflow container to the task container or vice versa you can define a binding as part of the workflow step  Every step has one or more possible outcomes depending on the step type and the underlying task.  Expressions are variables used in the workflow to control the workflow or to deliver a result e g the agent ID or the user for executing the step.  Every workflow has one end point. There are no hidden exit points.

7.3 7.3.1

The Work Flow Builder Feel of Workflow Builder

The workflow builder provides a graphical view of the workflow definition. Alternatively, you an view even the alphanumeric display, which provides a textual view of the workflow definition in a tree format. However most workflow users prefer the graphical view. The workflow Builder screen is divided into the following frames.

Information Overview

Navigation

Workflow Objects

Messages

Figure:7.1. Frames of the Workflow Builder. [WFS]

39

SAP Business Workflow

University of Applied Sciences, Heidelberg

Workflow Here you can insert new steps into the workflow definition and process existing ones. Double-clicking on a step calls the associated step definition. Overview The overview graphic is displayed here. The part of the workflow graphic displayed in the screen area Workflow is marked with a green rectangle. Changing the size or position of the rectangle changes the display in the screen area Workflow. Objects This area contains the following content  Insert able step types Displays all step types that you can use in the Workflow (only those steps types that are not hidden will be displayed. You can insert a new step by using Drag & Drop.  Workflow container All workflow container elements are displayed here. You can define new container elements and generate a where-used list. In the options in the Workflow Builder, you can choose not to display the workflow system elements here.  My workflows and tasks Tasks and workflows that are displayed can be inserted into your workflow definition as activities by double-clicking or by using Drag & Drop. The binding between the task container and the workflow container as well as the other container elements required is generated automatically by the workflow system as far as possible. You can also go directly to the relevant definition. You define which workflows and tasks are displayed yourself.  Document templates All the workflow's document templates that can be used in steps of the type document from template are displayed here. You can use a where-used list to determine the steps in which a document template is used.

40

SAP Business Workflow  Workflow Wizards

University of Applied Sciences, Heidelberg

All Workflow Wizards that you can use in the definition of your workflow are displayed here.  Team working Here you can search for steps by selected criteria. The result is displayed graphically in the workflow area and in the navigation area.  Workflows of this definition Your Workflow Outbox is displayed here, which displays all running workflows for this definition.  Note it! Here you can enter notes (for example, the ID of a frequently used task). The content of the tray is user-specific. If you save when you exit the transaction, the settings will be available to you when you next call the Workflow Builder. Navigation. The workflow steps are displayed here according to the workflow definition display. You can go directly to the relevant step definition from the list. You can edit the Workflow from the context menu. Messages. All messages and search results generated in where-used lists and workflow tests are displayed here. Clicking on a message takes you to the relevant step definition. Information. This displayed which workflow is loaded in which definition, the status of the respective workflow, and the version number of this workflow in the original system.

41

SAP Business Workflow

University of Applied Sciences, Heidelberg

7.3.2 Building the First Workflow In order for building a workflow you will have to call the workflow builder in the following ways. Choose Tools Business Workflow Development-- Definition tools-- Workflow Builder ---Workflow Builder. The simplest workflow to build is one containing a single user decision step. In this workflow, you will ask an agent a question and they will choose a response. To keep it simple, the user himself will be the agent. When the workflow builder is called for the first time or you opt to create a new workflow, a newly created initial workflow definition appears.

Figure: 7.2 Initial Presentation of Work Flow Definition [SI]


x

The start of the workflow definition is indicated by

Start workflow. If the new

workflow definition was called from the definition of a multi step task in which triggering events are defined, these are represented by the symbol description.
x x

and their

The end of the workflow definition is indicated by

Workflow terminated.

The area in which you can insert the new workflow definition is indicated by an undefined step with one outcome. Steps are represented by symbols. The name of an outcome is displayed with an arrow in the standard view.

42

SAP Business Workflow Testing Example

University of Applied Sciences, Heidelberg

In this example, you will be creating a workflow that asks an agent(user) whether they want to continue a process but responding Yes or No.  Open the Workflow Builder and choose New Step.(  In the step type area, choose the ( .)

) User decision step type by clicking on it.

 Click on the undefined step to drop the decision into place. The step definition of the user decision is now displayed.  Enter the title Do you want to continue?  Enter the Decision Texts Yes or No.  Set the agent to the expression Workflow Initiator or WF-User ides-wf 01 using the drop down help.  Complete the step by choosing the
. Transfer and to graphic button.

 Now a workflow is defined with a user decision step. However it has to be saved and activated before use.  Saving Activating and Testing.  When you choose the Save ) for a new workflow, an abbreviation and a name

for the workflow should be entered. Saving the workflow gives the status REVISED. The status in the title bar of the workflow builder is always visible.  Activate the workflow by choosing the Activate( .), which compiles the definition so that the workflow engine/web flow engine can interpret it.  Test the workflow by choosing the Test(  In the test environment choose the Execute(
 Execute the user decision. Choose Yes or No.

). ) to start the workflow.

7.3.3

Step Types and Their Symbols Symbol Step type Process control Runtime function The functions Cancel work item or Set work item to obsolete are applied to other work items of the current workflow.

43

SAP Business Workflow

University of Applied Sciences, Heidelberg

Ad hoc anchor

In the definition, you save workflows that can replace this step. At runtime, an authorized user can select one of the saved workflows. The ad-hoc anchor is then replaced by the steps of this workflow. Execution of a task or subworkflow One of two branches defined in the workflow definition is processed. The system makes the decision based on defined conditions. When doing this, this system takes account of information from the context of the workflow or the application objects processed. The process flow of the current workflow is controlled on the basis of a decision made by the current agent. A document is created from a document template. Elementary arithmetic operations or value assignments are applied to individual elements of the workflow container. An event is created. The data in a container element that refers to a structure can be displayed, processed, or approved as a form. The text entered in this step type is sent as e-mail. One of several branches defined in the workflow definition is

Activity Condition

User decision

Document from template Container operation

Event creator Form

Send mail

Multiple condition

44

SAP Business Workflow

University of Applied Sciences, Heidelberg

processed. To do this, the system checks the value of a container element in the workflow container.

Fork

The processing that follows takes place in a fork. You can define how many branches have to be executed for the fork to be successfully completed, or you define an end condition in the condition editor. No function at runtime. Undefined steps always have an outcome. A sequence of steps is processed repeatedly until the defined termination condition occurs. A sequence of steps is processed repeatedly as long as the defined comparisons apply. The system leaves the loop when the basis of comparison does not agree with any of the comparison values. The system waits for a specific event. The work item is only completed if the expected event occurs. The event can also be triggered by the occurrence of an XML document. The content of container elements is sent to a URL unchanged or in the form of a generated XML document. The step can wait for a reply. Communication with a process started by a Web activity is possible. A process started by an XML message can communicate with its caller.

Undefined step Loop (UNTIL)

Loop (WHILE)

Wait for event

Web activity

Table: 7.1. Step Types [SI]

45

SAP Business Workflow 7.3.4 Dead Line Monitoring

University of Applied Sciences, Heidelberg

The major advantage of the workflow is being able to monitor workflow steps according to a predefined schedule. You can monitor a number of different date/time deadlines against each workflow step: Requested Start, latest start, requested end and latest end. If a requested start deadline is active for a work item, then the work item only becomes visible to the recipients after the date/time specified. If a latest start, requested end or latest end deadline is active, then the workflow reacts to the deadline when the specified date/time is reached. 7.4 Creating a Task

In order to execute business functions, you have to use the business object type methods in the Activity steps. You are not directly referred to a method of a business object type in the definition of the step. Instead, you use a task that has the object method embedded within it.

Figure:7.3. Task Definition [WFS]

46

SAP Business Workflow

University of Applied Sciences, Heidelberg

Features  When a workflow is executed and the activity step is reached, a work item is created based on the task definition and the current runtime values.  Your task or an SAP-provided task can be re-used in any number of activities in different workflows. Note: user decision steps refer to generic decision task (TS00008267) as a standard.  Tasks can be created using the Create Task option from the activity step definition  Tasks can also be created using the transaction PFTC independent of the workflow builder.  The activity of the task is defined using an object type method of one of the object types from the Business Object Repository. Methods and objects that are in RELEASED status are used.)  The Basic data tab page is used to identify a task. Each task is identified by the object identifier TS (for Standard task) and an 8-digit number is automatically allocated by the system during creation.

Example  In this example you will be creating a new task to display a customer for a sales organization and add it to the workflow. Here we have to use the object type Customer (KNA1) since it is available in all the SAP components.  Add an activity step to your workflow.  Use the Create Task option to create a new task.  Enter appropriate texts for abbreviation, name work item text and description.  Enter the object type Customer (KNA1) and method DISPLAY. If you see a message Transfer missing elements from the object method? Answer Yes the system is helping you to set up the task container.  Save the task.  Set up the security of this task by going to menu Additional Data. .Agent Assignment Maintain.  Return to the workflow. The workflow will suggest a binding between the workflow and the task. Accept the binding by choosing Enter

47

SAP Business Workflow

University of Applied Sciences, Heidelberg

 Set up the agent of the activity step to the user ides-wf-01 using the drop down.  Test your workflow. You must enter an object instance of your business of your business object type into the container in the test tool using F4 input help. Here you enter the Customer ID and Customer Name. 7.5 Creating Container Elements

Prerequisites To create a new container element, select Editing container elements Double-click on the relevant table entry to edit a container element. Copying, cutting, or pasting container elements You select an element in a container by positioning the cursor on the relevant line and choosing . You can copy or cut selected container elements. If they are pasted in again, .

you must rename them.

Container elements have the following symbols in the Workflow Builder: Local container element Container element with import indicator set Container element with import and export indicators set Container element with export indicator set

48

SAP Business Workflow

University of Applied Sciences, Heidelberg

Creating Container Elements

Figure: 7.4: Creating a Container Element [WFS] Procedure  Enter the technical name of the container element into the field Element. You give each container element a technical name that can be used to identify it uniquely. The technical name must begin with a letter. This can be followed by letters, underscores or digits. It is not case-sensitive. The technical name you choose should be in English.  Under Texts maintain the name and the description. This text can include upper and lower cases.

49

SAP Business Workflow

University of Applied Sciences, Heidelberg

 According to the data type reference of the container element, make the following entries on the tab page Data type. First check whether your container element is modeled on one of the predefined types. Choose and double-click to select the

predefined type. The system carries out the necessary entries for the data type. If you want to create a container element that is not predefined, make the following entries, depending on the data type.  Structure or Table Choose ABAP Dictionary Reference, and enter the table or structure in the field Type name.  ABAP Dictionary field Choose ABAP Dictionary Reference, and enter the table or structure in the field Type name.  Object type Choose Object type, an object type category, and enter the name of the object type. Specification of an object type is not mandatory. If no object type is specified, the container element can be assigned a reference to an object of any type.  On the tab page Properties, select whether the new element is to be an import and/or an export element. Mark an import element as mandatory if applicable.  The values for each of the container elements may be in the form of a multi line list of field values or object references. This list is then saved under an element ID You can select multi line in the container definition so that this container element can hold a multi line list of values.
 If necessary, enter an initial value for an import element on the tab page Initial

value. To assign several values to a target element defined as multi line, create the additional input lines using
 Choose . .

50

SAP Business Workflow

University of Applied Sciences, Heidelberg

Result The container element is created, or its properties are adjusted. If you have defined initial value assignment, the system executes this at runtime. Containers and there Definition To describe which data a container can hold at runtime, of which type and under which ID, the container must first be defined. This container definition defines which container elements a container holds. You can define the following containers as required:  Workflow container  Method Container  Task container  Event container  Rule container. Usually containers are already defined. These containers hold standard container elements defined by the workflow system. These container elements will often be adequate for your requirements meaning that a more extensive container definition will not be necessary. Workflow Container Use In the definition of the workflow container, you process the container elements required for the workflow execution. This may be data that you require for controlling the workflow execution directly, or data that you want to forward from one step execution to another. Every workflow container already contains workflow system elements .

The system no longer evaluates activity-related container elements as of Release 4.6A. The IDs of the activity-related container elements begin with ACTIVITY_< Step Number >_ . You can assign initial values to container elements at the start of the workflow. You can carry out this initial value assignment in the Workflow Builder or in the definition of the multi step task.

51

SAP Business Workflow Integration

University of Applied Sciences, Heidelberg

You can process the workflow container both during definition of the multi step task and from the Workflow Builder.

Features Container elements for which the import or export indicator is set form the interface of the workflow. Definition of the data interface Both the import and the export indicators can be set for container elements. Container elements of the interface are not subject to the versioning of the workflow definition. Container elements with import indicator set  These container elements hold the values that can be passed when execution of the workflow is started. If the values have to be passed, set the indicator mandatory as well.  These container elements can be supplied with values in the following ways at the start of execution:  Using a binding from the event container if the workflow has one or more triggering events  By initial value assignment.  Using a SAP forms form if the workflow is started with it  Using a direct entry if the workflow is started with Test Workflow  Using direct entry if the workflow is started with start workflow and a start transaction or a form transaction is defined for the workflow  If the object to be processed is not created in the workflow, a container element with import indicator set must be defined in the workflow container, which holds the object reference. You create this container element with a data type reference to the relevant object type.

52

SAP Business Workflow

University of Applied Sciences, Heidelberg

Container elements with export indicator set These container elements hold the values, which the workflow is to return to a calling workflow. You need them if the workflow is a sub workflow of a super ordinate workflow and is to return data to its super ordinate workflow.

Definition of local container elements All container elements for which neither the import nor the export indicator is set are local container elements of the workflow definition. They are only valid in this workflow definition. Typical applications are:  Passing data from one task container to another  Determining the responsible agents for a step dynamically  Setting deadlines dynamically  Implementing counting loops  All local container elements are subject to the versioning of the workflow definition. If you create a local container element in the Workflow Builder, it is only included into the workflow definition currently being processed. If you create it in the definition of the multi step task, it is included into all versions existing at the time.

7.6 Use

Binding Definition

At definition time you create binding definitions for the workflow. This involves specifying the assignment rules for how data is exchanged between two containers. At runtime these binding definitions are executed making workflow execution possible. If a target container from a source container element is to be filled with a binding at runtime and if the source container element is initial or unavailable, then determine in the options of the binding instruction whether the binding changes the content of the target container element. You can also allocate values to container elements using initial value assignment at definition time.

53

SAP Business Workflow Application Example

University of Applied Sciences, Heidelberg

 Within the transaction for creating an accounting document (object type AccountingDocument), an event is generated (event created), which indicates that a document has been successfully created. This event is to be the triggering event of a workflow.  The event container is passed with this event. This container always contains an element _Evt_Object with a reference to the object created.  Workflow container  In the container of the workflow that is to be started by the event created of the object type AccountingDocument, you have created a mandatory import element (under the ID AccountingDocument for example) with a data type reference to the object type AccountingDocument. The element can therefore hold the reference to the object created (type AccountingDocument) at runtime.  Binding to workflow  The event parameter (= element in event container) _Evt_Object can be passed in a binding to the workflow container of the workflow that is to be started in response to the event. You define the following binding for this:  _Evt_Object (event container) AccountingDocument (workflow container)

Containers and there binding Containers are a common way of holding data throughout the workflow instances lifespan. Using them to interface data between different parts of a workflow and between the workflow and business applications.

54

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:7.5. Bindings between Different Containers. [SI] The fig above shows how the data flows among the different containers in a workflow as a workflow progresses. The bindings simply control which data is needed from the source container and how it is mapped to a target element in the target container.

The principal containers used in SAPs Web flow Engine are:  A workflow container for each workflow and sub-workflow.  Only the container elements classified as import can be filled when the workflow is started (e.g from an event container or the test transaction SWUS).  A task container for each task  Import container elements are filled from the workflow container and export container elements are transferred back.  A method container for each method.  Import container elements are filled from the task container and export container elements are transferred back.  An event container for each event  All events containers are export container elements only.  A rule container for each rule.

55

SAP Business Workflow

University of Applied Sciences, Heidelberg

The import container elements are filled form the workflow container or task container. The _RULE _RESULT element is the only export parameter and this is optional.

7.7

Linking workflow within or Between Systems

One of the ideal way to link workflows within a mySAP.com component is by using events. An event within a workflow is triggered by an event creator step to which another workflow responds E.g via triggering events. If you want to link workflows across system boundaries, you can use the Internet messaging functions. These include  Sending XML documents to other systems from a workflow.  Starting a workflow on another system  Reacting to the results of a workflow executing in another system  Starting a workflow when an appropriate message is received from another system.

56

SAP Business Workflow

University of Applied Sciences, Heidelberg

BUSINESS OBJECTS

Business Objects integrate the data and functions of business applications into your workflows. These enable SAPs Workflow Engine to communicate with business applications with all the flexibility and robustness required for a production environment.

Most workflows bring together related business applications into a cohesive business process. Business Objects are the main interface between SAPs Web flow Engine and business applications in SAP components. Here we discuss the interface and how workflows use it to influence business applications.

8.1

Basics of Business Objects

Business objects are used to model and further process objects occurring in a company in the SAP System. Certain processing options, for example, display, change or send, are available for each business object. Business objects give the workflow engine access to the data and functions in business applications. Business data can be used x In control steps including conditions, loops, container operations x In bindings which include event to a workflow, workflow to task, task to method and workflow to rule. x In texts like work item texts. x In start conditions used to determine which work flow will be started x Business functions used are x Methods in tasks x In agent determination rules. Business objects provide you with an object oriented view of business application. They organize the business data and business functions into reusable components that can be accessed throughout the Web flow Engine.

57

SAP Business Workflow 8.2 Business Objects in Workflow

University of Applied Sciences, Heidelberg

Re-usability Each piece of business data and each business functions defined are available for workflows. This is by using the attribute of the object. Encapsulation Each piece of business data and each business function is defined once and only once for the most relevant business object. E.g name of the customer is defined for the Customer object. Any workflow wanting to know the customer name accesses the Name attribute of the customer object. Inheritance SAP provides many business objects with data and functions already made accessible to the Web Flow Engine. If you need to extend these objects instead of starting from scratch, you can inherit the SAP-provided business objects to your own business.

Business Objects actually refer to either object type or the object instance Object type is the designing and implementation of the access to data and functions i.e it contains the program that reads or calculates data and business functions Eg. Customer object defines access to Customer ID name etc.

Object Instance is a single runtime copy of its object type that holds the data or accesses the functions relevant to that particular instance of the object Each business object has the following components. Key It defines each object instance uniquely Eg. Customer object type and the key is Customer ID. Attributes Attributes provide access to business data. This may be data extracted from the database or calculated values. Attributes may refer to single value or multiple value.

58

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:8.1. Components of Object Types.[WFS] Methods. Methods provide access to business functions. The inbuilt code can be based on any business functions including but not limited to, transactions, reports, programs, functional modules, BAPI s BDC. Events These transmit the status change of an object (e.g: Created, Changed).and provide the real hooks form business applications to influence the workflow Interfaces Interfaces are used to ensure consistency and to enable generic programming. For example many objects have a method for changing the object. The interface IFEDIT ensures that all change methods are called Edit regardless of whether the object being changed is Customer, Sales Order. Interfaces are combination of attributes, methods and events either with or without implementation. 8.3 Business Object Tools

There are two main business object tools that you can use to work with business objects  Business Object Builder  Business Object Repository Browser. 59

SAP Business Workflow Business Object Builder

University of Applied Sciences, Heidelberg

Choose Tools o Business Workflow o Development o Definition Tools o Business Object Builder. Or Transaction SWO1. This displays the Business Object Builder: Initial Screen as shown here

Figure:8.2. Initial Business Object Builder. [WFS] The Business Object Builder is used to display, test create, generate, change delete, delegate and change the status of business objects. Access In order to access a business object type in the Business object Builder, you use a technical ID.SAP provides search helps you find the technical ID from the object name or description or by using the business Object Repository. E.g: BUS2031 for Customer Quotation. Business Object Repository It can be access by Tools o Business Workflow o Development o Definition Tools o Business Object Repository. Or Transaction SWO3.

60

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:8.3.Business Object Repository with Business Object Hierarchy.[WFS]  mySAP Technology service and directory of all object types (business object types, organization object types and technical object types) in hierarchical order.  The object types are each assigned to a packet (and thus indirectly also to an application component).  Directory of all object types in hierarchical order.  The object types are each assigned a development class (and thus indirectly also to an application component).

61

SAP Business Workflow

University of Applied Sciences, Heidelberg

EVENTS

Events enable business applications in the SAP component to actively communicate with workflow, so that workflows can react to change outside of its immediate control.

9.1

Understanding Events

Event is a change in state of a business object instance. An event from a business application program notifies the Web Flow Engine of that change in status. For example if in the business scenario a customers master data is changed the application must raise an event Changed for business object Customer and passing the customer ID with the event to indicate which customer is changed. This event can be directed to the sales associate in-charge of the customer. In order to use an event as the interface between a business application and workflow you need the following: Event Definition This is a technical name formally defined as a part of the business object type. Any event parameters must be defined here. Event Creator The event creator is sometimes can be an application program or the event producer, event raiser, or event publisher. Event Receiver It is a generic term for whatever reacts to the event. This is usually the a workflow but it may also be a task or a wait for event step. Event Linkage This gives the relationship between the event and event receiver. Certain rules are determined whether or not the receiver should be notified, and what event data should be passed to receiver and how. Event linkages may be active or inactive. Only active linkages are evaluated at runtime. 9.2 Defining Events

In order to find the existing events the business Object Repository is used. Events can be raised from the Business Applications as long as the event creation is coded into the

62

SAP Business Workflow

University of Applied Sciences, Heidelberg

business application program. Usually the event is coded in such a way that you only need to configure what status changes should create events and which events you want to use.

How events are used in Workflows. Having the business application raise an event is the first. Your workflow will need to listen for each event, in the context of the business process, and carry out a response to it. Events are used to  Start a work flow or task(i.e a triggering event)  Stop a workflow or task, or complete a wait for step event(ie a terminating event)  Force the workflow to perform an action on itself. Triggering Events A event which is used to start a workflow is called as a triggering event When properly defined triggering event is raised, some other process begins. For every event raised, anew workflow instance of the workflow definition is launched, providing that the definition is linked to the event, as long as linkage is active and the start conditions are satisfied.

For instance in a business application called change customer details a new request customer details changed event is created the system should then start the Display changed customer.

You can define triggering events to your workflow in the Workflow builder using the Basic Data ,Version Independent tab within that Start events tab. As shown in the fig the event of the object here is CHANGED for the object type KNA1(Customer) To assign the triggering event to your workflow you must also define a binding between the event container and the workflow container to pass event information to the workflow.

63

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure: 9.1.Triggering Events to Start Work Flow [WFS] Linking workflows to triggering events. Initially event linkages are inactive. The workflow system in the form of the event manager evaluates all the events created. In doing this, the event manager carries out the following steps:

Figure: 9.2. Linking Workflows through Triggering Events[SI]

64

SAP Business Workflow

University of Applied Sciences, Heidelberg

The event manager checks all the active linkages and determines the linkages that are relevant for the event created. If a receiver type function module is entered, it is called to determine the receiver type. Linkages that are evaluated by Business Workflow must have the entry WORKITEM or EVENTITEM or a workflow/task ID as receiver type. If a check function module is entered it is called. If its execution terminates with an exception, the linkage is not executed. The receiver function module is called with the parameters event, receiver type and event container. If the event manager does not find any relevant linkages, the event has not effect. Events are not buffered so that they can be delivered at a later date. The linkage between the creator and the receiver can be activated and deactivated at definition time and even at runtime for a specific situation or customer using an indicator. For an overview of the type linkages that are defined, choose Tools o Business Workflow o Development o Administration o Event Manager o Type Linkages. Terminating Events When an event is used to stop a workflow a task or change in the behaviour of an already started workflow, it is called as an terminating event. The same event may be used as triggering event of the same or another workflow. When the event is created, if the event linkage is active and the linkage rules are satisfied, the status of the work item is set to COMPLETE and the next step is started. Events can be raised also by the following ways.  Change document  General Status  Message Control  Logistics Information System (LIS)  Human Resources Master data.  Business Transaction Events  Application Specific Configuration.

65

SAP Business Workflow

University of Applied Sciences, Heidelberg

Wizards are available for Changed documents LIS and Business Transaction Events 9.3 Event Container. Use The event container contains the event parameters as container elements. If you define triggering events or terminating events for a task, you can specify the binding from the event container to the task container. If you define triggering events for a workflow, you can specify the binding from the event container to the workflow container. You define a binding from the workflow container to the event container in the definition of an event creator. You define a binding from the event container to the workflow container in the definition of a wait step.

Features  The event container contains workflow system elements as standard. You can add more container elements to the event container within object type definition in the Business Object Builder. This is not usually necessary, however.  The event container can contain additional elements if the event was triggered by an inbound XML message. The data of this XML message is then sent to the event container.

66

SAP Business Workflow

University of Applied Sciences, Heidelberg

10 INTERNET AND BEYOND


A business process has to remain flexible so as to communicate over the Internet instead of internally with the SAP component. This technology is available at the heart of the SAP Web Flow Engine. Every business process stops at its software systems boundary. In order to remove this artificial boundary SAPs Workflow Engine supports different protocols for quick and robust integration with other components. Few of these are within the SAP components while some are completely independent of SAP. There are two principle interface types  Inside-Out Interface.  This interfaces that access other systems, allowing business methods to be called or attributes queried in systems outside SAP.  These are called from inside the SAP component to communicate with the outside world.  The inside out type of interface extends the range of your workflow, often reaching out over the Internet to systems belonging to business partners.  Collaborative scenarios and are best integrated with an open interface.  Wf-XML is just one such interface.  Outside-In Interface.  SAPs Web Flow Engine allows external systems to communicate with the process within the SAP component  It can be used to trigger process, query the data in the process or reset the status of the process, thereby freezing, restarting or canceling the SAP workflow.  Useful if you want your workflows to be triggered and controlled from another system.

67

SAP Business Workflow

University of Applied Sciences, Heidelberg

10.1 Web flow Function Purpose The Web Flow function makes it possible to execute workflows using the intranet and the Internet. The Web Flow functions make it possible to: x Send XML documents to other systems from a workflow x Start a workflow on another SAP System from your SAP System x React to the results of a workflow executed in another system x Start a workflow when an appropriate XML document is received

Prerequisites A Web server must be configured for the SAP System for the transmission and reception of the XML documents to be successful 10.2 Defining the Web Server Use You must define the Web server to enable your workflow to receive XML messages (for example, XML response documents). Prerequisites The SAP Web Application Server (SAP Web AS) must be installed as well to enable your SAP System to react to XML documents and XML response documents appropriately. Procedure
1. Choose Tools o Business Workflow o Development o Administration o Basic

SettingsoWeb Flow o Customizing Web server. 2. On the screen Customizing Web Server: Change, enter the address of your Web server and, if applicable, the port number. 3. Optionally, you can enter another service. As standard, the service is used when using the SAP Web AS.

68

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:10.1 .Customizing the Web Server[WFS]

If you want to test the Web Flow in your SAP System A and the starting of a Business Workflow in another SAP System B, you require the system architecture below:

69

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:10.2. Servers for Connectivity [SI] The SAP system B must access either a SAP Web AS or a SAP ITS. To check the prerequisites for the test, execute the following steps:  Check whether the release of the ITS installed on SAP System B is 4.6C or higher.  If necessary, check if the service WF_HANDLER is available on the SAP ITS of the SAP System B. The WORKFLOW_XML service must be available on the SAP Web AS.  The user used for the service logon must exist in the SAP System. x When a SAP ITS is involved, this user is defined in the global service directory for the SAP ITS or in the service WF_HANDLER. You can display the service in the Object Navigator (transaction SE80).
x

This user is defined in the basic data of the WORKFLOW_XML service for the SAP Web AS. You can display these by calling the Maintenance of Services (transaction SICF) and by choosing the default_host o sap o bc o workflow_xml entry there by double-clicking.

70

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:10.3. Maintenance of Services [WFS]  The user defined must be authorized to store documents in the Business Document Service (BDS).  The user defined in SAP System B must be one of the possible agents of the workflow to be started. Result The URL required in a Web activity is created with the Web server defined here, as soon as the indicator Wait for feedback is set.

10.3 WF-XML It is the brainchild of Keith Swenson, at the time of Netscape. He used the Simple Workflow Access Protocol (SWAP) initiative an envisaged simple protocol for allowing different workflow systems to communicate with each other over the Internet. The underlying motivation was that this open interface was intended for using in collaborative

71

SAP Business Workflow

University of Applied Sciences, Heidelberg

processes with other workflow systems from other vendors In fact a simple protocol was all that was needed to get the different systems synchronized with each other. Now presently the Work Flow Management Coalition (www.wfmc.org ) body of workflow customers are investing in the workflow technologies. WF-XML 1.0 is supported in our system SAPR/3 4.6 C. 10.3.1 Features  Wf-XML is tightly integrated into the workflow builder and the web flow engine.  Convenient way of creating cross-system workflows within an SAP environment.  Interface based on XML messaging between different workflows.  Messages are sent as HTTP-POST request because this is widely accepted way of exchanging messages over the Internet.

What an Wf-XML can do?  Trigger a workflow in another system by sending Wf-XML request CreateProcessInstance and wait until it returns result to your workflow  Trigger a workflow into another system by sending Wf-XML request CreateProcessInstance and continue immediately, ignoring the results that are returned. Eg. A notification step  Allow your workflow to be triggered by another system without the need to reply.(system receives a Wf-XML request CreateProcessInstance)  Allow your workflow to be triggered by another system, supplying the master workflow with results(send a Wf-XML request ProcessInstanceStateChanged )when you workflow finishes. 10.3.2 Configuring the System  Create a reference workflow with the correct container definition  Add a web activity step in the main workflow.  After selecting this step type double click on it enter a step name
 Set the URL to

http://f01.hcc.unimagdeburg.de:8001/sap/bc/workflow_xml/?~protocol=03&~localkey=WS99999999

72

SAP Business Workflow

University of Applied Sciences, Heidelberg

 Here the web server is f01.hcc.uni-magdeburg.de and the port is 8001.  Set the Transfer Format to Wf-XML 1.0 coding 3 with envelope s packs an object to type XML_DOC into the message with Wf-XML tags.  Set the function to Start Workflow.  Create binding within the step definition between your workflow and reference workflow.  Click of the Incoming WF-XML tab  Set the Agent to user ides-wf-01  Set the task as General Task This example is based on the following scenario. The Workflow WS00000000 runs in SAP System A, starts workflow WS99999999 in SAP System B and waits for feedback. The text test Web Flow is written into the import parameter Question for the workflow to be started. Once workflow WS99999999 is successfully executed, the export parameter

Figure:10.4. Wf-XML Documents Generated by SAP Systems [SI] The following XML documents are created by the system .
1. XML document to start workflow WS99999999 <?xmlversion="1.0"?> <WfMessageVersion="SAP.1.0"> <WfMessageHeader>

73

SAP Business Workflow

University of Applied Sciences, Heidelberg

<Request> <ResponseRequired>Yes</ResponseRequired> </Request> <Key>HTTP://f01.hcc.unimagdeburg.de:8001/SAP/BC/WORKFLOW_XML/?~protocol=03&~localkey=WS9 9999999</Key> <Operation>CreateProcessInstance</Operation> </WfMessageHeader> <WfMessageBody> <CreateProcessInstance> <Key>HTTP://www.xyz.com/SAP/BC/WORKFLOW_XML/?~protocol=03&~lo calkey=WS999999999</Key> <ObserverKey>http://www.abc.com/SAP/BC/WORKFLOW_XML/?~protoco l=01&~localkey=000000111669</ObserverKey> <ContextData> <QUESTION>testWebFlow</QUESTION> </ContextData> <StartImmediately>Yes</StartImmediately> </CreateProcessInstance> </WfMessageBody> </WfMessage 2. http reply as XML document when workflow is WS99999999 started <?xmlversion="1.0"?> <WfMessageVersion="SAP.1.0"> <WfMessageHeader> <Response/> <Key>HTTP://f01.hcc.unimagdeburg.de:8001/SAP/BC/WORKFLOW_XML/?~protocol=03&~localkey=WS9 9999999</Key> <Operation>CreateProcessInstance</Operation> </WfMessageHeader> <WfMessageBody> <CreateProcessInstance> <ProcessInstanceKey>000000112606</ProcessInstanceKey> </CreateProcessInstance> </WfMessageBody> </WfMessage>

10.4 SOAP (Simple Object Access Protocol) SOAP provides a simple and lightweight mechanism for exchanging structured and typed information between peers in a decentralized, distributed environment using XML. SOAP does not itself define any application semantics such as a programming model or implementation specific semantics; rather it defines a simple mechanism for expressing application semantics by providing a modular packaging model and encoding mechanisms for encoding data within modules. This allows SOAP to be used in a large

74

SAP Business Workflow

University of Applied Sciences, Heidelberg

variety of systems ranging from messaging systems to RPC (Remote Procedure Call)However future release of SAPs Web flow Engine will provide SOAP support. 10.5 WSDL (Web Service Description Language) WSDL provides a formal language for defining Web Services so that they can be interpreted automatically. This is useful because it allows a WSDL file to be imported directly into the SAPs Web Flow Engine Web Service Cache. There are some limitations in the 6.20 implementation, such as the fact that only the HTTP binding is supported and that complex data types are not supported. This is a significant step in making Web Services easier to deploy in SAPs Web Flow Engine. 10.6 Business Document Navigator Purpose The Business Document Navigator (BDN) is the central tool for processing documents. You can use the BDN to execute standard document management functions on documents managed, for example, by SAP Archive Link. To go to the Business Document Navigator, choose Office o Business Documents o Documents o Find. Alternatively, choose Tools o Business Documents, Environment o Business Documents in the administration menu for business documents.

Figure:10.5. Business Document Navigator Graphic Screen [SI]

75

SAP Business Workflow

University of Applied Sciences, Heidelberg

 In the upper part of the screen, the relevant documents, sorted by document type (the document types in turn belong to specified application objects) are displayed in the tree.  The lower left part of the screen contains tab pages with the functions Detailed display, Document information (version string), Keywords and Storing.  On the right-hand side of the screen, you can display a selected document inplace.

76

SAP Business Workflow

University of Applied Sciences, Heidelberg

11 WORKFLOW IMPLEMENTATION IN SD MODULE


The implementation of Workflow on Sales and Distribution Module has found a new edge to business prospects for the companies today. This automation tool has made the distribution of goods faster, easier and reliable. 11.1 Sales and Distribution Module. 11.1.1 Overview Sales processing is based on the following basic structures:
x

Every company is structured in a certain way. In order to work with the SAP System your company structure has to be represented in the system. This is done with the help of various organizational structures.

x

In sales and distribution, products are sold or sent to business partners or services are performed for them. Data about the products and services as well as about the business partners is the basis for sales processing. Sales processing with the SAP R/3 System requires that the master data has been stored in the system. In addition to sales and distribution, other departments of the company such as accounting or materials management access the master data. The material master data is stored in a specific structure in order to allow access from these different views.

x

The processing of business transactions in sales and distribution is based on the master data. In the SAP R/3 System, business transaction are stored in the form of documents. These sales and distribution documents are structured according to certain criteria so that all necessary information in the document is stored in a systematic way.

77

SAP Business Workflow 11.1.2 Organizational Structures

University of Applied Sciences, Heidelberg

Use In the SAP R/3 System you can use several structures to represent the legal and organizational structure of your company. You can structure from the point of view of accounting, materials management, and sales and distribution. It is possible to combine these structures. The organizational structures form a framework in which all business transactions can be processed. 11.1.3 Customers and Business Partners A company deals with different natural and legal persons during business transactions: A customer orders goods from your company. A forwarding agent might deliver goods to the customer. An employee within the company processes the business transactions. Business partners in the SAP R/3 System represent all roles a natural or legal person can assume. Business partners A company has contact with its business partners, who are customers and vendors. Data on each of these and on the company's personnel is stored in a separate master record. Customers The term "customer" is used to define all customers to whom the company has contact. The term "vendor" is used to define all business partners who carry out a delivery or a service for the company. A business partner can be a customer and a vendor at the same time if, for example, your customer also supplies goods to you. In this case, both a customer master record and a vendor master record must be created for the business partner. You can create a link between the master records by entering the vendor number in the customer master record and the customer number in the vendor master record. Vendors Data on business partners who are vendors, for example, forwarding agents, is managed in the vendor master record. If a vendor is also a customer, a link can be created. Personnel Data on employees of your own company, for example, sales personnel or clerical staff, is managed in the personnel master record.

78

SAP Business Workflow

University of Applied Sciences, Heidelberg

His or her personnel number can manage data on each employee. Only the personnel department of your company is authorized to create a personnel master record, using Human Resources (HR). The personnel department of your company manages the personnel numbers of the employees. If HR is not used in your company, you can create a personnel master record yourself for employees in sales and distribution. Document Master Data Business transactions are stored in the form of documents. These SD documents are structured in such a way that all the necessary information is stored in a systematic way. [SI] 11.2 Creating a Sales Order  Create a sales order Transaction (VA01)  Select the menu path Logistics Sales & Distribution Sales

From the Sales menu select Order Create

Figure:11.1 Sales Order Initial Screen[WFS]  Enter the Order Type (AA) Promotion Order  Enter the Sales Organizational data, Distributed Channel Division Sales Office and Sales Group. And Click on Sales Button.  A new window Create Promotion Order overview is opened 79

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure 11.2 Creating a Sales Order [WFS] Enter the following data Sold-to party Enter the customer number PO number Enter the customer's purchase order. Any combination of numeric and alpha characters can be used. If it is not filled in, a warning will be issued Enter the number of the required material Enter the quantity Amend the standard description if required Enter PR00 (if there is any pricing error displayed) and the price of each quantity.

Material Order quantity Description Item condition

Table: 11.1. Required Data to Create a Sales Order. Save the created sales order by clicking of the Save button. In order to change the Sales order transaction VA02.or Select the menu path Logistics Sales&Distribution-Sales From the Sales menu select Order Change.

80

SAP Business Workflow

University of Applied Sciences, Heidelberg

11.3 Linking the Workflow to the SD Module A workflow is built such that the SD application is visible to the respective persons in the organizational unit when sales order is created or changed. The link between the workflow and the Sales order (Object type BUS2032) application is established by the two events CREATED and CHANGED.

Design Screens. In the workflow builder a Step by step workflow was built to display the sales order when a sales order was created of changed.

Figure 11.3 Workflow containing events. [WFS] The events CHANGED and CREATED for the Sales Order was embedded with conditions that the work item should be created only when the net value of the created Sales order is >=1,000Euros.

81

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:11.4. Triggering Events Used [WFS] With this above condition when a sales order is created or changed a work item will be displayed in the Business Workplace Inbox Workflows of the user IDES-WF-01.

Figure:11.5..Work Item Display of Sales Order [WFS] Double Clicking on the work item and confirming a yes will display the created Sales order as show below:

82

SAP Business Workflow

University of Applied Sciences, Heidelberg

Figure:11.6. Sales Order in Display Mode. [WFS] 11.4 Implementation of WF-XML in SD Application. A customer for a sales organization is created using the Selection menu path Logistics Sales and DistributionMaster DataBusiness Partner --Customer Select-Create. In a similar procedure the customer details can be changed by selecting the Change. Option.

Figure:11.7 Initial Customer Data.[WFS]

83

SAP Business Workflow

University of Applied Sciences, Heidelberg

A workflow was built using the web activity step. Workflow WS97800082 was the initial workflow. A reference workflow WS97800083 was created and the URL for the expression http://f01.hcc.unimagdeburg.de:8001/sap/bc/workflow_xml/?~protocol=03&~localkey=WS97800083. Initial Workflow Reference Workflow

Figure 11.8. Design of Initial and Reference Workflow [WFS] When the Customer Details are changed the Event CHANGED is triggered and the users business workplace consists of a work item to execute. The HTTP request and response can be viewed selecting Business Workflow DevelopmentReportingWeb flowXML Document Selection.

Figure:11.9 Selection Report for XML Documents.[WFS] 84

SAP Business Workflow

University of Applied Sciences, Heidelberg

The workflow step triggers a workflow (reference workflow) in a different system (here a different user IDES_WF-02 will have 4 different XML messages associated with it. A Remote item contact takes place.  A CreateProcessInstance.Request (sent request transmitted by initial workflow).  A CreateProcessInstance.Request(received response received by reference workflow). In Flowitem the flow of data takes place between the two systems.  A CreateProcessInstance request( received by initial workflow).  A CreateProcessInstance response(sent by reference workflow). The XML data can be viewed by double clicking requests or responses above which lead to the Business Document Navigator.

Figure:11.10 Wf-XML Messages Assigned to a Work Item [WFS] The xml data
1. XML document to start workflow WS97800083 <?xml version="1.0" ?> <WfMessageVersion="1.0" xmlns="http://www.wfmc.org/standards/docs/Wf-XML"> <WfMessageHeader> <Request ResponseRequired="Yes" />

85

SAP Business Workflow

University of Applied Sciences, Heidelberg

<Key>http://f01.hcc.unimagdeburg.de:8001/sap/bc/workflow_xml/?~protocol= 03&~localkey=WS97800083</Key> </WfMessageHeader> <WfMessageBody> <CreateProcessInstance.Request StartImmediately="true"> <ObserverKey /> <ContextData> <KNA1> <INSTID>A7005</INSTID> <TYPEID>KNA1</TYPEID> <CATID>BO</CATID> </KNA1> <RETURN /> </ContextData> </CreateProcessInstance.Request> </WfMessageBody> </WfMessage> 2.http reply as XML document when workflow is WS97800083 started <?xml version="1.0" ?> <WfMessageVersion="1.0" xmlns="http://www.wfmc.org/standards/docs/Wf-XML"> <WfMessageHeader> <Response /> <Key>http://f01.hcc.unimagdeburg.de:8001/sap/bc/workflow_xml/?~protocol= 03&~localkey=WS97800083</Key> </WfMessageHeader> <WfMessageBody> <CreateProcessInstance.Response> <ProcessInstanceKey /> </CreateProcessInstance.Response> </WfMessageBody> </WfMessage>

86

SAP Business Workflow

University of Applied Sciences, Heidelberg

Conclusion
My thesis research has led to the conclusion that the integration of workflow concepts and ERP concepts can have a great synergistic effect. The workflow part, which is responsible for the definition, execution and management of business processes ,in the Sales and Distribution area is able to use all kinds of SAP related services and real time business scenarios. The ERP-application on the other hand is built from components like business objects and services. It relies on the workflow part to link these components together. Further, todays technology towards workflows is growing towards implementing them in the Radio Frequency Identification (RFID) business processes. This approach and implementation gives much more flexibility and reliability towards faster business transactions and better economic growth all over the world.

87

SAP Business Workflow

University of Applied Sciences, Heidelberg

Declaration
HEREBY, I INSURE TO HAVE MADE THE AVAILABLE PROJECT WORK, 1. WITHOUT ASSISTANCE OF THIRD AND ONLY WITH THE INDICATED SOURCES AND AIDS 2. ALL PLACES WHICH WERE INFERRED FROM THE SOURCES WERE MARKED AS SUCH 3. THIS WORK IS NOT BEEN CONCURRENTLY SUBMITTED IN CANDIDATURE FOR ANY OTHER DEGREE.

............................................... YOGESH SRINIVASA Heidelberg, 23TH Oct 04.

88

SAP Business Workflow

University of Applied Sciences, Heidelberg

References
[SI] SAP Internal( help.sap.com) [PWAR] Practical Work Flow for SAP by Alan Rickayzen, Jocelyn Dart, Carsten,Brennecke, Markus Schneider. [WFS] SAP Workflow System client :901 user :ides-wf-01. [WFN] Workflow Notes Designed by Prof .Dr. Herbert Schuster. [GITN] Georgia Institute of Technology online notes Introduction to SAP Business Workflow. [OD] Own Design

[]

[]

89

SAP Business Workflow

University of Applied Sciences, Heidelberg

List of Figures
Figure: 2.1. Swim Lane Diagram of a Process Figure: 2.2. Process Flow Diagram Figure: 3.1. Basic Concept of Workflow Management System Figure: 3.2. Basic Architecture of a Workflow Figure: 3.3. EPC Model Diagram Figure: 3.4. Technical Diagram of SAP Business Workflow Figure: 3.5. Modular Structure of SAP Business Workflow with an Example Figure. 4.1. Automatic Workflow Customizing Figure: 5.1. Preview Pane in the Business Workplace Figure: 6.1. Recipients of a Dialog Work Item of a Workflow Figure: 6.2. Organizational Plan Maintenance Figure: 7.1. Frames of the Workflow Builder Figure: 7.2. Initial Presentation of Workflow Definition Figure: 7.3. Task Definition Figure: 7.4. Creating a Container Element Figure: 7.5. Binding between Different Containers Figure: 8.1. Components of Object Types Figure: 8.2. Initial Business Object Builder Figure: 8.3. Business Object Repository with Business Object Hierarchy Figure: 9.1. Triggering Events to Start Workflow Figure: 9.2. Linking Workflows through Triggering Events Figure: 10.1. Customizing the Web Server Figure: 10.2. Servers for Connectivity Figure: 10.3. Maintenance of Services Figure: 10.4. Wf-XML Documents Generated by SAP Systems Figure: 10.5. Business Document Navigator Graphic Screen Figure: 11.1. Sales Order Initial Screen Figure: 11.2. Creating a Sales Order Figure: 11.3. Workflow Containing Events Figure: 11.4. Triggering Events Used Figure: 11.5. Work Item Display of Sales Order Figure: 11.6. Sales Order in Display Mode Figure: 11.7. Initial Customer Data Figure: 11.8. Design of Initial and Reference Workflow Figure: 11.9. Selection Report for XML Documents Figure: 11.10. Wf-XML Messages Assigned to a Work Item 9 11 12 13 16 17 19 21 26 32 36 39 42 46 49 55 59 60 61 64 64 69 70 71 73 75 79 80 81 82 82 83 83 84 84 85

List of Tables
Table: 7.1 Step Types Table: 11.1.Required Data to Create Sales Order 44 80

------------------------------------------End Of Document------------------------------------------

90

You might also like