Skip to Content
Technical Articles
Author's profile photo Ritesh Dube

How to perform SUM of Characteristic values from lower level configuration

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

Assigned tags

      8 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Andrew Engfehr
      Andrew Engfehr

      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.

      Author's profile photo Ritesh Dube
      Ritesh Dube
      Blog Post Author
      Thank you for comment and highlighting the limitation of this approach. I will add it along with other few items in next edit.
      Thanks
      RD
      Author's profile photo Bohdan Kaspryshyn
      Bohdan Kaspryshyn

      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

      Author's profile photo Andrew Engfehr
      Andrew Engfehr

      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

      Author's profile photo Learsap ewm
      Learsap ewm

      nice info.

      Author's profile photo SAP WMEWM
      SAP WMEWM

      Nice document. Keep it up.

      Author's profile photo SAP2020ALL Module
      SAP2020ALL Module

      Nice blog , could you please write more on how to use other syntax in dependencies.

      Author's profile photo SAP2020ALL Module
      SAP2020ALL Module

      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.