Hi Jerome
If I look at the data, everything is the same until you get to component number and activity.

So the Material number and plant are repeated, you find a BOM (single BOM), and then you are looping through finding components and updating the activity.
So therefore, your loop starts at the find component portion.

If, in fact, you are looping through multiple BOMs for each material/plant, and then multiple components of each BOM, then you would ADD the above loop to the script you have - creating a nested loop. If you have a nested loop, you can either use the same loop id column and choose another identifier, or add a loop id column. It might look something like this

Data looking something like this

HTH,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
------------------------------
Original Message:
Sent: 04-11-2022 11:01
From: Jerome gaden
Subject: CA02 modify component allocation
Hi Sigrid,
Sorry for inaccuracies
I believe these are your steps in CA02
- open bom : (yes)
- select component allocation : (yes, button as per screen shot attached)
- re-enter bom info : (yes, Bom header, plant, usage, Bom number, alternative Bom)
- find and select component (yes)
- new assignment - assign to activity (yes)
So one BOM, component allocation and multiple component assignment changes, i.e. loop through 4 & 5? Or is there more looping, i.e. multiple selections in component allocation AND multiple find and select components with new assignments?
Several Bom header will be to upload, meaning select all components 5,6 ore more depending of the structure of the Bom and to adress /assign new activity per each component selected, i have attached new template accordingly. Hope i'm more clear don't hesitate to ask me more, your expertise is kindly appreciate

Thanks in advance
------------------------------
Jerome gaden | [Logistic analyst]
Atlas Copco Power Tools Distribution N.V. | 330240802063
Original Message:
Sent: 04-11-2022 10:08
From: Sigrid Kok
Subject: CA02 modify component allocation
Hi Jerome
In order to help you with your multi-loop question, I need an answer to mine - copying here again.
I believe these are your steps in CA02
- open bom
- select component allocation
- re-enter bom info
- find and select component
- new assignment - assign to activity
So one BOM, component allocation and multiple component assignment changes, i.e. loop through 4 & 5? Or is there more looping, i.e. multiple selections in component allocation AND multiple find and select components with new assignments?
Please advise on the steps and where you might need to handle multiple.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
Original Message:
Sent: 04-11-2022 10:03
From: Jerome gaden
Subject: CA02 modify component allocation
Hello Sigrid,
Indeed, i have modified script and template accordingly but still get an error.
My loop seems not relevant and may be i need multi loop in that case but not sure to do that for this example
Your time and support is kindly appreciate
Regards
------------------------------
Jerome gaden | [Logistic analyst]
Atlas Copco Power Tools Distribution N.V. | 330240802063
Original Message:
Sent: 04-08-2022 17:25
From: Sigrid Kok
Subject: CA02 modify component allocation
Hi Jerome,
Your screen shots are helpful, but the question is, were are you doing more than 1 of something, i.e. what do we need to loop around?
I believe these are your steps in CA02
- open bom
- select component allocation
- re-enter bom info
- find and select component
- new assignment - assign to activity
So one BOM, component allocation and multiple component assignment changes, i.e. loop through 4 & 5? Or is there more looping, i.e. multiple selections in component allocation AND multiple find and select components with new assignments?
Right now I believe you have a loop around 2-5, if I'm not mistaken. So that's one pass through for everything.
One quick tip at the start, your Loop on the Expert mode tab is pointing to column L, but your Loop ID in Excel is in column A. You should update that

Please advise.
Sigrid
------------------------------
Sigrid Kok
PSE | Winshuttle NA
Original Message:
Sent: 04-08-2022 13:25
From: Jerome gaden
Subject: CA02 modify component allocation
Hello Te@m,
Need your lights in order to loop or multi loop with transaction CA02 to assign new allocation for several component in a Bill of Material
You will find attached the screen shot with sequence in sap , the Winshuttle script and the excel file targeted for upload
The question is how to proceed to place correctly the loop or multi loop in that case and have a working script to upload/assign new activity for several components of the Bill of Material
Thanks in advance for your attention and support
Kind regards
------------------------------
Jerome gaden | [Logistic analyst]
Atlas Copco Power Tools Distribution N.V. | 330240802063
------------------------------