Francesco
7th April 2005, 20:53
First my case (IVb2):
I need a customized item to have the weight of its components rolled up in its own weight field. Because the configurations change, the weight of the customized item also changes, based on the elements in the custom BOM.

I am thinking that in order to do so, I need to do some querying, collect all weights of the BOM components, and then write the result to the corresponding item in tipcs021.

So far so good. However, I can't seem to grab the configured item number from anywhere.

Currently (revision umpfh) this is what I have in the parameter substitution constraint of the first item in the generic BOM:


!table ttipcs021
!table ttipcs022

!long ret
!long fp

!import("tipcs022.cprj", tipcs021.cprj)
!import("tipcs022.mitm", tipcs021.item)

!fp=seq.open("testing", "a")
!ret=seq.puts(dte$() & "|" & tipcs021.item & "|" & tipcs022.mitm, fp)
!ret=seq.puts("--------------------------", fp)
!ret=seq.close(fp)


My "testing" file is neatly created, but the values for tipcs021.item and tipcs022.mitm come up empty.

Now I would think that at the point of validation, there is an entry in tipcs021 and something is pointing at it. Apparently not, and with that the first part of my presumed solution falls apart.

So my first question is: How can I retrieve the custom item number from within the configurator?

Since accurate weight is often a shipping requirement, I also imagine that there are existing solutions out there. My second question is therefore: What's your automated solution for rolling up shipping weights?

mprakash
11th April 2005, 07:14
if the codification logic for the configured item code is not difficult and if its based on the options you selected then you can code the same within the constraint and then get the configured item code. (About project you can easily get it by import function same as you used)

You can connect a dummy item in the generic item BOM and attach a validation constraint which can calculates the weight for the item which you have configured. Save this weight on the "GENERIC ITEM" so that when system finishes the configuration the new instance of the item created carries this weight. (This means that the weight in the generic item always carries a last configured item weight)

Francesco
11th April 2005, 19:41
Works like a charm! :)

Still puzzled though as to why I can't import the configured item code. This should exist at the time of validation at least, right?

p.cole
11th April 2005, 23:01
The item code is generated at the time of generation of product structure. The validation constraints are executed before this.

Think about running "Maintain Product Variants" to generate a variant, no product structure (customised item or calculation part) exists yet so the item code does not need to be calculated.