Procedure documentationCreating a Standard Task Locate this document in the navigation structure

 

To create a new standard task, you copy an existing task. The standard task 7947 "MATMAS_Error" is used as an example.

Procedure

In the SAP menu choose   Tools   SAP Business Workflow   Development  .

  1. To create a standard task, choose   Definition Tools   Tasks/Task Groups   Copy  .

  2. In the Task Type field, enter TS, and in the Task field, enter 7947. Then choose   Task   Copy  .

  3. In the Standard Task dialog box, enter the abbreviation (XAMPLE_Error) and name (XAMPLE input error) of your object in the Description group box, and select Copy.

  4. A Create Object Directory Entry dialog box appears; enter your package and choose Save.

  5. Note the number of the task you have created (99900000).

Editing the New Task
  1. Choose   Definition Tools   Tasks/Task Groups   Change  .

  2. Delete the triggering events:

    • Select Triggering Events.

    • Select the event inputErrorOccurred and choose   Edit   Delete Event   to delete it.

    • Choose Back.

  3. Delete the terminating events:

    • Select Terminating Events.

    • Select the event inputFinished and choose   Edit   Delete Event   to delete it.

    • Choose Back.

  4. Replace the application component HLA0006031 with the application component applicable for your inbound processing.

    Note Note

    This is used for documentation and for finding the tasks appropriate to a given application component.

    End of the note.
  5. Replace the object type IDOCMATMAS with your newly created object type (IDOCXAMPLE).

  6. Add the triggering event applicable to your object type:

    • Select Triggering Events.

    • Select Insert Event.

    • In the dialog box that appears, enter your object type (IDOCXAMPLE) and use F4 in the Event field to choose the event inputErrorOccurred.

    • Select Binding Definition.

    • Enter &_EVT_OBJECT& in the field _WI_Object_Id.

    • Enter &EXCEPTION& in the field Exception.

    • Save your entries.

    • Choose   Goto   Event Linkage   and then Activate.

    • Select Back twice.

  7. Add the terminating event applicable to your object type:

    • Select Terminating Events.

    • Select Insert Event.

    • In the dialog box that appears, enter your object type (IDOCXAMPLE) and use F4 in the Event field to choose the event inputFinished. Use F4 in the Element field and choose the element _WI_OBJECT_ID.

    • Choose Back.

      Note Note

      You do not need to maintain the binding definition for this event.

      End of the note.
  8. Save your changes:

    • Choose Save.

Checking the Settings

All the tasks should now be correctly copied. To be sure, check the following three settings:

  1. Check the binding to the object:

    • Select Binding OM.

    • &EXCEPTION& should be assigned to the field Exception.

    • Choose Back.

  2. Check the default role:

    • Choose Standard Roles.

    • The standard role for the agent should be 134. This ensures that the number of receivers is restricted using the inbound partner profile.

    • Select Binding Editor. &_WI_OBJECT_ID& should be assigned to the parameter IDocNumber.

    • Select Back twice.

  3. Check the work item text:

    • Select Work Item Text.

    • A dialog box appears containing the work item text, which should contain two entries:

      &_WI_Object_Id.ShortMessage&:

      This entry ensures that the first 50 characters in the work item text (which form the first 50 characters of the error short text) contain the IDoc's attribute "ShortMessage".

      &_WI_Object_Id.ApplicationObjectID&:

      This entry ensures that the remaining work item text (which is formed using the ID of the application object in the IDoc) contains the IDoc's attribute "ApplicationObjectID". In the case of MATMAS, this is the material number. The attribute is determined using the ALE link object.

    • Choose Back.

    Note Note

    An agent is assigned to a work item via Customizing for SAP Business Workflow. You can find these functions in transaction PPOMW (Change Organization and Staffing (WF)).

    End of the note.