Renegade
7th February 2022, 16:12
Guys,
Am trying to do aggregation based on parent child relationship within the same table and updating. For example, there are 2 fields in every record indicating current order and parent order. I need to go bottom up until the BoM ends. Then pickup next record I get as I descend the index.
What is the correct approach to this. Querying through same table and updating is resulting in unpredictable results. Thanks

mark_h
7th February 2022, 22:46
What do you mean by aggregation? And why bottom up? Maybe a little more information around that would help someone provide a solution.

I always used the typical Baan bom explosion using some fields to track where you were in exploding the bom. I always had them give me the top item and then started working thru that bill of material exploding each level as a went. I never really aggregated anything because we could export the bill to excel and if they wanted to know how many of a buy part like a screw was used to make some end item, they could just filter and total.

Renegade
9th February 2022, 12:24
This is about Pegging Orders as found in cprrp040 and cprrp041 in LN; My solution involved using this information in my custom table where as I populate, I try to maintain parent order for every order/data found in cprrp041; Browsing bottom up to update and aggregate based on BoM(orders are as per BOM) nodes ending was a challenge. This is now fixed. Thanks for your reply, Mark.