Hi, I'd like to re-build my BOM (parent - child) table (below) in following way:
- extract the finished product # of each BOM structure into separate column and
- omit purchased parts sub-structure explosion
The workflow (or macro) should basically set the child part with no parent part (NULL) as product, and then go down the tree exploding each level.
It shouldn't explode purchased parts though (I crossed them out with red line)
Of course this is just a sample from my dataset.

Here is my input and output data.
In the Output the macro should add first two columns.

Any help would be appreciated