> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vortexiq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Margin Erosion Alerts, SAP

> Top finding for the Finance Controller. SKUs whose unit margin has materially eroded in the last quarter. How to read it, why it matters, and how to act on...

**Metrics type:** [Key Metrics](/nerve-centre/overview#metrics-types-explained)  •  **Category:** [Ecommerce Platform](/nerve-centre/connectors#connectors-by-type)

> Top finding for the Finance Controller. SKUs whose unit margin has materially eroded in the last quarter.

## At a glance

> Top finding for the Finance Manager / SAP Functional Analyst working on margin protection. Materials whose unit margin has materially eroded in the last 90 days vs the prior 90 days, ranked by absolute margin-dollar impact. Each row is a material that used to make money and now makes less, with the magnitude and direction of the erosion. Alert table, not a single number.

|                                |                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **What it counts**             | Per material, compare unit margin in the trailing 90 days to unit margin in the prior 90 days. Unit margin = (average net selling price minus average COGS basis) / average net selling price. Materials with `>20% margin drop` AND `>$5K period-over-period gross-profit impact` flag. The card shows top 50 by absolute dollar impact. |
| **Tax treatment**              | Net of tax on both sides.                                                                                                                                                                                                                                                                                                                 |
| **Shipping**                   | Revenue side includes freight if mapped to revenue. COGS side includes inbound freight loaded onto valuation.                                                                                                                                                                                                                             |
| **Discounts**                  | Net selling price (post-discount) used for revenue.                                                                                                                                                                                                                                                                                       |
| **Refunds**                    | Returns reduce volume but do not affect unit margin directly.                                                                                                                                                                                                                                                                             |
| **Cancelled / voided orders**  | Excluded.                                                                                                                                                                                                                                                                                                                                 |
| **Currency**                   | Group Currency for consolidated views.                                                                                                                                                                                                                                                                                                    |
| **Plant / Company Code scope** | Respects dashboard filter.                                                                                                                                                                                                                                                                                                                |
| **Time window**                | `90D vsP`                                                                                                                                                                                                                                                                                                                                 |
| **Alert trigger**              | `any SKU dropped >20% margin AND >$5K period impact`                                                                                                                                                                                                                                                                                      |
| **Roles**                      | owner, finance                                                                                                                                                                                                                                                                                                                            |

## Calculation

Calculated automatically from your SAP data. See the At a glance summary above for what the metric tracks and the worked example below for a typical reading.

## Worked example

A US enterprise B2B distributor on S/4HANA Cloud. 90-day window 03 Feb 26 to 03 May 26 vs prior 90 days 05 Nov 25 to 02 Feb 26.

**Headline:** 14 materials flagged with margin erosion. Total period gross-profit impact: -\$680,000.

**Top 6 erosion cases:**

| Material | Description              | Prior 90D unit margin | Current 90D unit margin | Drop  | Volume sold | Period GP impact |
| -------- | ------------------------ | --------------------- | ----------------------- | ----- | ----------- | ---------------- |
| MAT-A23  | Industrial pump assembly | 28%                   | 18%                     | -10pp | 1,420 units | -\$184,000       |
| MAT-B41  | Steel framework          | 32%                   | 22%                     | -10pp | 840 units   | -\$148,000       |
| MAT-C18  | Electrical fitting       | 24%                   | 14%                     | -10pp | 3,140 units | -\$92,000        |
| MAT-D62  | Bearing assembly         | 18%                   | 11%                     | -7pp  | 2,210 units | -\$78,000        |
| MAT-E55  | Hydraulic seal           | 30%                   | 20%                     | -10pp | 1,180 units | -\$72,000        |
| MAT-F09  | Custom valve             | 26%                   | 17%                     | -9pp  | 640 units   | -\$58,000        |

**Investigation walkthrough:**

1. **MAT-A23 dropped 10pp on a high-volume material.** Drilling into [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku) and the Sales Document history shows: standard cost increased $32 per unit (procurement-side, supplier price increase) but the SD selling price was not updated in the pricing condition record (VK11). Result: margin on every unit sold was $32 lower than it should have been. Across 1,420 units, \$45K of pure margin loss.
2. **The fix is a price update.** SD analyst raises the customer-specific or base condition by \$32 (or whatever the cost increase was, plus the merchant's standard margin uplift). T-code VK12 (change condition record).
3. **MAT-C18 is a different problem.** Standard cost did not move; selling price dropped. This is volume-discount creep: a key customer renegotiated terms and the new pricing applies even to small orders. The fix is segmenting the discount: keep it for large orders, restore the base price for small.
4. **Pareto applies.** The top 6 materials drive 78% of the total margin erosion ($632K of $680K). Action those 6 first; the rest are smaller fish.
5. **Multi-Company-Code investigation.** If a material's margin dropped only in CC 2000 but not CC 1000, the issue is local (regional pricing or local-supplier cost). If it dropped across all CCs, it is a global supplier-price issue. The card shows per-CC breakdown on hover.

**Action playbook:**

* **For each flagged material, classify the cause.** Cost-up (procurement-side), Price-down (sales-side), or Mix-shift (within the material, smaller-margin variants now dominate). Vortex IQ surfaces the classification automatically.
* **Cost-up materials** -> price update via VK11 / VK12 in SAP, plus procurement renegotiation if possible.
* **Price-down materials** -> review discount records (VK33), tighten approval thresholds.
* **Mix-shift materials** -> usually requires SKU-level pricing strategy review (e.g. raise low-margin variant prices).

## Sibling cards merchants should reference together

| Card                                                                                             | Why pair it with Margin Erosion Alerts                                    |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------- |
| [Gross Margin Percentage](/nerve-centre/kpi-cards/sap/gross-margin-percentage)                   | The headline. This card explains the per-SKU drivers of any change.       |
| [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku)                                       | The full table sorted by margin contribution.                             |
| [Average Landed Cost per Unit](/nerve-centre/kpi-cards/sap/average-landed-cost-per-unit)         | Cost-side trend that drives the cost-up cause.                            |
| [Landed Cost Variance vs Standard](/nerve-centre/kpi-cards/sap/landed-cost-variance-vs-standard) | When actual cost diverges from standard, margin compresses.               |
| [Top SKUs by Inventory Value](/nerve-centre/kpi-cards/sap/sap-top-skus-value)                    | Which materials matter most.                                              |
| [Margin Compression](/nerve-centre/kpi-cards/sap/margin-compression)                             | Trend-watch alert variant.                                                |
| [Dead Stock with Active Ad Spend](/nerve-centre/kpi-cards/sap/dead-stock-with-active-ad-spend)   | Forced markdowns to clear dead stock erode margin and trigger this alert. |

## Reconciling against the vendor's own dashboard

**Where to look in S/4HANA Cloud:**

> **Margin Analysis** Fiori app, drill by material
> **CO-PA Margin Reporting** transaction KE30 / KE31
> **Material Price Analysis** transaction CKM3N (price history per material)
> **Embedded Analytics**: CDS view `I_MaterialMarginContribution`

Direct deep-link: `https://my{tenant}.s4hana.cloud.sap/sap/bc/ui2/flp#MarginAnalysis-display`

**Why our list may legitimately differ from a manual SAP CO-PA query:**

| Reason                 | Direction | Why                                                                                                                                                         |
| ---------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Erosion threshold**  | Either    | Default 20% drop AND >\$5K period impact. Tunable.                                                                                                          |
| **Cost basis**         | Small     | Card uses material price control (S or V). CO-PA may use planned cost or activity-based cost.                                                               |
| **Mix-shift handling** | Either    | Card flags material-level erosion only. Mix shift across materials shows on [Gross Margin Percentage](/nerve-centre/kpi-cards/sap/gross-margin-percentage). |
| **CC scope**           | Either    | Card respects dashboard.                                                                                                                                    |

**Cross-connector reconciliation:**

This is the SAP-side answer; commerce platforms cannot show true margin erosion because they do not own COGS. The cross-platform finding is "[Dead Stock with Active Ad Spend](/nerve-centre/kpi-cards/sap/dead-stock-with-active-ad-spend)" where forced markdowns to clear advertised dead stock cause some of the erosion this card detects.

## Known limitations / merchant FAQs

**Why 90 days vs 90 days?**
Quarterly comparison aligns with how Finance reviews margin. Tunable to 30 vs 30 (monthly), 180 vs 180 (semi-annual).

**My standard prices are stale, will the card flag false positives?**
Possibly. If a material has price control S (standard) and the standard cost has not been updated in 6 months while procurement cost has risen, the card detects margin erosion via Material Ledger / Actual Costing if active. Without Actual Costing, the standard-cost lag hides the erosion. Recommendation: run periodic standard-cost updates (Fiori app `Update Standard Prices`).

**Materials with very low volume, do they show up?**
Filtered by the \$5K period impact threshold by default. A material that sold 3 units with 30% margin drop has small dollar impact and is filtered out. Tunable.

**New product launches: their margin profile is unstable, false flag?**
Configurable warmup (default 90 days from first sale). New materials within warmup are excluded.

**Multi-Company-Code: a material's margin can differ across CCs, how does the card handle it?**
Computed per material per CC. A material flagging in CC 1000 but stable in CC 2000 shows only the CC 1000 row. Pivot to consolidated view rolls up per material.

**SAP CO-PA shows different numbers, why?**
CO-PA Margin Analysis can include cost components (allocated overhead, freight-out, marketing) beyond direct COGS. The card is gross margin only (revenue minus direct COGS). Reconcile by stripping cost components from CO-PA.

**Discounts via condition records, how detected?**
The card uses actual selling price net of discounts (the SD pricing-procedure end result). If a key customer renegotiated a discount that now applies, the card sees the lower net price and flags the erosion. Drilling into the Sales Document history shows which orders / which condition records moved.

**T-codes for drilling in?**
KE30 (CO-PA), VK13 (display condition record), CKM3N (price history), MR21 (price change), VBRK / VBRP (Billing Document detail).

***

### Tracked live in Vortex IQ Nerve Centre

*Margin Erosion Alerts* is one of hundreds of KPI pulses Vortex IQ tracks across SAP and 70+ other ecommerce connectors. Nerve Centre runs the detection layer; Vortex Mind investigates the cause when something moves; Ask Viq lets you interrogate any number in plain English.

[Start for free](https://app.vortexiq.ai/login) or [book a demo](https://www.vortexiq.ai/contact-us) to see this metric running on your own data.
