Latest BOM from Agile DB

How do we get the latest BOM from Agile DB ?

Add Comment
3 Answer(s)
Best answer

Do you want ref-des as well??   The easy answer is to look for any record where CHANGE_OUT is zero, for a specific assembly :
select a.item_number,b.item_number, b.find_number,b.quantity,r.label from item a, bom b, refdesig r
 where b.item=(select id from item where item_number='<assembly number>’) and b.id=r.bom(+) and b.change_out=0;

 However, the above *will* include records for pending changes as well. So if you have a lot of pending changes, the above will not work (at least not well). It will also list multiple lines for BOM records that have multiple values in the ref-des, because those are stored separately instead of as a single string in the DB.
 To really do it correctly, you need to make sure that CHANGE_OUT is zero *and* that BOM.CHANGE_IN references the ID of a released change linked to the assembly. And in order to not have 1 ref-des per line instead of all together (where there are multiple values), you would have to do this as a PL*SQL procedure so that you could collect them together as a single string value. It can get quite interesting when you have 20-30 revisions for an assembly or several hundred ref-des values for a component.

Agile Angel Answered on June 8, 2015.
Add Comment

Thanks, how can we filter out the redlined BOMs with pending changes in the above query? Currently it gives us all the BOMs that has been added or removed and does not filter out the redlined ones.

Agile Angel Answered on June 9, 2015.
Add Comment

Try with the below query, it should fetch the latest released structure of the BOM

select a.item_number,b.item_number, b.find_number,b.quantity from item a, bom b
where b.item=a.id and a.item_number='<BOM  Number>’ and b.change_out=0 and b.flags not like ‘0000000%’;

Agile User Answered on June 11, 2015.

Hi… Why do you take flags value not like ‘0000000%’;

on June 12, 2018.

What would the query look like if I wanted to extract BOMs for all revisions of the parent item? E.g. if the Parent had 3 revisions (A,B,C) and the BOM changed from revision A to B to C… I’d like to extract the BOM for each of the Parent Revs.

on March 17, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.