cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dependency Formula for BOM qty

FHBCK
Explorer
0 Kudos
1,233

Hi Gurus,

I am currently supporting in a public cloud project and one of my colleagues has the following problem: 

For a finished product, we have a bill of materials (BOM) where we want to control the quantity of a component based on the quantity of the finished product. For example, if the order quantity is between 1-80 units, the quantity of the component should be 5; if it's between 81-160 units, the quantity should be 10; if it's between 161-240 units, the quantity should be 15, and so on. How should we proceed? I have already read other posts pointing to variant configuration and object dependency, but I have no prior experience with these topics and feel a bit lost.

 

Thankful for any help

Accepted Solutions (0)

Answers (2)

Answers (2)

Sudhirvinodkumar
Discoverer
  1. Understand the Basics of Variant Configuration

Variant configuration helps in managing BOMs and rules for products with variations. Key concepts include:

  • Characteristics: Define attributes of the product (e.g., Order Quantity).
  • Class: Group characteristics into a classification system.

Dependencies: Define rules using formulas to control BOM components or operations

  1. Create the Necessary Configuration Objects
  2. a) Create a Characteristic for Order Quantity
  1. Go to transaction CT04 (or equivalent in your system).
  2. Create a new characteristic (e.g., ORDER_QUANTITY).
  3. Assign data type Numeric.
  4. Set Value Range: [1, 9999].
  1. b) Define a Class
  1. Go to transaction CL02.
  2. Create a class (e.g., PRODUCT_CLASS) of type 300 (variant configuration).
  3. Assign the characteristic ORDER_QUANTITY to this class.
  1. c) Maintain BOM
  1. Go to transaction CS01 to create a BOM for the finished product.
  2. For the component whose quantity changes based on order size, set the quantity field as a formula field
Sandra_Rossi
Active Contributor
Please read the rules of engagement: https://pages.community.sap.com/resources/rules-of-engagement. If you want to publish content that was helped/created by GenAI, you must add the user tag GenAI Assisted Content. For content where it's not possible to add a user tag (e.g., answers), you must include this statement: "GenAI was used to help generate this content."
thomas_machts
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi, Variant Configuration would be the right way to solve this. You can assign a so called selection condition to the BOM component in order to select the bom component depending on a characteristic that holds the quantity and a procedure that sets a so called reference characteristic STPO_MENGE for that component with the value of the characteristic that holds the quantity.

Easy example for a selection condition that triggers the selection of the bom component: $root.BNDL_BNB3CL_COMP_0010_QTY > 0 while $root.BNDL_BNB3CL_COMP_0010_QTY is the characteristic that holds the quantity. You can automatically assign this from the item quantity as well.

Easy example for the procedure that sets the quantity of the bom component: $self.BNDL_BNB3CL_STPO_MENGE = $root.BNDL_BNB3CL_COMP_0010_QTY

It is an interesting scenario that a FERT has a component that is changed at the time the product is ordered. Could you also consider this component as a component of a bundle in which the FERT is sold and not a component of the FERT itself? Example: For installing 1 - 80 units of the product I need 5 power supply units, for  81-160 units I need 10 power supply units and so on.

BR, Thomas

FHBCK
Explorer
0 Kudos

Hi Thomas,

thanks for the detailed explanation. I tried doing what you suggested but unfortunately its not working as of now. So i created a Class STL_CTRL of class type 300. I then created two characteristics:

1. BOM_QTY with table name STPO and field name MENGE

2. ORD_QTY with table name PLAF and field name GSMNG (to read the total quantity from the planned order)

I then assigned the two characteristics to the class STL_CTRL and assigned the class to the header material and the material i want to control the quantity of in the BOM.

I then created object dependency of type procedure with the following syntax for testing:

$self.BOM_QTY = 5 if $root.ORD_QTY > 10 (Set quantity of component to 5 if the planned order quantity of the header material is greater than 10)

Then created sales order with ord qty 20 but after MRP the component qty is also set to 20 and not 5, as i would like it to be. 

Any suggestions as to what i did wrong?

 

thomas_machts
Product and Topic Expert
Product and Topic Expert
0 Kudos
You could check on the configuration screen under "Bill-of-Material" if your dependency works during the order configuration.