Workflow objects model a workflow process. Workflow objects are also assigned a two−character ID to represent the object type. The following sections describe the various workflow objects used in an ALE/EDI process. The object type appears in parentheses wherever applicable.
Business Objects
Transaction: SWO1
Menu Path: From the Area menu of Workflow, choose Definition Tools, Business Object Builder
A business object represents a business entity that has a definite state and various properties. You can carry out various functions on the object. A business object encapsulates the entire functionality of an object. A business object is given a name in SAP. For instance, a standard material is assigned the name BUS1001006;
it has properties such as material number, description, and material type. These properties are represented using attributes of the business object. The various operations that can be carried out on an object are implemented with methods. For example, if you want to create a material, you can call that business object's Create method. An object also has different states. It exposes its various states by publishing events. For example, the material object has a created event that is published whenever a new material is created.
Several business objects are defined in the system and organized in the BOR (Business Object Repository).
Objects are implemented as a series of inherited objects, starting with a generic object and ending with a very specific object. The various objects designed for the ALE/EDI process are as follows.
IDOC. The IDOC object represents a generic IDoc. This object is not used directly in the process, but
•
PD Organizational Objects
IDOCAPPL. The IDOCAPPL object represents a generic application IDoc used in ALE and EDI. It is inherited from the IDOC object and acts as the main object from which application−specific objects are inherited. Most functions and attributes used in an IDoc are implemented in this object. Figure 9.4, the transaction SW01 display for this object, shows the various components of the IDOCAPPL.
Figure 9.4: The attributes, methods, and events in the application IDOC object (IDOCAPPL)
•
IDOC<message_type>. This object is derived from the IDOCAPPL object and represents an application−specific object. Although no additional functionality is added after inheriting the IDOCAPPL object, it is the application−specific object that is referenced in the configuration tables.
•
IDOCPACKET. This object represents a packet of IDocs.
•
IDPK<message type>. This object represents a packet of specific types of IDocs. For example, IDPKORDERS represents a packet of IDoc orders. The IDPKORDERS object is inherited from IDOCPACKET.
•
Each IDoc−related object has several attributes, methods, and events. When a work item is executed, it executes one of the methods encapsulated in the object.
Tasks (T or TS)
Transaction (Prior to version 4.6): PFTCTransactions (From version 4.6):
PFTC_INS (create), PFTC_CHG (change), PFTC_DIS (display), PFTC_DEL (delete) Menu Path (From Version 4.6): From the Area menu of Workflow, choose Definition Tools, Tasks/Task Groups.
A task defines a piece of work that can be executed and tracked in the system. Technically, a task points to a method of an object, as shown in Figure 9.5. In addition, a task defines the text describing the purpose of the task, the triggering event based on which the task is started, the terminating event that marks the completion of a task, and a role that contains the rules to identify the person who is responsible for executing the task. A task can be started in response to an event triggered in the system.
Workflow Objects
Figure 9.5: Standard task ORDERS_Error
Tasks are categorized as standard tasks (TS) or customer tasks (T). Standard tasks are provided by SAP and are client independent, and customer tasks are client dependent and developed by customers.
In the ALE/EDI process, tasks are mainly used for error handling. A task has been defined for every standard message and for each type of error in the process. The tasks for a message are named as <message
type>_Error. Table 9.1 shows the tasks for errors in the process.
Table 9.1: Error Tasks in the EDI Process
Process Code Task Number Description
EDIM TS30000020 No IDoc created yet.
EDII TS00008068 Error in the inbound process.
EDIY TS00008074 Syntax errorinbound.
EDIN TS70008037 Display NAST record with msg. No IDoc created yet.
EDIO TS00007989 Error in the outbound process.
EDIX TS00008070 Syntax erroroutbound.
EDIP TS60001307 Error in the outbound process (IDoc packet processing).
EDIL TS70008373 Error in the inbound status file.
EDIR TS70008125 Error in the subsystem, post−processing allowed.
EDIS TS30000078 Error in the subsystem.
Note Process codes EDIL, EDIN, EDIR, and EDIP were introduced in version 4.6. Also, prior to version 4.6, the task assigned to process code EDIM was TS00007988.
Customers can change the following attributes of a task.
Work item text
•
Triggering events
• Roles
Transaction (prior to version 4.6): PFAC
Transactions (from version 4.6): PFAC_INS (create), PFAC_CHG (change) PFAC_DIS
Workflow Objects
Menu Path: From the Area menu of Workflow, choose Definition Tools, Standard Roles.
Roles are workflow objects used to determine the person responsible for carrying out a specific task. Each task has a role assigned to it.
Roles for the ALE/EDI process are implemented as function modules in the system (see Figure 9.6). These function modules can read any information stored in the SAP system. SAP sets the interface for these function modules. The return parameters of this function module are the object type and object ID.
Figure 9.6: Standard role for ALE/EDI errors Work Items
A work item represents an instance of a task that needs to be executed. A work item has text describing its purpose (see Figure 9.7) and can have various states that govern the operations allowed. Table 9.2 describes the various states of a work item and its effect on usability.
Figure 9.7: A work item describing the cause of an error in the ALE/EDI process Table 9.2: Work Item States from Inception to Completion
Status Description
Ready A work item is created and is visible to all selected agents.
Reserved A work item has been reserved by a user and disappears from the Inbox of other selected users.
Workflow Objects
In Process A work item is being worked on and can be seen only in the Inbox of the user who started working on it.
Completed A work item is complete and cannot be seen in the Inbox of any user.
The SAP Inbox
Transaction (prior to version 4.6): SO01 Transaction (from version 4.6): SBWP
Menu Paths: From the SAP Easy Access menu, click on the Business Workplace icon. Or, from the SAP standard menu, choose Office, Workplace, and then expand the entry for Inbox. From the area menu for Workflow, choose Runtime Tools, Business Workplace
The SAP Inbox is an interface to manage workflow work items and SAP office documents. Figure 9.8 shows a list of work items in a user's Inbox. It can be compared with the Inbox of regular e−mail systems that you use at work. The SAP Inbox contains separate buckets for office documents and workflow items. Office
documents are the e−mail documents, and workflow items are work items. You can display and execute the work items from the Inbox. The Inbox interface is highly configurable.
Figure 9.8: A work list in the SAP Inbox
A detailed description of the SAP Inbox appears in Chapter 11, "Monitoring the Interface," as part of the discussion on monitoring tools.