Work Flow Scenarios in Sales and Distirbution of SAP ABAP Part Four

Using Workflow to Change the Master

As well as selling office equipment, Miller Ltd also offer their customers an extensive maintenance service. Miller Ltd has signed several maintenance contracts with one of their customers.The same terms of payment are valid for all the maintenance contracts signed with that customer. These maintenance contracts are assigned to a master contract which contains all terms of payment.

The customer would like to change the terms of payment. The employee responsible at Miller Ltd, Ms. Connelly, changes the terms of payment in the master contract and the changes are automatically copied into all the assigned lower level contracts.

If an error occurs in the system to prevent the changes from being made, Ms. Connelly receives a work item in her integrated inbox for each of the lower level contracts that could not be changed. She can change the lower level contract directly from the inbox using the information displayed in another window about the changes made in the master contract.

If any of the lower level contracts that need to be changed are blocked by another employee, the system carries out the changes in the background. If the document remains blocked, Ms. Connelly receives a work item for that lower level contract in her integrated inbox. Starting the work item causes the system to try and change the lower level contract in the background. The work item stays in Ms. Connelly’s inbox until the changes could be made or an application error occurs. If an application error occurs, Ms. Connelly receives another work item in her integrated inbox that can only be processed online. Once the lower level contract has been changed, the
work item is completed and the document is unblocked.

The lower level contracts that have not yet been updated are blocked for manual processing until the workflow has finished successfully.

Object Types (SD-SLS-OA)

The interface between R/3 functions and the workflow system is created using object technology.

The following scenario explains how:

Master contracts: Object type BUS 2095
Customer contract (lower level contract): Object type BUS 2034
are processed.

Workflow Template (SD-SLS-OA)

The following two workflow templates are delivered in the standard system for changing master contacts:

Identification code: SD_KK_WF
Long text: Workflow for changing customer contracts
Identification: WS20000049
identification code: SD_GK_WF
Long text: Updates according to master contract
Workflow Template WS20000049

Triggering Event in Workflow Template

When you change the master contract, the changed event for object type BUS 2095 (master contract) is triggered and starts the workflow template. Workflow template WS20000048 starts for all the lower level contracts assigned to the master contract. Workflow template WS20000048 generates a work item for each lower level contract.

Workflow Container and Data Flow Information on object reference for the master contract to be processed (_EVT_OBJECT), the name of the person who changed the master contract (_EVT_CREATOR), a list of all the lower level contracts that should be changed (CONTRACTLIST), and the values that should be changed according to the referencing procedure (CHANGEDVALUES) must be available in the workflow.

This information is available as an event parameter in the container for the triggered event and has to be transferred into the workflow container using data flow.

The following data flow definitions between the triggering event and the workflow container have been defined in the standard system:


No comments :

Post a Comment