WORK FLOW SCENARIOS IN SD 4

Posted by Krishh Webworld | 11:31 PM | | 1 comments »

Using Workflow to Change the Master

Contract

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:WS20000048
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:
Workflow Container Event Parameter Container
GroupContract <-- _EVT_CREATOR
CustomerContracts <-- _EVT_OBJECT
ChangedValues <-- CONTRACTLIST
<-- CHANGEDVALUES

Terminating Events

Workflow template WS20000049 finishes if all the workflows have finished for the lower level contracts (event changed to object type BUS2034). Before this happens, task TS20000233 is triggered (workflow indicator is deleted from table VBAK).


Workflow Template WS20000048 (Change Contract)

Triggering Event

Workflow template WS2000049 triggers workflow template WS2000048 to change all lower level contracts. The workflow template contains the two standard tasks - TS20000140 (change contracts in background processing) and TS20000141 (change contract online).

Workflow Container and Data Flow

The workflow container receives the following information:

CustomerContract
ChangedValues
For the text display of the work item in the employee’s integrated inbox:
msgv4 (MessageVariable 4)
msgv3 (MessageVariable 3)
msgv2 (MessageVariable 2)
msgv1 (MessageVariable 1)
msgtext (short text with replaced variables)
msgno (MessageNo)
msgid (MessageId)
GroupContract

Terminating Events
There is a workflow for each lower level contract which finishes once the lower level contract has been changed (changed event for object type BUS2034).
The complete workflow finishes once all the lower level contracts have been changed.

Archives

Subscribe Now: Feed Icon