Multi-level configuration is where SAP VC shows its real power. A product like an elevator has multiple configurable sub-assemblies : the cabin, the door system, the control panel. Each sub-assembly is itself a KMAT with its own class, profile, and dependencies. The top-level configuration must propagate values down, and sub-assembly configurations must communicate back up.
Source: SAP Help: Multi-Level Configuration
How Multi-Level Configuration Works
A configurable material in a BOM (the component) can itself be a KMAT : a configurable sub-assembly. When the top-level configuration runs:
- The top-level material class characteristics are processed
- BOM items are selected by selection conditions
- If a selected BOM item is a KMAT, its own configuration profile is triggered
- The sub-assembly configuration processes its own class, dependencies, and BOM
Object Variables: $SELF, $PARENT, $ROOT
These three variables control which object a dependency refers to in multi-level configurations.
| Variable | Refers To |
|---|---|
| $ROOT | The highest-level configurable material in the BOM |
| $SELF | The material to which the dependency is directly assigned |
| $PARENT | The object immediately above $SELF |
Behavior by assignment:
- Header material dependencies: $SELF and $ROOT are the same. $PARENT has no meaning.
- BOM item dependencies: $PARENT is the configurable material (the BOM owner), $SELF is the BOM item material.
- In constraints: object variables are not used. Objects are declared by class.
Value Propagation Patterns
Top-Down (Required Condition)
A selection condition at the sub-assembly BOM item level makes a characteristic mandatory. The user must enter a value for the sub-assembly characteristic. One way to propagate.
Procedure-Based Copy
Write a procedure at the BOM item level to copy values from parent to child:
$self.COLOR = $parent.COLOR if $parent.COLOR specified,
For multi-level cascading:
$self.COLOR = $root.COLOR if $root.COLOR specified.
Constraint-Based Inheritance
For cases where restrictable flags prevent propagation, use a constraint:
OBJECTS:
PARENT IS_A(300) PARENT_CLASS,
CHILD IS_A(300) CHILD_CLASS
CONDITION:
SUBPART_OF (CHILD, PARENT)
RESTRICTIONS:
CHILD.DESIGN_CODE = PARENT.DESIGN_CODE
Multi-Level Nuances
$ROOT behavior:
- If the BOM is exploded in production, $ROOT always refers to the material that transfers requirements
- If the BOM is relevant to SD, $ROOT always refers to the header material
Configuration profile for sub-assemblies: Each KMAT sub-assembly needs its own configuration profile (CU41) with:
- Its own class
- Its own procedure list
- Its own dependency nets
BOM explosion and multi-level: The BOM explosion processes one level at a time. A sub-assembly's BOM is only exploded when that sub-assembly is being configured. This means the selection conditions at level 2 are evaluated after level 1's BOM items are determined.
Practical Example: Elevator Door System
An elevator (top-level configurable) contains a door system (sub-assembly KMAT).
Top-level (Elevator) characteristics:
- SHAFT_HEIGHT, SPEED, DOOR_TYPE, CAPACITY
Sub-assembly (Door System) needs:
- DOOR_WIDTH (calculated from SHAFT_HEIGHT)
- DOOR_TYPE (inherited from parent)
Procedure on door BOM item:
$self.COLOR = $parent.COLOR if $parent.COLOR specified,
$self.DOOR_TYPE_CHAR = $parent.DOOR_TYPE if $parent.DOOR_TYPE specified.
Constraint for non-restrictable inheritance: If a characteristic has the restrictable flag unchecked, use a constraint instead:
OBJECTS:
ELEV IS_A(300) ELEV_CLASS,
DOOR IS_A(300) DOOR_CLASS
CONDITION:
SUBPART_OF (DOOR, ELEV)
RESTRICTIONS:
DOOR.DOOR_TYPE_CHAR = ELEV.DOOR_TYPE
Common Mistakes
- $PARENT on header material: has no effect. $PARENT only has meaning on BOM item dependencies.
- $ROOT misunderstanding in deep multi-level BOMs: $ROOT might not be what you think when a sub-assembly processes its own sub-assembly.
- Missing profile for sub-assembly KMAT: a sub-assembly KMAT needs its own CU41 profile with its own procedure list. Without it, the sub-assembly's dependencies won't execute.
- Restrictable flag blocks inheritance: check the characteristic's restrictable flag (CT04) at the sub-class level. If unchecked, the sub-assembly can't inherit values via procedures : must use constraints.
Sources: SAP Help: Object Variables | SAP Help: Multi-Level