Unit 4: Flexible Event Creation 

Use

You want to establish a relationship between the status change of an object (here: release of a production order) and the subsequent reaction (here: start a workflow).

Before you define the workflow, you must make sure that an event is created if the status REL is set for the status object type ORH.

However, you must first ensure that an event is really created when the status REL is set for the object type ORH, that is, when the status change has taken effect on the object.

Prerequisites

You have defined the released1 event as an enhancement of the object type Z ini_2005 . This object type was, in turn, created as a sub-type of the SAP object type BUS2005 , as it is otherwise not possible to make changes to object types delivered by SAP.

This is the precondition for generating this event and using it as a triggering event.

Procedure

Event Creation During Status Change

The event released1 should be generated if the status REL is set.

  1. Choose Tools ® Business Workflow ® Development ® Definition Tools ® Event Creation ® Status Management.
  2. The Event creation status management dialog box appears.

  3. Choose Customer settings.
  4. The View "Display Events for Status/User Status": Initial Screen is displayed.

  5. Choose to switch to change mode.
  6. Choose New entries.
  7. Enter the following data:
  8. StatusOT: ORH

    BusinessOT: Zini_2005

    Event: released1

  9. Choose .
  10. Select your entry and double-click the Status restrictions node to go to the associated view.
  11. Choose New entries.
  12. Enter I0002 in the System status field.
  13. The entry I0002 is the internal representation of the status REL. You can also use the F4 possible entries pushbutton to select the status REL.

  14. Choose and exit status management.

Test the Event Creation

Test whether the events are created successfully.

  1. Check whether the event log is activated. Choose Tools ® Business Workflow ® Development ® Utilities ® Events ® Event Trace ® Switch Event Trace On/Off and switch on the event trace.
  2. Create a production order and release it. The relevant procedure is described in Unit 1: Testing the Existing Application Functionality.
  3. Choose Tools ® Business Workflow ® Development ® Utilities ® Events ® Event Trace ® Display Event Trace.
  4. The screen Display Event Trace is displayed.

  5. Restrict the selection by entering values in the Creation date and Creation time fields so that the event you created appears in the display.

The list contains the object type you created with the created event. No receiver is entered here.