Dynamic Parallel Processing
Dynamic Parallel Processing
You have defined a multiline container element in the workflow container, which
contains a list of values of the same type at runtime. The exact number of values is not
known at definition time. But for each value in the multiline container, one particular
function is to be executed as a step in the workflow.
Example 1: The materials connected with an order are stored in a multiline container
element in the workflow container. Stock is to be checked for each material.
Example 2 (Going to be discussed below): If the main Material in the BOM is changed,
then all the component materials under that BOM need to be edited/changed as per the
main Material. The No. of BOM Components in the material will be known only at
runtime.
2. A multiline container element is created with one data type reference and can therefore
only ever include a list of values that refer to the same data type reference.
3. You have entered the multiline container element from the workflow container on the
Miscellaneous Tab page at the Task/Workflow level.
In each of the steps created in parallel, one value from the multiline container
element is the current value. You can also define a binding from the relevant current
value of the multiline container element to a single-line container element in the task
container or the event container.
Limitations:
The multiline container element should have entries up to 99 values.
This document deals with event creation using
Table Driven Dynamic Parallel Processing
1. Applied to an Individual Task ( Dynamic Parallel Processing Can be
applied to the Sub workflow )
1. Table Driven Dynamic Parallel Processing Applied to an Individual Task
Scenario 1: If the main Material in the BOM is changed (restricted to Material group
change), then all the component materials under that BOM need to be edited/change as
per the main Material. The No. of BOM Components in the material will be known only
at runtime.
STEPS:
1. The business object BUS1001 is enhanced to ZBUS1001 incorporate the Event
“MaterialgroupChanged” as shown below.
C:\Documents and
Settings\Administrator\Desktop\components_BOM.doc
3. To raise an Event “MaterialgroupChanged” once the Material group is changed,
SWEC is configured for the business object as shown below.
1. Get BOM Components task, will execute the method ‘Components_BOM’ and
will return all the BOM components of type business Objects.
2. Edit BOM components is the Task to which Dynamic parallel processing applied.
This task will send as many workitems as the no of components to the user
Get BOM Components task:
Do the proper binding for task to the workflow as shown below
1. Adding a Multiline Entry in Miscellaneous Tab of the Edit BOM Component Task
as shown below
‘Components_BOM’ the multi line
container element is added
Miscellaneous Tab
2. The Binding should be in such a way that, The Task should execute for all the
records in the multi line container.
Click on the Binding of the task after adding the entry in Miscellaneous tab you
will notice an entry in binding screen as []Components.BOM(). Drag this entry
into the binding from workflow to task and map it to the Object of the task as
shown below.
The entry with Square
Brackets will appear
after adding the
Multiline container to
Misclleneous tab.
STEP 1: Create BOM in the Transaction CS01 that has more than one Component as
shown below.
See the main Material is 70. and the components for alternative BOM 1 is 68 and for
alternative BOM 2 are 68,69,71,72.
STEP 2: Change the Main Material Group i.e 70 in this example, the workflow will get
triggered and you will give as many workitems as the number of components in both
alternative BOMs
Change Material group in MM02 for the material 70 in our case as shown below.
Here the original value was 020 and changed to 010 and save the Material master.
STEP 3: Go to the inbox of the SAP Workflow initiator. You will now be able to see the
workitems as shown below. The Workitem are shown as Red because we have set the
priority of the workitems as high in the miscellaneous Tab.
Hence verified the Dynamic parallel Processing.