SAP VC LO-VC AVC Debugging CU50

Debugging SAP Variant Configuration Dependencies: A Practical Guide

PJ / 2026-05-28

Variant Configuration dependencies are the most complex part of any VC model. When something goes wrong — a component is selected incorrectly, a price comes out wrong, or a valid combination is rejected — you need to debug the dependency logic.

This guide covers the practical techniques for debugging VC dependencies in both LO-VC and AVC, based on official SAP documentation and real project experience.

Source: SAP Help Portal — Low-Level Configuration | SAP Community — AVC Trace Guide by Florian Soe (SAP)

The Most Important Tool: CU50 Configuration Trace

CU50 is the configuration simulation transaction in SAP. It lets you configure a material step by step, and more importantly — it can record a trace of every dependency that executes.

How to Activate the Trace

  1. Open CU50 (/nCU50)
  2. Enter the configurable material and any required characteristics
  3. Go to Extras → Trace → Activate
  4. Configure your material by selecting characteristic values
  5. Go to Extras → Trace → Display

The trace shows you every dependency that fired, in what order, and with what result.

What the Trace Tells You

A typical CU50 trace entry looks like this:

Procedure: Z_ELEV_PRICE_CALC
  $SELF.PRICE = $SELF.BASE_PRICE
    → PRICE set to 15000.00
  $SELF.PRICE = $SELF.PRICE + 2000 if $SELF.DOOR_TYPE = 'Glass'
    → Condition TRUE (DOOR_TYPE = 'Glass')
    → PRICE changed to 17000.00
  $SELF.PRICE = $SELF.PRICE + 500 if $SELF.DOOR_TYPE = 'Steel'
    → Condition FALSE (DOOR_TYPE = 'Glass')

Each dependency type is labeled (Procedure, Selection Condition, Precondition, Constraint), and you can see:

Common Dependency Errors and How to Find Them

1. Characteristic Value Type Mismatch

Symptoms: A dependency evaluates silently but produces wrong results. No error message appears.

Example:

$SELF.PRICE = $SELF.BASE_PRICE + 500 if $SELF.FLOORS = 10

If FLOORS is a CHAR-type characteristic with value '10' (string), the numeric comparison = 10 will fail because SAP treats '10' as a string. The condition evaluates FALSE even though the user selected 10.

How to find it: In the CU50 trace, look for conditions that evaluate FALSE when you expect TRUE. Check the characteristic data type in CT04.

Fix: Use $SELF.FLOORS = '10' (with quotes for CHAR characteristics), or convert FLOORS to a NUM-type characteristic.

2. Procedure Execution Order Dependency

Symptoms: The same configuration sometimes works, sometimes doesn't. The result depends on which order the user selects values.

Example:

* Procedure 1
$SELF.TOTAL_PRICE = $SELF.BASE_PRICE,
* Procedure 2
$SELF.TOTAL_PRICE = $SELF.TOTAL_PRICE + 500 if $SELF.FEATURE_X = 'Yes',
$SELF.TOTAL_PRICE = $SELF.TOTAL_PRICE * 1.1 if $SELF.FEATURE_X = 'Yes'.

If the user selects FEATURE_X = 'Yes' before the base price is calculated (Procedure 1 hasn't run yet), TOTAL_PRICE gets multiplied by 1.1 after Procedure 2 fires again on the next field change. The result depends on timing.

How to find it: The CU50 trace shows the execution order. If you see the same procedure running multiple times with different results, this is your problem.

Fix: Use the not $SELF.TOTAL_PRICE specified guard to prevent re-execution:

$SELF.TOTAL_PRICE ?= $SELF.BASE_PRICE if not ($SELF.TOTAL_PRICE specified),

3. Selection Conditions That Never Fire

Symptoms: A component is always included in the BOM or never included, regardless of configuration choices.

Example: A glass door panel should only appear when DOOR_TYPE = 'Glass'. But it appears in every BOM explosion.

How to find it: In CU50, run BOM → Display after configuring. Check which components were selected or excluded. The trace doesn't directly show selection condition results in all cases.

Verification path:

  1. In CU50, configure the material with DOOR_TYPE = 'Steel'
  2. Run BOM explosion
  3. Check if the glass door panel appears (it shouldn't)
  4. View the selection condition on the glass door BOM item (CS02) and check its logic

Common causes:

4. Precondition That Blocks Valid Choices

Symptoms: A characteristic value is red (invalid) in the configuration screen for no apparent reason.

How to find it: In CU50, hover over the red value or use Extras → Incompleteness List. This shows which preconditions are failing.

Fix: Look at the precondition logic. Common issues:

LO-VC vs AVC: Debugging Differences

Both LO-VC and AVC support the configuration trace, but there are important differences:

Aspect LO-VC (CU50) AVC (PMEVC)
UI SAP GUI — CU50 Fiori — Manage Product Configuration
Trace activation Extras → Trace → Activate In PMEVC, use the Trace button
Trace output Sequential dependency execution log Constraint-based evaluation log
Procedure order Preserves execution order Constraint solver may reorder
Error messages Generally clear More detailed (includes constraint violations)
Temporary chars Supported in procedure Not supported — must be refactored
Trace comparison Manual Manual — use AVC Trace Inspector filters to narrow by message type, characteristic, or dependency

Debugging in AVC: Key Differences

Constraint violations appear differently. In AVC, if a constraint can't be satisfied, the solver doesn't fail silently — it flags the conflict. The trace output shows which constraints are in conflict and which characteristic values would resolve them.

AVC Trace Inspector filters. AVC's trace (available in the PMEVC simulation UI) offers more powerful filtering than CU50: you can filter by Trace Level (high-level vs low-level), Message Type (info, warning, error, inconsistency), Value Assignment By, Characteristic, and Dependency. Use the "Inconsistency Detected" message type filter to jump straight to configuration errors. Source: SAP Community — The Trace by Florian Soe

Trace deactivation. In some SAP releases, the trace may activate automatically in CU50/VA01 even when the configuration log is off. If you see unexpected trace behavior, check KBA 1889920 for deactivation steps. Source: SAP KBA 1889920

Procedures with $SELF.X = $SELF.X + <value> patterns behave differently in AVC. The constraint solver may interpret this as a constraint equation rather than a sequential update. Use intermediate characteristics to break these into clear assignment steps.

Temporary characteristics cause hard errors in AVC. If your LO-VC model uses $TEMP variables, the AVC trace will show them as unresolved. Every characteristic must be:

  1. Created in CT04
  2. Assigned to a class (CL02/CL20)
  3. Included in the configuration profile

A Systematic Debugging Workflow

Step 1: Reproduce the Problem in CU50

Always start by reproducing the issue in controlled conditions:

Step 2: Activate and Run the Trace

/nCU50
Extras → Trace → Activate

Configure with the problematic combination. Display the trace.

Step 3: Identify the Failing Dependency

Scan the trace for:

Step 3b: Use SAAB for VC_DB_INTERFACE Trace (Sales Order Issues)

If the configuration works in CU50 but fails in a sales order (VA01/VA02), the trace may not capture database-level issues. Use SAAB transaction with checkpoint group VC_DB_INTERFACE to trace how the configuration instance is stored and retrieved in sales orders. This is especially useful for debugging "configuration lost after save" scenarios. Source: SAP KBA 3284731

Step 4: Isolate and Test

For the suspected dependency, test it in isolation:

  1. Create a minimal test scenario in CU50 with only the relevant characteristics
  2. Set characteristic values one at a time to see which step triggers the issue
  3. If possible, comment out other dependencies temporarily to isolate the problem

Step 5: Fix and Compare Traces

After fixing: run the same configuration through CU50 and compare the old trace with the new one. They should differ only where you intended the change.

AVC-Specific Debugging Checklist

Summary

Debugging Tool When to Use What It Shows
CU50 Trace First step for any dependency issue Full execution log with values and conditions
AVC Trace Inspector AVC-specific issues — filter by message type, characteristic Constraint violations, solver output, trace level filtering
BOM Display (CU50) Component selection problems Which BOM items were selected/excluded
Incompleteness List Precondition blocking values Which preconditions are failing
SAAB — VC_DB_INTERFACE Config works in CU50 but fails in sales order Database-level configuration storage and retrieval

The CU50 trace is your most powerful debugging tool for both LO-VC and AVC. Activate it early, use it often, and always compare traces before and after changes. Most dependency bugs can be found and fixed in under 30 minutes if you follow a systematic trace-first approach.

Master VC Debugging

The **SAP VC for Beginner** book dedicates an entire chapter to dependency debugging with real-world examples and trace comparison techniques.

Get the Book — $9.99