Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Defining index in Dynamic parallel processing of workflow

Former Member
0 Kudos
354

Hi all,

I am using dynamic parallel processing feature in workflow for a particular multi-line element. But I am not able to define the index in that particular task.

Consider that i have a multi-line element "Material". For this element, I need to loop that task for that n number of records. so i am using dynamic parallel processing. Now for each workitem generated, i need to show that particular material in the workitem. I remember that we need to use index, but i couldn't recollect how it is defined.

Could anyone help me in this regard?

Thanks in advance

1 REPLY 1

ramki_maley
Active Contributor
0 Kudos
96

Nikhil,

When you use dynamic parallel processing the index is available in <b>_Wf_ParForEach_Index</b>. A reference for the line of the multi line element is automatically generated for each work item created. You can see this in the Binding Editor for the step. In your case this will be "Material()". When you drag this element to the WF to Step binding window, it will be resolved as "&Material[&_Wf_ParForEach_Index&]&. Therefore you can get the material for each WI by defining "Material" in your task container (not as multiline) and doing the appropriate binding. If you in fact need the Index in your method, you can define a container element your task with reference to Type SWC_INDEX and bind to ]_Wf_ParForEach_Index.

Cheers,

Ramki Maley.

Please reward points if the answer is helpful.

For info on awarding points click on this link: https://www.sdn.sap.com/sdn/index.sdn?page=crp_help.htm