Business workflow is a set or
sequence of logically related business operations. The processing
logic within a workflow detects events. The Business Workflow event
detection mechanism relies on the SAP Business Object Repository
(BOR), which contains the directory of objects along with their
related attributes, methods, and events.
To implement business workflow for event detection:
- Determine which business object represents the functionality
that you need. Check if the events trigger, start, or end a
workflow. You can use the Business Object Builder (transaction
SWO1) to search for the appropriate business object.
- Create a subtype of this business object. A subtype inherits
the properties of the supertype and can be customized for use.
- Activate the events (such as CREATED, CHANGED, and DELETED) for
the business object by customizing the subtype.
The following example of SAP sales quote can be used to
implement an event trigger using business workflow:
- Search the BOR for the appropriate sales quote business object.
A search can be done using the short description field and the
string '*quot*'. BUS2031 (Customer Quotes) is one of the business
objects returned.
- Upon further investigation of BUS2031, it is determined that
the key field is CustomerQuotation.SalesDocument (VBAK-VBELN).
- A subtype for BUS2031 is created using the following entries:
Object type--ZMYQUOTE
Event--SAP_SalesQuote
Name--SAP Sales Quote
Description--Example of an SAP Sales Quote Subtype
Program--ZMYSALESQUOTE
Application--V
- The event detection mechanism is activated by adding an entry
to the Event Linkage table (transaction SWE3). The create event is
activated using the following entries:
Object type--ZMYQUOTE
Event--SAP_SalesQuote
Receiver FM--Y_XR_ADD_TO_QUEUE_DUMMY
Receiver type FM--Y_XR_ADD_TO_QUEUE_WF
- Note:
- The Receiver and Receiver type function modules (FM) both point
to Y_XR_ADD_TO_QUEUE. The DUMMY function module
is used only because sometimes the SAP application requires that
both fields be populated. The WF function module
translates the SAP standard interface to the one used by
Y_XR_ADD_TO_QUEUE.
The business workflow event detection mechanism is created and
active. It is set up to detect all SAP Customer Quotes that are
created.
