batmush
24th April 2008, 22:26
Guys,

I'm trying to create a SQL query for Microsoft Access to calculate Summarized Explosion for the BOM (tibom010). Does anyone want to share the code?
I found the DB2 code for it but cannot convert DB2 to Access SQL.
See link: http://publib.boulder.ibm.com/infocenter/db2v7luw/index.jsp?topic=/com.ibm.db2v7.doc/db2s0/bomapp.htm

Thanks.

mark_h
25th April 2008, 15:53
Do not understand what you are doing - but can't you just put an exploded BOM report into access to play with? I actually put the exploded bom into another Baan table so the users can play with it thru Business Objects.

Darren Phillips
25th April 2008, 16:51
You should be able to use the attached to achieve what you want.

batmush
28th April 2008, 21:16
I need a recursive query for N levels (for example, 7) to find the top level "father" for every lowest level component. Seems like the DB2 code has N level capability but I need one for MS Access or MS SQL.

Thanks.

batmush
29th April 2008, 16:42
Is there a SQL code to find the bottom-top level relation for N levels BOMs?
For example, if I have 5 level BOMs stored in table tibom010, how do I find the top "father" for the lowest component in SQL.
I know that I can print the Multi-level BOM in BaaN but would like to use SQL or Access.

Thanks.

zardoz
29th April 2008, 17:00
The BOM is a tree structure. Means that this kind of structure can be explored only by means of a recursive algorithm (or the simulation of it, as done in BaaN, using a stack and pushing and pulling elements in it as the tree is read in depth).
I think that searching a SQL statement that can do this kind of work is like searching to squaring the circle.

batmush
29th April 2008, 17:46
If this can be done in DB2, then must be something in Access or SQL.
I did it in Crystal reports by replicating tibom010 8 times but it's very slow.

vahdani
29th April 2008, 18:15
Hi Batmush,

the most elegant way that I've ever seen for recursing a BOM in Baan was done by Chjagge in this historic posting (http://www.baanboard.com/baanboard/showthread.php?t=22850). Maybe, just maybe, one can do the same in Oracle's PLSQL or SQLServers TSQL or Access VBA.

batmush
29th April 2008, 18:24
I'm not familiar with the BaaN coding and looking for SQL code.

Thanks anyway.

en@frrom
19th May 2009, 14:31
Do not understand what you are doing - but can't you just put an exploded BOM report into access to play with? I actually put the exploded bom into another Baan table so the users can play with it thru Business Objects.
Hi Mark (and others),

I am building some customizations in Baan (Baan 5C) in which I need to fetch multi level BOM's for a list of manufactured items. I have to store each one of the BOM lines into a different table with some calculations on it.

If I understood your post well, you have the code for that. Would you care to share your code with me? Would be great!

Kind regards,
Eli