Sales Order Gross Margin Report by Item
Short answer: A custom ALV report that compares the net value of every sales order item with the cost determined in pricing and shows the gross profit and margin percentage. Items below a chosen threshold are flagged, so sales teams see low-margin orders before they are billed.
- Estimated effort
- M · 3–5 working days
- System
- ECC and S/4HANA
- Tables
- 5
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
VA05 lists orders with their net value but does not show cost or margin; the margin is visible only on the pricing screen of a single order in VA03. KE30 profitability analysis works on billed data with a configured operating concern and does not give the margin of open order items. Seeing low-margin items right after order entry needs a custom report.
Who uses it? Sales managers, pricing teams, sales controllers and finance managers.
Closest standard alternatives
Tables used
The tables the report reads and their join fields. ECC and S/4HANA differences are marked separately.
| Table | Role | Join | System |
|---|---|---|---|
| VBAKSales Document Header | Order header, sales area, customer and pricing document number (driving table) | — | ECC + S/4 |
| VBAPSales Document Item | Item net value and cost | VBAP-VBELN = VBAK-VBELN | ECC + S/4 |
| KNA1Customer Master (General Section) | Customer name | KNA1-KUNNR = VBAK-KUNNR | ECC + S/4 |
| KONVConditions (Transaction Data) | Cost condition check in ECC | KONV-KNUMV = VBAK-KNUMV AND KONV-KPOSN = VBAP-POSNR | ECC only |
| PRCD_ELEMENTSPricing Elements (Document Conditions) | Cost condition check in S/4HANA | PRCD_ELEMENTS-KNUMV = VBAK-KNUMV AND PRCD_ELEMENTS-KPOSN = VBAP-POSNR | S/4HANA only |
S/4HANA notes
- KONV → PRCD_ELEMENTS: In S/4HANA document conditions are stored in PRCD_ELEMENTS; custom code reading KONV must be adapted.
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_VKORG | Sales organization | Range / multiple | VBAK-VKORG | Yes | 1000 |
| S_VTWEG | Distribution channel | Range / multiple | VBAK-VTWEG | No | 10 |
| S_VKBUR | Sales office | Range / multiple | VBAK-VKBUR | No | IST1 |
| S_AUDAT | Order date range | Range / multiple | VBAK-AUDAT | Yes | 01.11.2026 – 15.11.2026 |
| S_KUNNR | Sold-to party | Range / multiple | VBAK-KUNNR | No | 200100 |
| S_MATKL | Material group | Range / multiple | VBAP-MATKL | No | FG01 |
| P_MINPCT | Margin threshold (%) | Single value | — | No | 15 |
| P_NOREJ | Exclude rejected items | Checkbox | — | No | X |
Output columns
| # | Column | Source |
|---|---|---|
| 1 | Sales order | VBAK-VBELN |
| 2 | Item | VBAP-POSNR |
| 3 | Order date | VBAK-AUDAT |
| 4 | Sold-to | VBAK-KUNNR |
| 5 | Customer name | KNA1-NAME1 |
| 6 | Material | VBAP-MATNR |
| 7 | Item description | VBAP-ARKTX |
| 8 | Quantity | VBAP-KWMENG |
| 9 | Unit | VBAP-VRKME |
| 10 | Net value | VBAP-NETWR |
| 11 | Cost | VBAP-WAVWR |
| 12 | Gross profit | Calculated VBAP-NETWR − VBAP-WAVWR |
| 13 | Margin % | Calculated Gross profit ÷ VBAP-NETWR × 100 |
| 14 | Currency | VBAK-WAERK |
| 15 | Flag | Calculated "Low margin" when the margin is below the threshold, "cost missing" when there is no cost |
Sample output
| Sales order | Item | Order date | Sold-to | Customer name | Material | Item description | Quantity | Unit | Net value | Cost | Gross profit | Margin % | Currency | Flag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 12210 | 10 | 11/03/2026 | 200100 | Marmara Gıda | FG-5001 | Packed product A | 400 | PC | 124,000 | 86,800 | 37,200 | 30 | TRY | |
| 12210 | 20 | 11/03/2026 | 200100 | Marmara Gıda | FG-5002 | Packed product B | 250 | PC | 60,000 | 54,600 | 5,400 | 9 | TRY | Low margin |
| 12234 | 10 | 11/06/2026 | 200388 | Toros Yapı Market | FG-6100 | Garden set | 80 | SET | 96,000 | 0 | 96,000 | 100 | TRY | Cost missing |
| 12251 | 10 | 11/10/2026 | 200245 | Karadeniz Market | FG-5001 | Packed product A | 150 | PC | 44,250 | 32,550 | 11,700 | 26.40 | TRY |
How does the report work?
- VBAK and VBAP are read with the selection criteria; items with a reason for rejection (ABGRU) can be excluded.
- The item cost comes from VBAP-WAVWR; this value is taken from the cost condition in pricing (usually VPRS).
- When the cost is zero or empty, the pricing conditions are read from KONV in ECC and from PRCD_ELEMENTS in S/4HANA with VBAK-KNUMV and the item number, and the value (KWERT) of the cost condition is checked; if it is still missing the item is flagged as “cost missing”.
- Gross profit = VBAP-NETWR − VBAP-WAVWR, margin % = gross profit ÷ net value × 100. When the margin is below the threshold parameter the line is shown in red.
- The customer name is added from KNA1; the ALV gives subtotals per customer, material group and sales office. The total margin is calculated as total profit ÷ total net value, not as the average of item margins.
Performance notes
Keep the order date range mandatory. KONV is a very large table in ECC; read it only for items without WAVWR and with the KNUMV + KPOSN + KSCHL key.
Features
- ALV list (sort, filter, subtotals)
- User-specific layout variants
- Double-click drill-down to the document Double-clicking the order opens the item pricing screen in VA03.
- Export to Excel
- Runs as a background job
- Send the result by email Low-margin items can be sent to the sales manager every day.
Authorization objects
- V_VBAK_VKOSales document authorization by sales area
- V_VBAK_AATAuthorization by sales document type
Frequently asked questions
Where does the cost value come from?
From the cost condition in the pricing procedure (usually VPRS). At order time it takes the moving average or standard price of the material and writes it to VBAP-WAVWR.
How are orders in different currencies totalled?
Items are shown in the document currency. For totals, extra columns converted to the company code currency at the order date rate can be added.
What changes on S/4HANA?
On S/4HANA the pricing conditions are stored in PRCD_ELEMENTS instead of KONV. VBAP-WAVWR stays the same, so the main logic does not change; only the fallback table does.
Packages that include this solution
Pricing and Billing Accuracy Pack
A five-component pack that catches pricing and billing errors from loading the price list to posting the invoice: mass price condition upload from …
Related reports
Customer and Material Price Conditions with Validity Dates Report
A custom ALV report that lists customer-specific price conditions in one list with their validity dates, the difference to the list price and the …
Sales Order – Delivery – Invoice Status Report
A custom ALV report that shows every sales order item on the same line as its delivery and invoice documents. You see in one list which orders have …
Let us build this report for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.