> ## 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.

# Gross Margin Percentage, SAP

> Revenue minus COGS over revenue. The single best margin-health number for the executive view. How to read it, why it matters, and how to act on it.

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

> Revenue minus COGS over revenue. The single best margin-health number for the executive view.

## At a glance

> Gross margin percentage = (Revenue minus COGS) / Revenue, period-window. The single best margin-health number for the executive view. Sources revenue from S/4HANA Cloud Universal Journal revenue accounts and COGS from the matching cost-of-goods-sold posting created at goods issue (movement type 601 + automatic offsetting cost posting via OBYC tables).

|                               |                                                                                                                                                                                                                                                                                                                                                                                                           |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **What it counts**            | `(SUM(revenue postings) minus SUM(COGS postings)) / SUM(revenue postings)` for the period, computed inside the Universal Journal `ACDOCA` filtered to the relevant GL account hierarchy nodes. Revenue node typically 4xxxxx range, COGS node typically 5xxxxx range. Each Billing Document creates both a revenue line (credit) and a COGS line (debit) at posting; the card uses both sides per period. |
| **Tax treatment**             | Net of tax on both sides.                                                                                                                                                                                                                                                                                                                                                                                 |
| **Shipping**                  | Revenue side includes freight if pricing-procedure freight conditions map to revenue. COGS side typically includes inbound freight loaded onto material standard or moving-average price; outbound freight is operating expense, not COGS.                                                                                                                                                                |
| **Discounts**                 | Revenue side is net of discounts. COGS side is net of procurement discounts loaded onto valuation.                                                                                                                                                                                                                                                                                                        |
| **Refunds**                   | Both sides netted.                                                                                                                                                                                                                                                                                                                                                                                        |
| **Cancelled / voided orders** | Excluded.                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Currency**                  | Group Currency for consolidated views; Company Code currency for single-CC views.                                                                                                                                                                                                                                                                                                                         |
| **Company Code scope**        | Respects dashboard filter.                                                                                                                                                                                                                                                                                                                                                                                |
| **COGS basis**                | Standard (S) or moving-average (V) per material. SAP Material Ledger / Actual Costing tenants: actual cost where available.                                                                                                                                                                                                                                                                               |
| **Time window**               | `30D vsP`                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Alert trigger**             | `drop >2pp vsP`, sentiment `margin`                                                                                                                                                                                                                                                                                                                                                                       |
| **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. 30-day window 04 Apr 26 to 03 May 26.

| Component                               | Value (USD, Group Currency) |
| --------------------------------------- | --------------------------- |
| Revenue (booked into GL)                | \$20,140,000                |
| COGS (matching goods-issue postings)    | \$14,820,000                |
| Gross margin                            | \$5,320,000                 |
| **Gross Margin Percentage (this card)** | **26.4%**                   |

|      | This period | Prior 30D | vsP    |
| ---- | ----------- | --------- | ------ |
| GM % | 26.4%       | 28.7%     | -2.3pp |

Five things to notice:

1. **GM% at 26.4% is below the 28.7% prior period, a 2.3pp drop.** Card fires the `drop >2pp vsP` alert.
2. **What drives a 2.3pp drop?** Three usual causes (in order of frequency): (a) standard-price changes on key materials with cost increases not yet passed through to selling price, (b) mix shift toward lower-margin products, (c) increased discounting / promotional activity.
3. **Drill into [Margin Erosion Alerts](/nerve-centre/kpi-cards/sap/margin-erosion-alerts)** for the per-SKU breakdown. Typically a handful of materials drive most of the change.
4. **Drill into [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku)** for the full table sorted by margin contribution. The top 50 SKUs typically explain 70 to 80% of total gross profit.
5. **Multi-Company-Code GM% comparison.** US 28.1%, CA 24.6%, MX 21.8%. The MX margin is structurally lower (smaller deals, more competitive market), but if MX dropped 4pp this period that is a localised problem worth investigating separately.

## Sibling cards merchants should reference together

| Card                                                                                             | Why pair it with Gross Margin Percentage                    |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------- |
| [Margin Erosion Alerts](/nerve-centre/kpi-cards/sap/margin-erosion-alerts)                       | Per-SKU drilldown of which materials drove the margin drop. |
| [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku)                                       | Full margin-by-SKU table.                                   |
| [Total COGS](/nerve-centre/kpi-cards/sap/sap-cogs-total)                                         | The denominator-adjacent figure.                            |
| [Average Landed Cost per Unit](/nerve-centre/kpi-cards/sap/average-landed-cost-per-unit)         | Cost trend that erodes margin from below.                   |
| [Landed Cost Variance vs Standard](/nerve-centre/kpi-cards/sap/landed-cost-variance-vs-standard) | When actual cost exceeds standard, margin compresses.       |
| [Revenue Booked into GL](/nerve-centre/kpi-cards/sap/revenue-booked-into-gl)                     | The revenue side of the calculation.                        |
| [Margin Compression](/nerve-centre/kpi-cards/sap/margin-compression)                             | The alert variant of this card for trend-watch.             |

## Reconciling against the vendor's own dashboard

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

> **Income Statement** Fiori app (`F0708`) showing Revenue and COGS lines
> **Margin Analysis** Fiori app, profitability segment view (CO-PA / Margin Analysis)
> **SAP Analytics Cloud** Profitability story
> **Embedded Analytics**: CDS view `I_OperatingProfit`

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

**Why our number may legitimately differ from SAP's Income Statement / Margin Analysis:**

| Reason                               | Direction | Why                                                                                                                                                                                                                   |
| ------------------------------------ | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **COGS account scope**               | Either    | SAP's chart varies; the card uses the COGS hierarchy node (typically 5xxxxx). If your chart maps freight or warehousing to COGS, the card includes it.                                                                |
| **Material Ledger / Actual Costing** | Small     | If your tenant uses Actual Costing, period-end revaluation can adjust historical COGS retroactively. The card uses each material's price-control source live; differences settle at month-end revaluation.            |
| **CO-PA Margin Analysis**            | Either    | SAP's CO-PA view of margin can include cost components (labour, overhead) that this card excludes. The card is gross margin (revenue - direct COGS only); CO-PA can show contribution margin or net operating profit. |
| **FX rate type**                     | Small     | Card uses TCURR rate type M; SAP reports may use different rate types per period.                                                                                                                                     |

**Cross-connector reconciliation:**

This is the SAP-side answer; commerce platforms cannot show true gross margin because they do not own COGS. Commerce-platform "margin" is typically calculated on a manually-entered cost-per-product field, which is rarely current.

## Known limitations / merchant FAQs

**What is a healthy gross margin for B2B distribution?**
22 to 32% typical. Specialty distribution: 35 to 45%. Commodity distribution: 10 to 18%. Industry context matters more than absolute number.

**Why does GM% drop when revenue grows?**
Either mix shift (more low-margin volume) or cost increases not reflected in selling price. Pair this with [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku) to diagnose.

**Standard cost vs moving average, which is more accurate?**
Standard cost is more stable (good for budgeting); moving average reflects current procurement reality. SAP allows mixing per material. The card uses each material's setting; the executive view may smooth over genuine cost variance if standard prices are stale.

**Material Ledger / Actual Costing impact?**
Period-end revaluation in Material Ledger can shift historical COGS retroactively. The card picks up the latest revaluation snapshot; expect small jumps at month-end close.

**FX swings affect margin?**
Yes if revenue and COGS are in different currencies. A USD-revenue / EUR-COGS line will see margin shift with EUR/USD movement. SAP's parallel-currency posting captures this; the card uses Group Currency for consistency.

**SAP Analytics Cloud Profitability story shows different margin, why?**
SAC may use CO-PA Margin Analysis (which includes contribution-cost components beyond COGS) or different period definitions. Re-run SAC at the same revenue and COGS account scope and the figures reconcile.

**Refunds and Credit Memos, how do they hit margin?**
Both sides. A Credit Memo (G2) reverses revenue; the corresponding goods receipt (return delivery, movement type 651/653) reverses COGS. Net margin impact reflects both legs.

**Mix-shift vs price-cost gap, how do I tell them apart?**
Drill into [Margin by SKU](/nerve-centre/kpi-cards/sap/margin-by-sku). If most SKUs maintained their unit margin and the headline dropped, it is mix shift. If most SKUs lost unit margin, it is a price-cost gap (cost-up or price-down).

**T-codes for drilling in?**
S\_ALR\_87012284 (Income Statement), KE30 (CO-PA execution), MR21 (price change), CKM3N (price analysis).

***

### Tracked live in Vortex IQ Nerve Centre

*Gross Margin Percentage* 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.
