Skip to main content
1-Visitor
Jul 23, 2015 11:33 AM UTC
Question

SQL Query to find out BOM

Dear community,

I need to find out what database tables store the information about the bill of material of the products. Need to find out the top level nodes and all linked epm documents or parts.

What we try to do is get the files of all products so we can Export all products from windchill.

Any help is appreciated.

Thanks.

10 replies

1-Visitor
Jul 23, 2015 1:59 PM UTC

Stefan,

WTPart-to-WTPart Parent-Child links that build a WTPart BOM are stored in the WTPARTUSAGELINK table.

WTPart-to-EPMDocument owner links are stored in the EPMBUILDRULE table.

There are more tables needed to query if you're looking to pull EVERYTHING related to a specific WTPart or EPMDocument.  Let me know if there's any way I can help you with an extraction.

Translate
srohde1-VisitorAuthor
1-Visitor
Sep 9, 2015 12:47 PM UTC

In which columns are those 2 Parts stored? I can only see the IDA3A5 column which holds 1 Part Info. where is the Parent and the Child Part stored?

Translate
12-Amethyst
Sep 9, 2015 1:33 PM UTC

Hi Stefan,

IDA3A5 id the Object ID of parent IDA3B5 is object ID of child (PartMaster). If you want number you have lo include Part master in you query. Let me know if you need any info.

regards

Sudhakar

Translate
1-Visitor
Jul 27, 2016 8:55 AM UTC

Hi Stefan,

Try this query to get the BOM structure

SELECT    M1.WTPARTNUMBER AS COMPONENT, M2.WTPARTNUMBER AS ASSEMBLY

FROM      WTPART, WTPARTMASTER M2, WTPARTUSAGELINK, WTPARTMASTER M1

WHERE     WTPART.IDA3MASTERREFERENCE = M2.IDA2A2

                   AND WTPART.IDA2A2 = WTPARTUSAGELINK.IDA3A5

                   AND WTPARTUSAGELINK.IDA3B5 = M1.IDA2A2

                   and M2.WTPARTNUMBER = '<Part_number>'

GROUP BY  M2.WTPARTNUMBER, M1.WTPARTNUMBER

order by  M2.WTPARTNUMBER, M1.WTPARTNUMBER;

Translate
1-Visitor
Feb 16, 2021 8:15 PM UTC

How do we find the Specific version of a BOM. For example:

Part 1 Rev B.1  Child 1 Rev B.2

Part 1 Rev A.1   Child 1 Rev B.1

 

Thanks.

 

Translate