SAP AVC is a constraint solver. Not just a configuration engine — a general-purpose constraint solver that happens to live inside SAP S/4HANA. It evaluates rules, propagates values, and detects inconsistencies across multiple objects and characteristics.
It can also solve a 100-year-old math puzzle.
Source: This article adapts the SAP Community blog "Year-End Special: A Puzzle for SAP Advanced Variant Configuration (AVC)" by an SAP employee (Dec 2025), available at SAP Community.
The puzzle
SEND + MORE = MONEY. Different letters mean different digits. No leading zeros.
S E N D
+ M O R E
---------
M O N E Y
Henry Dudeney published this in The Strand Magazine in 1924. It's called a cryptarithm, or verbal arithmetic. Rumor says a student once used it in a letter to his father to request money.
If you work through it logically, you can deduce:
- M must be 1 (it's a carryover, and leading zero isn't allowed)
- O must be 0 (if M=1, O can't be anything else)
- S must be 9 (S + 1 + carryover = 10 + O → S = 9)
- Then through the rest of the columns, E=5, N=6, D=7, R=8, Y=2
That gives you: 9567 + 1085 = 10652.
But you don't need to do any of that deduction if you have AVC.
Build the model
The setup is the same as any AVC configurable product — just with letters instead of bike colors or engine sizes.
Step 1: Class (CL01, type 300)
Create CL_SEND_MORE_MONEY. Class type 300 (Variants). Status Released.
Source: SAP Help — Creating a Class. Navigate to Cross-Application Components → Classification System → Master Data → Classes → Create (CL01). Class type 300 is the variant class type. See also Defining Variant Classes in the SAP Library.
Step 2: Characteristics (CT04)
Eight single-character numeric characteristics: S, E, N, D, M, O, R, Y. Data type NUM, 1 character, values 0-9.
Three calculated characteristics: SEND (NUM 4), MORE (NUM 4), MONEY (NUM 5).
The formula characteristics store the decomposed digit sums:
| Characteristic | Type | Purpose |
|---|---|---|
| S | NUM 1 | Thousands digit of SEND |
| E | NUM 1 | Hundreds digit of SEND and units of MORE |
| N | NUM 1 | Tens digit of SEND and hundreds of MONEY |
| D | NUM 1 | Units digit of SEND |
| M | NUM 1 | Thousands digit of MORE and ten-thousands of MONEY |
| O | NUM 1 | Hundreds digit of MORE and thousands of MONEY |
| R | NUM 1 | Tens digit of MORE |
| Y | NUM 1 | Units digit of MONEY |
| SEND | NUM 4 | The digit S1000 + E100 + N*10 + D |
| MORE | NUM 4 | M1000 + O100 + R*10 + E |
| MONEY | NUM 5 | M10000 + O1000 + N100 + E10 + Y |
Source: SAP Help — Creating Characteristics. Navigate to Cross-Application Components → Classification System → Master Data → Characteristics → Create (CT04). Use NUM data type with 1 character for single-digit characteristics.
Step 3: Configurable material (MM02)
Create a simple material (can be any number, doesn't need KMAT type). Assign the class CL_SEND_MORE_MONEY under Classification view, class type 300.
Step 4: Configuration profile (CU41)
Material → Configuration profile → set processing mode to "Advanced Variant Configuration".
This is the key step: AVC mode enables constraint-based processing. Without it, only LO-VC dependencies (procedures/preconditions) are available.
Source: Transaction CU41 (or PMEVC in S/4HANA) — Configuration Profile. Set Processing Mode to "Advanced Variant Configuration" to enable constraint-based processing.
Step 5: Constraint net (CU21)
Create a constraint net for the material. Inside the net, create one constraint.
Source: SAP Help — Creating a Constraint. Navigate to Logistics → Central Functions → Variant Configuration → Dependency → Dependency Net → Create (CU21). Inside the constraint net, create a new constraint with the OBJECTS and RESTRICTION sections.
The constraint: three experiments
The SAP blog author ran three experiments, each with different RESTRICTION logic. The question was: how much information can you skip, and still let AVC solve the puzzle?
Experiment 1: All restrictions except carryover
RESTRICTION includes the summation, the uniqueness constraint, and the three known values (M=1, O=0, S=9). It deliberately skips the carryover logic.
OBJECTS:
X IS_A (300)CL_SEND_MORE_MONEY.
RESTRICTION:
* No. 1: The summation itself
(X.SEND = X.S*1000 + X.E*100 + X.N*10 + X.D)
AND
(X.MORE = X.M*1000 + X.O*100 + X.R*10 + X.E)
AND
(X.MONEY = X.M*10000 + X.O*1000 + X.N*100 + X.E*10 + X.Y)
AND
(X.SEND + X.MORE = X.MONEY),
* No. 2: All values must be unique
(NOT (X.S = X.E) AND NOT (X.S = X.N) AND NOT (X.S = X.D)
AND NOT (X.S = X.M) AND NOT (X.S = X.O) AND NOT (X.S = X.R)
AND NOT (X.S = X.Y))
AND
(NOT (X.E = X.N) AND NOT (X.E = X.D) AND NOT (X.E = X.M)
AND NOT (X.E = X.O) AND NOT (X.E = X.R) AND NOT (X.E = X.Y))
AND
(NOT (X.N = X.D) AND NOT (X.N = X.M) AND NOT (X.N = X.O)
AND NOT (X.N = X.R) AND NOT (X.N = X.Y))
AND
(NOT (X.D = X.M) AND NOT (X.D = X.O) AND NOT (X.D = X.R)
AND NOT (X.D = X.Y))
AND
(NOT (X.M = X.O) AND NOT (X.M = X.R) AND NOT (X.M = X.Y))
AND
(NOT (X.O = X.R) AND NOT (X.O = X.Y))
AND NOT (X.R = X.Y),
* No. 3: The value restrictions found by reasoning
(X.M = 1)
AND
(X.O = 0)
AND
(X.S = 9).
Note: The uniqueness constraint (No. 2) is verbose because AVC constraint syntax doesn't have FOR loops or ALL_DIFFERENT. You have to write out all C(8,2)=28 inequalities explicitly.
When you release the model and click the Test button in PMEVC, every value for E except 5 shows "inconsistent". With E=5, the remaining values resolve: R is either 3, 4, or 8, but MORE=1085 is fixed, so R must be 8.
Solution: 9567 + 1085 = 10652.
Experiment 2: Drop the known values, add carryover rules
Instead of hardcoding M=1, O=0, S=9, the carryover rules are written out:
* No. 3: The carryover restrictions
((X.D + X.E = X.Y) OR (X.D + X.E = X.Y + 10))
AND
((X.N + X.R = X.E) OR (X.N + X.R + 1 = X.E)
OR (X.N + X.R = X.E + 10) OR (X.N + X.R + 1 = X.E + 10))
AND
((X.E + X.O = X.N) OR (X.E + X.O + 1 = X.N)
OR (X.E + X.O = X.E + 10) OR (X.E + X.O + 1 = X.E + 10))
AND
((X.S + X.M = X.O + 10) OR (X.S + X.M + 1 = X.O + 10)).
Each column in the addition has up to four possibilities: with or without carryover, result with or without tens digit. This works but requires more manual value testing.
Experiment 3: Only the summation, uniqueness, and M=1
* No. 3: The value for M
(X.M = 1).
This is the most efficient approach. You write down:
- The summation (No. 1 — straightforward)
- The uniqueness (No. 2 — have an LLM generate it)
- The single deduction that M=1 (no leading zeros on a 5-digit result)
AVC infers S=9 and O=0 on its own, and you're left with the same E=5 decision.
The SAP blog author calls this the winner: minimal human reasoning, maximum use of the constraint engine.
What this means for real AVC models
The SEND+MORE+MONEY example is a playful demonstration. But it maps directly to real scenarios:
| Real scenario | Constraint equivalent |
|---|---|
| BOM component compatibility | X.CASING_SIZE = 'L' → X.DISK_TYPE <> '3.5"' |
| Feature grouping rules | X.PACKAGE_A + X.PACKAGE_B cannot both be selected |
| Pricing calculation | X.BASE_PRICE + sum(X.OPTION_PRICES) = X.TOTAL_PRICE |
| Multi-level consistency | (SUB)PART_OF with position numbers |
The key insight: a constraint doesn't evaluate procedurally. It doesn't say "first check this, then set that." It declares relationships, and the AVC inference engine propagates values in both directions. You tell it what's true, and it finds valid combinations.
This is fundamentally different from LO-VC procedures. In LO-VC, a Procedure sets values top-down. You control the sequence. In AVC, a Constraint declares invariants. The engine figures out the order.
Source: SAP Help — Differences Between Constraints and Procedures (SAP Library: Variant Configuration → Dependencies → Constraints). Constraints declare relationships declaratively; procedures set values top-down in a defined sequence.
The practical limits
The puzzle has 8 variables × 10 possible values = 10^8 combinations. The constraint engine prunes this to a single solution. Real models with 50+ characteristics and millions of configurations still resolve in seconds — AVC runs on HANA, and the inference engine handles the search space efficiently.
But constraints aren't a replacement for all LO-VC logic. Low-level configuration (BOM selection, routing operations) still uses selection conditions in LO-VC mode. The AVC processing mode covers high-level characteristic configuration. The two coexist:
High-level config (AVC) → Characteristic values, constraints
Low-level config (LO-VC) → BOM item selection, routing ops
Source: SAP Help — AVC and LO-VC Processing Modes. Set the Processing Mode in the configuration profile (CU41 → Processing Mode). AVC processes high-level characteristic configuration with constraints; LO-VC handles BOM selection conditions and routing operations.
Try it yourself
The model setup takes about 15 minutes. You need:
- An S/4HANA system with AVC enabled
- Access to CT04, CL01, MM02, CU41, CU21
- PMEVC (transaction code or Fiori app)
The constraint code for all three experiments is in this article. Copy it, adjust the characteristic names (some letters may conflict with existing characteristics in your system — use S_ instead of S, etc.), and test it yourself.
Or skip the setup and think about it this way: if AVC can solve a cryptarithm with just a summation formula, a uniqueness constraint, and one known value — what can it do for your configuration model?
Original story: SAP Community — Year-End Special: A Puzzle for SAP AVC (Dec 2025, 9 kudos)
Comments & Danmaku
Leave a comment — it flies across the page as danmaku!