Sub topic 6
Pricing with the condition technique
This chapter explains how SAP SD calculates the price of a sales order item. It assumes you know the sales order structure from the previous chapter (header, items, schedule lines). It also assumes you can read basic SQL, and you know that customer, material and organizational data come from master data. By the end you should be able to explain why an item got a given price, and to find the cause when it did not.
Why SAP uses a condition technique
A price in SAP is rarely one number. A net price can depend on the material, the customer, the quantity, the date, the sales organization and the shipping terms. Hard-coding those rules would make every change a development task. The condition technique avoids this by storing the rules as data that business users maintain.
The same technique also drives output determination, account determination and text determination, so it is worth learning once. Here it is applied to pricing.
The building blocks
Pricing uses five objects. Each one answers a different question.
| Object | Question it answers | Example |
|---|---|---|
| Condition type | What kind of price, discount or surcharge is this? | PR00 (price), K007 (customer discount), MWST (output tax) |
| Condition table | Which fields identify a valid record? | Customer / Material |
| Access sequence | In what order are condition tables searched? | Customer/Material, then Price list/Material, then Material |
| Condition record | What is the actual value and validity? | 95.00 EUR per 1 PC, valid 2026-01-01 to 2026-12-31 |
| Pricing procedure | Which condition types are used, in what order, with what calculation? | RVAA01 |
The first four are about finding one value. The pricing procedure is about combining all the values into a final price.
Condition types
A condition type is a customizing entry that defines how a line behaves. Important settings include:
- The condition class. Examples are prices, discounts or surcharges, and taxes.
- The calculation type. Examples are a fixed amount, a percentage, or an amount per quantity unit.
- The access sequence that finds its records.
- Whether it may be changed manually in the order, and whether it is a header or an item condition.
Common standard types are PR00 (price), K004 (material discount), K005 (customer/material discount), K007 (customer discount), KA00 (sales promotion), HA00 (percentage discount from gross), and MWST (tax).
Access sequences and condition tables
A condition table is a list of key fields, such as Sales Organization, Distribution Channel, Customer, Material. Condition records are stored with exactly those keys, so one table holds records of one granularity.
An access sequence is an ordered list of condition tables. The system reads them from the most specific to the most general, and it stops at the first record it finds. This is how a special customer price wins over a general list price.
If no table in the sequence yields a record, the condition type gets no value. For a mandatory condition such as PR00, the order is then incomplete in pricing.
Condition records
You maintain condition records in transaction VK11 (create), VK12 (change) and VK13 (display). In S/4HANA you can also use the Fiori app "Manage Prices - Sales" for many price types. A record holds:
- The key fields from the condition table.
- The amount or percentage, currency, pricing unit and unit of measure.
- The validity period.
- Optional scales, for example a lower price per piece above 100 pieces.
Scales matter in practice. A scale can be a from-scale (the whole quantity gets the price of the highest reached step) or a to-scale (each step is priced separately). The scale basis can be quantity, value or weight.
The pricing procedure
The pricing procedure is a numbered list of condition types. It acts like a calculation sheet. For each line, the system runs the access sequence, finds the value, and then applies the calculation rules in order.
A simplified version looks like this:
| Step | Condition type | Description | From | Subtotal |
|---|---|---|---|---|
| 10 | PR00 | Price | ||
| 20 | K007 | Customer discount (%) | 10 | |
| 30 | Net value 1 | A | ||
| 40 | KF00 | Freight | ||
| 50 | Net value 2 | B | ||
| 60 | MWST | Output tax | 50 |
Important columns include:
- From / To. The condition types whose results form the base for a percentage. K007 above is calculated on the value from step 10.
- Subtotal. Stores an intermediate result in a field, for example the net value that later goes to the item.
- Requirement. A routine that decides whether the step applies.
- Statistical. The condition is shown but does not change the net value.
- Account key. Links the condition to revenue account determination in billing (see the chapter on accounting integration).
A negative condition, such as a discount, reduces the value. A positive one, such as a surcharge, increases it.
How the procedure is selected
The system determines the pricing procedure from three keys:
- The sales area (sales organization, distribution channel, division).
- The customer's pricing procedure indicator, set in the customer master sales data.
- The document pricing procedure, which is set on the sales document type.
If an order shows a procedure you did not expect, check these three assignments before touching the procedure itself.
When pricing runs
Pricing runs when you create an item, and again when something relevant changes, for example quantity, material or pricing date. The sales order keeps the result in item conditions. You can see them with the item's Conditions tab.
Two options control what happens to existing prices:
- Carry out new pricing discards the manual conditions you entered and recalculates everything.
- Copy manual pricing elements keeps manual entries and recalculates the rest.
Billing can copy the pricing from the order or redetermine it. The setting is in the copying control between order and billing document. This matters for delivery lead times: a price valid at order entry may have changed by billing time.
Reading the result in the order
In the item's condition screen, each line shows the condition type, the amount, the condition value, and a status. Use the analysis function (the Analysis button) to see why a condition was or was not found. The analysis lists each access, the key used, and the result.
Typical reasons for a missing condition are:
- No record exists for the key combination.
- The record is valid for another date. The pricing date is normally the requested delivery date or the order date, depending on customizing.
- The customer's pricing procedure indicator or the material's pricing-relevant fields (such as the material pricing group) differ from the record.
- A requirement routine on the step excludes it.
- The record is blocked or deleted.
Checking prices in the database
Condition values of an order are stored in the document condition table PRCD_ELEMENTS in S/4HANA. Before S/4HANA 1909 the table KONV was used, and you should check which one your release provides. This example reads the item conditions for the order used in earlier chapters.
DATA(lv_knumv) = VALUE knumv( ).
SELECT SINGLE knumv
FROM vbak
WHERE vbeln = '0000012345'
INTO @lv_knumv.
SELECT kposn, kschl, kbetr, waers, kpein, kmein, kwert
FROM prcd_elements
WHERE knumv = @lv_knumv
ORDER BY kposn, kschl
INTO TABLE @DATA(lt_conditions).The header table VBAK holds the condition number KNUMV. The condition table is read with that number. KSCHL is the condition type, KBETR the rate or amount, and KWERT the condition value. Compare the result with the item's condition tab to confirm what the order screen shows.
Common errors
- "Pricing: condition PR00 is missing." No record was found. Run the analysis and create the missing record, or correct the key field that does not match.
- Wrong discount appears. Two records match, and the access sequence found the more specific one first. Check the sequence order.
- Discount applies twice. Two condition types give the same discount and both are in the procedure. Use an exclusion group in the condition type or remove one step.
- Price changes at billing. The billing copy control redetermines pricing, or a manual price in the order was lost.
- Tax is missing. Tax comes from tax determination, which depends on the ship-from country, the ship-to country and the tax classification of customer and material. It is not a normal condition record lookup.
Summary of the flow
Exercise
A customer has a special price record for material M-100 at 90 EUR. The general material price record is 100 EUR. Both are valid today. The order shows 100 EUR. Name two things you would check.
Show answer
First, check whether the access sequence for PR00 contains the customer/material table before the material table. If the order of the sequence is reversed, the general record is found first. Second, run the pricing analysis in the item conditions to see which key was used, and check that the customer's pricing procedure indicator, the sales area and the validity date match the special record. A mismatch in any key field means the special record is never found.
Exercise
An item shows a 10% customer discount (K007) of 10.00 EUR on a price of 100.00 EUR. The procedure lists K007 with From = 10. Someone adds a freight condition at step 40 with no From value. What is the base of K007, and what does it mean if you set K007 to From = 40 instead?
Show answer
With From = 10, K007 uses the value of step 10 (PR00, 100.00 EUR) as its base, so 10% gives 10.00 EUR. If From = 40, the base would be the freight value, so the discount would be calculated on freight instead of the price, which is normally wrong. The From column defines the base of a percentage, so it must point at the step whose value should be discounted.