Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 36 ยท Logistics: MM/SD

The Pricing Condition Technique

Learn how SAP calculates prices: condition types, condition tables, access sequences, condition records and the pricing procedure, with a runnable stand-in.

When you enter a material and a quantity in a sales order, SAP instantly fills in a price, discounts, freight and tax. It does not hard-code any of this. It uses the condition technique, a general mechanism that finds data (prices, discounts, surcharges, taxes) by searching rule-driven tables. The same technique is reused for purchasing prices, output determination (which form to print) and account determination, so understanding it pays off in many areas.

This lesson explains each building block and then lets you build a small pricing engine as a stand-in in JavaScript. The real configuration is done in the IMG (Implementation Guide) and the real prices are maintained in the system, which cannot run here.

The building blocks

flowchart TD
  PP["Pricing procedure<br/>(calculation schema)"] --> CT["Condition type<br/>PR00, K007, ..."]
  CT --> AS["Access sequence"]
  AS --> TB["Condition table<br/>(key fields)"]
  TB --> CR["Condition records<br/>(actual values)"]

From top to bottom: the procedure lists the steps, each step is a condition type, each type searches with an access sequence, each access reads tables of condition records.

Condition type. Identifies one kind of price element, for example PR00 (list price), K007 (customer discount), K004 (material discount), KA00 (sales-order-only price), HD00 (freight) and MWST (output tax; in many systems this is the tax condition type used by the tax procedure). Its settings say whether it is a price, a discount (a negative amount), a surcharge, whether it is a percentage, or whether it may be entered manually.

Condition table. Defines the key fields of a lookup, such as Customer + Material, or Price list + Material, or just Material. The table number is A plus three digits, for example A304.

Access sequence. An ordered list of condition tables to try. SAP starts at the most specific table (Customer + Material) and moves to more general ones (Material only) until it finds a record. The first match wins, unless the access is set to continue.

Condition record. The real data: "customer 1000, material M-01: 9.50 per piece, valid 1 Jan to 31 Dec". You maintain records in VK11 (create), VK12 (change) and VK13 (display).

Pricing procedure. An ordered schema (formerly calculation schema, standard RVAA01) of steps. Each step has a step number, the condition type, a from/to reference to subtotals, and a requirement. The procedure is picked by sales area, document pricing procedure and customer pricing procedure.

A worked example

TEXT
Step  Condition type  Description          From  Notes
10    PR00            List price
20    K007            Customer discount           percentage, negative
30    K004            Material discount           percentage, negative
100   (subtotal)      Net value
110   HD00            Freight
200   MWST            Output tax           100    percentage of net value

For 10 pieces with list price 100.00, a 5 percent customer discount and a freight charge of 20.00, the net before freight is 950.00 and the gross depends on tax.

Building the engine

The stand-in below implements all four pieces: condition records, access sequences with "most specific first", and a procedure that applies the steps in order.

JS Stand-in: condition technique in 40 lines

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Customer C-1000 gets the special price from the more specific table and the discount; customer C-2000 falls through to the general list price. That fall-through is the heart of the technique.

Condition features worth knowing

  • Validity dates: every record has a valid from/to. SAP picks the one valid on the pricing date.
  • Scales: a record can hold a scale (1 to 9 pieces: 10.00, 10 or more: 9.00), maintained in the condition record.
  • Exclusion groups: only the best of several discounts applies.
  • Condition supplement: attaches extra conditions (for example a surcharge) to a main condition.
  • Pricing date and re-determination: Edit > New pricing in the order (types B, C, G and others) recalculates prices.
  • Condition exclusion by procedure steps means you can prevent a customer discount from stacking with a promotion.

Where the technique appears elsewhere

Area Condition technique used for
SD pricing Prices, discounts, taxes
MM purchasing Purchase prices (PB00, PBXX)
Output determination Which order confirmation to print or mail
Credit and free goods Rules that depend on key combinations

Debugging a price

In the sales order, open an item and its Conditions tab, then use the analysis function (the magnifying glass icon) to see which access found which record. If a price is missing, the usual suspects are: no condition record for the key, an expired validity date, a wrong pricing procedure determination, or an access sequence that does not contain the right table.

JS Stand-in: price lookup with validity dates

Press Run (or Ctrl + Enter) to see the console output here.

No output.

You will use these ideas again in Project: A Pricing Engine. The sales context for the result is in Order-to-Cash in SAP SD.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the role of an access sequence?

    An access sequence tries condition tables from most specific to most general and stops at the first record found.
  2. 2. Which tcode creates a condition record?

    VK11 creates condition records, VK12 changes them and VK13 displays them.
  3. 3. What is a pricing procedure?

    The pricing procedure (calculation schema) lists steps and decides how the net price is built.
  4. 4. A price is missing in an order. Which is a likely cause?

    Missing or expired condition records, or a missing table in the access sequence, are the classic causes.

Summary

  • The condition technique finds prices, discounts and taxes with rules instead of code.
  • Condition type, condition table, access sequence, condition record and pricing procedure each have one job.
  • The most specific matching record wins; general records are the fallback.
  • Validity dates and scales are part of every record.
  • The same technique drives purchasing prices and output determination.

Next: Transports and the System Landscape