Mastering SAP SD for S/4HANA
Complex Condition Technique
The Architecture of Price
In any large business, pricing is never just one number. It's a complex web of rules: customer-specific discounts, regional taxes, promotional offers, and material surcharges. Manually managing this would be impossible. SAP's Sales and Distribution (SD) module uses a powerful engine called the Condition Technique to automate this entire process.
Think of it as a systematic search for the right price. Instead of hard-coding prices, SAP follows a configurable path to determine every single value in a sales order's pricing, from the gross price down to the net total. This logic is built from several interconnected components, each with a specific job.
This structure provides immense flexibility. Let's break down how these pieces work together to build a sophisticated search strategy.
Building the Search Strategy
The foundation of any pricing rule is data. What information determines the price? Is it the customer? The product? The quantity? The region? The first step is to know what fields are available to build these rules.
-
Field Catalog: This is simply a repository of all fields that can be used for pricing. SAP provides a large standard catalog, but you can add custom fields as well. It’s the menu of options from which you'll choose your ingredients.
-
Condition Tables: Here, you combine fields from the catalog to create a key. This key defines the specificity of a price. For example, a simple table might only use the
Materialfield. A more complex one might useSales Organization+Customer+Materialto define a price for a specific material sold to a specific customer in a specific region. -
Access Sequence: This is the search strategy itself. An access sequence is an ordered list of condition tables. When SAP needs to find a price, it checks the tables in the sequence, one by one, from most specific to least specific. For instance, it might first look for a Customer/Material specific price. If it doesn't find one, it then looks for a general Material price. The first valid record it finds is the one it uses.
A crucial setting in the Access Sequence is the 'Exclusive' indicator. If this is checked for an access (a line pointing to a condition table), SAP stops searching as soon as it finds a valid record in that table. This prevents it from overwriting a more specific price with a more general one found later in the sequence.
Once the search strategy is defined, you need to define what SAP does with the value it finds and how it all fits together.
Fine-Tuning the Calculation
The Access Sequence finds the data. The next components determine what that data represents and how it's used in the final calculation.
Condition Types are the specific elements of a price, like a base price (PR00), a customer discount (K007), or sales tax (MWST). Each condition type that needs to look up a value is assigned an Access Sequence.
Finally, the Pricing Procedure is the master calculation schema. It's a sequence of steps that brings all the condition types together in the correct order to arrive at a final net value. It dictates the entire flow: start with the base price, subtract discounts, add surcharges, calculate tax, and so on.
Step | Cntr | C. Type | Description | From | To
---- | ---- | ------- | ------------------ | ---- | --
10 | 1 | PR00 | Price | |
20 | 1 | K007 | Customer Discount | 10 |
... | ... | ... | ... | ... |...
90 | 1 | | Net Value | 10 | 89
100 | 1 | MWST | Output Tax | 90 |
This framework allows for powerful customizations to handle complex business rules.
Condition Exclusion
noun
A mechanism that prevents the system from applying multiple, conflicting discounts to the same item by comparing conditions and applying only the most favorable one for the customer.
Imagine a customer is eligible for both a 10% seasonal promotion and their standard 5% partner discount. You likely don't want to give them both. Condition Exclusion solves this. You can group certain condition types together and tell SAP to apply only the best (i.e., biggest) discount from that group, preventing unwanted discount stacking.
Another useful tool is the Condition Supplement. This allows you to automatically add a secondary condition whenever a primary one is found. For example, every time the base price (PR00) for a certain material is determined, you can configure a supplement to automatically add a fixed freight surcharge.
For even more granular control, SAP allows the use of ABAP routines:
-
Requirement Routines: These are small programs that act as gatekeepers. A condition type will only be processed if the requirement is met. A classic example is routine '2' (
Item with pricing), which ensures a condition is only active for items that are relevant for pricing. -
Alternative Calculation Types & Base Values: These routines allow you to override SAP's standard calculations. Instead of a simple percentage, an 'Alternative Calculation Type' could calculate a discount based on a custom formula. An 'Alternative Base Value' could change the base amount on which a discount is calculated, for example, using the material's weight from the material master instead of its price.
Mastering the condition technique is key to leveraging the full power of SAP SD. By understanding how to structure these components, you can configure a pricing system that is robust, automated, and perfectly aligned with your business's logic.