I use cursors. I just set up for expected level of boms that we could possibly imagine using. We only go to a max of 6 levels down into the bom so I put in 8 cursor levels to just in case and put an error message if it finds something below 8 levels so I can add more someday.
I know Rbase does not support celko’s nested boms so I use cursors instead. Dan From: [email protected] Sent: Thursday, March 15, 2012 8:24 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Exploding BOM I think that's what it's called.... For the first time I need to worry about a BOM for updating inventory, although there will be very few parts. I'll have a separate tiny table as below. There is an "upper level" part, and a list of "component" parts. Each has a "multiplier" because if you sell 100 of the upper part, and the component has a multiplier of 2, then you need to reduce inventory by 200 of the lower. So a simple example is the following and I know how to do this part: Upper Level Component Multiplier Qty I would reduce based on sale of 100 pieces of part 100 100 200 1 100 100 201 1 100 100 202 2 200 The client said he has no "components of components", but told me to work it into the programming in case it ever happens. I can't think of a way to program to take care of unlimited levels, especially when taking into account the multiplier. In the above example, let's say that component 202 has subparts. The data would look like this: Upper Level Component Multiplier Qty I would reduce based on sale of 100 100 200 1 100 100 201 1 100 100 202 2 200 202 300 1 100 202 301 2 400 (because it's 2 * 200) Can I do this with a cursor, again taking into account that the levels could continue on? Anyone have code to share? Karen

