While setting up your variant configuration model if you come across a need to count the value of a Characteristic which is used in multiple level of configuration so how to count it ?
We can use built-in function $SUM_PARTS and create an object dependency type procedure to perform this counting. It will produce a sum of the values of a characteristic, across several configurable materials in a configuration structure.
Answer is below.
Let’s build a very small example to make it clearer. Here configurable material PC have 3 more configurable sub-assemblies, so the requirement is to add all the weights of these assemblies and write final weight at top level. As sub-assemblies are configurable for every customer order configuration for these will be different and so do the weight.
Parameters to be maintained and changes we may need to carry out.
Characteristic weight is present in class of each configurable material which will hold value presenting weight of that sub-assembly
Same characteristic will be present in class for top level
Create a procedure with below syntax and assign to top level material (My-COMPUTER) we created.
Allocate a procedure with the following source code to the BOM item:
$SELF.CHARACTERSTIC = $SUM_PARTS ($PARENT,CHARACTERSTIC)
$SELF.WEIGHT = $SUM_PARTS ($PARENT, WEIGHT)
So, everything is set now, run your simulation and see the effect.
Result:
Please post your comments and please do not post question in comment section. If you have doubts or need more details , please open a new thread in forum and you will get a reply from me or other forum members.
Thanks
Ritesh
Hi, nice clear post. I have one comment. This capability works great for single level BOM’s but will not pull weights from multi-level BOM’s with child configurable materials. In that case you will need to use this capability in conjunction with constraints to pull weights from lower levels up to parent levels.
Andrew Engfehr any pointers how to pull it with constraints? also $sum_parts is not working in child BOM’s, but works fine when configured as standalone materials
Yes Bohdan Kaspryshyn , I wrote a good example in the answer to this question and also posted it on your recent query.
https://answers.sap.com/questions/13126725/inference-of-weight-on-superior-material.html?childToView=13126852#answer-13126852
nice info.
Nice document. Keep it up.
Nice blog , could you please write more on how to use other syntax in dependencies.
Also, there is far less online material available online on dependencies syntax, providing more information on various dependency type and out of the box syntax y help learner like me a lot.