SD Pricing Part 7: Pricing Routines — Requirements, Alternative Calculation Types and Base Values
Preview · a free account unlocks the full lesson
Extend pricing logic without modifications: requirement routines that decide whether a condition is determined, alternative calculation type routines that compute the value, alternative condition base value routines, standard examples (2, 10, 11, 16), and how to create and govern custom 9xx routines in VOFM.
In this lessonShow sectionsHide sections
Visual overview
Explanation
Beyond what standard configuration can express, pricing routines let you inject custom logic at specific points in the calculation, and there are three main mechanisms for doing this.
A requirement routine, assigned in the Reqt column of a pricing procedure line, decides whether a given condition is even determined at all — the condition is only evaluated if the routine returns sy-subrc equal to 0, and standard examples include requirement 2, which checks that the item is relevant for pricing at all, while a custom routine might restrict a condition to export customers only, or to certain item categories.
An alternative calculation type replaces the standard rate-times-base calculation entirely with custom logic — the standard example is routine 11, which calculates profit margin as net value minus cost rather than through a rate, and routine 16, which handles tax calculation; a custom version of this might calculate freight as a percentage of value but subject to a minimum charge, or compute a price via some other formula entirely.
An alternative condition base value, by contrast, leaves the calculation method alone but changes what base the rate actually applies to — for example, using net value instead of gross value, or switching to a weight- or volume-based base, with a custom example being a base defined as net value excluding certain other conditions.
Create a free account to keep reading
You have read the opening of this lesson. A free ERPClimb account unlocks the rest of it, every other lesson and topic, and your learning history, so you can pick up exactly where you stopped. No card needed.
- Full explanation
- Code example
- Real project scenario
- Common mistakes
- Best practices
- Interview angle
One tap with Google works too. Every topic keeps its first lesson open to everyone.
Keep exploring
Interview questions on this topic
Related SAP topics
Referenced SAP objects
Reviewed reference pages for the objects this page mentions.
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.