Sub topic 6
Pricing with the condition technique
This chapter assumes you know how a sales order is structured (header, items, schedule lines) and what customer and material master data hold. It explains how SAP S/4HANA finds prices, discounts, freight and taxes for each order item.
The idea
Pricing in SD does not look up a single price field. It runs a pricing procedure, which is an ordered list of steps. Each step is a condition type such as a base price, a discount or a tax. For each condition type, the system searches for a matching condition record, which is a stored value valid for a combination of keys such as customer and material.
The pieces fit together as follows.
| Element | Role | Example |
|---|---|---|
| Pricing procedure | Ordered list of condition types, with subtotals and calculation rules | RVAA01 |
| Condition type | One kind of price element | PR00 (price), K007 (customer discount), MWST (tax) |
| Access sequence | Ordered list of searches for records of one condition type | Customer/material, then price list, then material |
| Condition table | The key combination a search uses | Customer + Material |
| Condition record | The stored amount, validity dates and scales | 100 EUR per piece, valid for the year |
The system picks the pricing procedure from the sales area, the customer's pricing procedure indicator and the document's pricing procedure indicator.
How a price is found
For each condition type in the procedure, the system works through its access sequence from the top. It stops at the first access that finds a valid record, unless the condition type is set to continue searching. Specific records therefore win over general ones.
Reading pricing in an order
Open the item and choose the pricing conditions view. Each line shows a condition type, an amount and a condition value. Check these points when a price looks wrong:
- Is the condition record valid on the pricing date?
- Does the record's key match the customer and material in the order?
- Was the condition changed manually? A manual change blocks automatic redetermination for that condition.
- Is a required condition missing? Procedures often mark a condition as mandatory, and the order shows a pricing error.
The pricing result is stored per item. You can read it in table PRCD_ELEMENTS, which replaced KONV in S/4HANA.
DATA(lv_knumv) = CONV knumv( '0000123456' ).
SELECT kposn, kschl, kbetr, waers, kwert
FROM prcd_elements
WHERE knumv = @lv_knumv
INTO TABLE @DATA(lt_conditions).The number in lv_knumv comes from field KNUMV in the order header (table VBAK).
Exercise
A customer discount record exists for customer 1000 and material M-01, and another for customer 1000 alone. Both are valid. The access sequence lists customer/material first. Which record does the system use, and why?
Show answer
The customer/material record. The system searches accesses in order and stops at the first valid record, so the more specific access wins.
Exercise
Name the object that defines the order in which condition types are processed for an item.
Show answer
The pricing procedure.