Copyright 2024 - BV TallVision IT

The Business object builderĀ can be started with transaction SWO1 and shows a representation of the Business Object revealing all it's main components.

Let's consider the information provided by the BOR. Object Types and Objects Before you can include an Object Type in a workflow definition, you must define the Object Type in the BOR. The Object Type encapsulates a complete set of related data and operations as a unit.In our example, the absence form (FORMABSENC) is the Object Type under consideration. An Object, then, is an active instance of an Object Type. Table A shows examples of Object Types and their corresponding Objects.

Table A

Object Type Object
Material T7 nuts
Employee Mr. Black
Formabsenc Form no. 212

The Object Type consists of the following components:

  • Key fields:Because an Object is an instance of an Object Type, there must be some data that distinguishes a particular Object from a number of instantiated Objects. This is made possible via the definition of some key data for each Object. For example, an employee number forms part of the key data Object Type Employee. For our absence form, the form number is the key field.
  • Attributes:The attributes determine the characteristics of an Object. They’re used to devise conditions at the time of workflow writing. The attributes of an Object are determined at runtime and may be used to control the workflow.
  • Events: Events may initiate, stop, or continue the tasks of a workflow. They inform the entire SAP system about the change in status of a particular Object. Events may also be triggered upon errors or exceptional conditions. Typical examples of events are shown in Table B.

Table B

Object Type Events
Sales Order Created
Employee Hired
Formabsenc Approved, Rejected, Created
Employee Address Changed

The Workflow system has an event-linkage table that maintains a list of all events and their relevant programs. When an event occurs, the name of the corresponding program is read from this table and is executed.

  • Methods: Methods refer to the operations that can be performed on a particular Object. The tasks that you define within a workflow are actually the methods of a business object. They may either be Instance Dependent or Instance Independent. Instance Independent methods are also referred to as class methods or static methods. They don't require a specific instance of an Object Type (or a specific Object) to be called. Examples of such methods are shown in Table C.

Table C

Object Type Method
Sales Order Getlist
Employee Getlist

Instance Dependent methods may be called on a particular instance of an Object Type (see Table D).

Table D

Object Type Method
Formabsenc Approve
Sales Order Create, Change, Delete

SAP allows polymorphism in method calls. You can call methods of different Objects via the same method names and parameters. The result that is returned by a method is particularly important and can be used to control workflows.

In defining a workflow for an employee applying for leave, you would create a task that would call the method APPROVE of the Object Type FORMABSENC. However, the application may be rejected or approved. Two separate branches would be created out from the method APPROVE. Each branch would correspond to the two probable instances of the result.

Conclusion - In our leave application example, we formulated a workflow solution by expressing our scenario in terms of the relevant Object Type (FORMABSENC), its attributes (FORMNUMBER), its method (APPROVE), and its respective events (CREATE, APPROVE, and REJECT). Object orientation, the heart of SAP Business Workflow, allows you to think technically while trying to solve your business problems."