BOM baq

,

yeah, I believe you need to figure out the rev of the top level part then join PartMtl tabel on the top level part number and top level revision. Then you would add part mtl again to the first part mtl table and join it on the PartMtl.MtlPartNum = PartMtl2.PartNum and then you’d have to get the most current rev. at that point you’d be two levels down into the bom. Left outer join part mtl.

Yash, full disclosure, I am thinking out loud here and haven’t done this in a minute. Start playing with the partmtl table and you’ll see where you need to go.

1 Like

Could I directly link Part to OrderDtl and build the partmtl’s off of that?

Yes.

You will start to get duplicates in your top level query Yash so you just have to play around until you get the results you want. At that point you may want to think about using a subquery or a grouping…

~If you want to recursively traverse the BOM you may need a CTE query?~ - Kinetic 2021 - Epicor User Help Forum (epiusers.help)

yeah try that and see what you get.

And then I displayed the PartMtl1_MtlPartNum value, analyzed it, got 0 rows returned

try this, what did you get?

Query returned 0 rows

I don’t know what joins you have between the two part mtl tables.

are you sure they are correct?

Should all of the join types remain as matching?

Company to Company, MtlPartNum to MtlPartNum

company to company MtlPartNum to Partnum

Still getting 0 rows returned

If you only want rows that match the joins then yeah, otherwise you should do a left outer join.

okay, what is your join on part to part mtl?

Company to Company, PartNum to MtlPartNum

Partnum to PartNum Yash…

You should take a second and understand what the partmtl table is because it may help you in the future.

Ahh that one actually defaulted on its own

1 Like