This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Queries and BOM

cosmin - Friday, November 20, 2009 9:29 AM:

Hi,

I am trying to export a multilevel BOM using a query and there seems to be an issue with items that appear twice in the BOM structure.

For example, having the following structure

C1
|----C2
| |----C3 (instance 1)
|----C3 (instance 2)

The only way to export bot instances of C3 seem to be something like this:

<Item type="Part" action="get" select="name" id="{@id}">
 <Relationships>
  <Item type="BOM" select="quantity,related_id(name)">
   <related_id>
    <Item type="Part" select="name">
     <Relationships>
      <Item type="BOM" select="quantity,related_id(name)">
...

Which is of course not acceptable when the number of levels is unknown.

I've also tried this:

<Item type="Part" action="GetItemRepeatConfig" select="name" id="{@id}">
    <Relationships>
         <Item type="BOM" select="quantity,related_id(name)" repeatProp="related_id" repeatTimes="100"/>
    </Relationships>
</Item>

Which unfortunately has a complete different behavior for the second instance of C3, meaning that it will not export the related_id contents, but only a reference to it

        <Item type="BOM" ...>
            <id keyed_name="DD59460604104B0FAF0A591CDDBBC4E5" type="BOM">DD59460604104B0FAF0A591CDDBBC4E5</id>
            <quantity>1</quantity>
            <source_id keyed_name="C1" type="Part">C12DF4DC0D9E4800AE6DC06BD4E9C34E</source_id>
            <related_id keyed_name="C3" type="Part">9BD5A9B522BF4C86930E22468C3E7B5F</related_id>
        </Item>

Which probably makes sense, but it is different than the result offered by the first approach (recuring Part-BOM-Part-Bom etc).

Any clues about how to solve this?

 

Thanks in advance,

Cosmin



tstickel - Friday, November 20, 2009 10:00 AM:

Look at the Project, Multi-Level Bom Tools, found at http://www.aras.com/communityProjects/

This project includes a method, MultiBom_Tools_Get, and two SQL procs/functions, MultiBom_GetCompleteBom1 and MultiBom_GetCompleteBom2.  If you call the method it will invoke the SQL to retrieve what you are looking for.  It can be customized to bring in only the fields you want.

You do not need to install the entire package unless you want the Multi-Level Bom tab on the Part form.



Ronan - Friday, November 12, 2010 1:30 PM:

I Met the original problem some days ago and contacted Aras Support; they could reproduce the issue and are planning a fix for 9.3.

In the meantime, the workaround is to avoid GetItemRepeatConfig and fully define the expected structure in a standard get query. Not ideal but should do the trick till the issue is resolved.



cosmin - Friday, November 20, 2009 10:07 AM:

Thanks, I'll have a look.

Cosmin



cosmin - Saturday, November 13, 2010 8:59 AM:

Thanks Ronan - glad to hear that someone is taking care of it.

 

Have a good day,

Cosmin