Unit 4: Creating Events Flexibly

Use

You want a relationship between the Object Status Change (here: releasing a production order) and create a Follow-on Action (here: starting 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 Start of the navigation pathTools Next navigation step Businessw Next navigation step Workflow Next navigation step Development Next navigation step Definition Tools Next navigation step Events Next navigation step Event Creation Next navigation step Status ManagementEnd of the navigation path.

    The Event creation status management dialog box appears.

  2. Choose Customer Settings.

    The View "Display Events for Status/User Status": Initial Screen is displayed.

  3. Choose to switch to change mode.

  4. Choose New Entries.

  5. Enter the following data:

    • StatusOT: ORH

    • BusinessOT: Z ini _2005

    • Event: released1

  6. Choose .

  7. Select your entry and double-click on Status Restrictions to go to the associated view.

  8. Choose New Entries.

  9. Enter I0002 in the System Status field.

  10. Choose and exit status management.

Test the Event Creation

Test whether the events are created successfully.

  1. Check whether the event trace is activated. Choose Start of the navigation pathTools Next navigation step Business Workflow Next navigation step Development Next navigation step Utilities Next navigation step Events Next navigation step Event Trace Next navigation step Switch Event Trace On/OffEnd of the navigation path and switch on the event trace.

  2. Create a production order and release it. The procedure for this is described in Unit 1: Testing Existing Application Functions.

  3. Choose Start of the navigation pathTools Next navigation step Business Workflow Next navigation step Development Next navigation step Utilities Next navigation step Events Next navigation step Event Trace Next navigation step Create Event TraceEnd of the navigation path.

    The screen Display Event Trace is displayed.

  4. 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.