When a product is procured from multiple vendors, there is often a variance between the actual purchase price and the standard. This variance in purchase price should be recorded, analyzed, and monitored in detail for improved cost control. Understand how to capture the variance in the standard and actual purchase price in the SAP system.
Key Concept
The purchase price variance in the SAP system is mapped to the PRD transaction key for account determination. The general ledger account for the PRD transaction key is determined on the basis of valuation class and valuation area. Hence, there can only be one purchase price variance general ledger account for a material type in a plant. According to standard SAP design, you can map the cost element for the purchase price variance account to a single cost center by plant in CO. This is a limitation if the requirement is to have more detailed cost control for the purchase price variance. However, some innovative thinking and the use of substitution functionality in the SAP system can provide a resolution to record the purchase price variance at a detailed level in CO.
The standard SAP system records purchase price variance as a two-step process during goods receipt and invoice receipt against a purchase order. You normally record the purchase price variance in FI, but you can also configure your SAP system to record it against cost centers in CO for improved cost analysis and control. Cost analysis of the purchase price variance can provide insights about the costliest vendor, seasonal fluctuations in purchase price based on the standard price, and so on.
I will discuss the standard SAP design for purchase price variance based on the standard price technique. (For more about the standard price technique and its counterpart, the moving average price, see the sidebar “Standard Price vs. Moving Average Price.”) I will also discuss the limitations associated with the standard design. Then I’ll show you how to capture the variance against specific cost centers by using substitution functionality. The screenprints used in this article are from an SAP ERP Central Component (SAP ECC) 6.0 system, but this information is valid for previous versions of SAP as well.
The article is categorized under the following headings for ease of explanation and understanding:
Master Data Prerequisite
The purchase price variance design for procurement is dependent on the standard price. You need to set price control S to enable standard price valuation for the material in the Accounting1 view of the material master using transaction MM03. Maintain the Standard price in the Accounting1 view as well (Figure 1). The standard price is always maintained in the local currency of the company code. (The exception is if material ledger has been activated with multiple currencies. If this is the case, then you can maintain the standard price in multiple currencies.) In Figure 1, I maintained the standard price of US$10 in local currency.

Figure 1
Accounting1 view of the material master
With the standard price as the price control, goods receipt and invoice receipt (GR/IR) result in a purchase price variance if the purchase price and invoice price are different from the standard price. The purchase price variance needs to be explained from a statutory financial reporting perspective. The price variance is explained based on whether the purchased material is still part of the inventory or has been consumed and sold. If the purchased material is still part of material inventory, then the variance belongs to the inventory account in the balance sheet. However, once the material has been consumed and sold, the same variance becomes a part of the cost of goods sold (COGS) in the profit and loss (P&L). The SAP design for purchase price variance, which I’ll discuss in detail later, enables recording the variance in the general ledger. The variance is then transferred from the variance general ledger account to an inventory or COGS account using a manual journal voucher (JV) posting in FI.
From a cost control perspective, you need the purchase price variance postings to flow to CO. To enable this, I use an expense account to record the purchase price variance and also create a cost element for the same (Figure 2). The cost element ensures that you can capture the variance postings in CO using the cost center.

Figure 2
Cost element for the purchase price variance account
Standard SAP Design for Purchase Price Variance
The purchase order is the document created in the SAP system for procurement of goods from the vendor. The purchase order contains a purchase order price that represents a negotiated price for procuring the goods from a specific vendor. When the goods are physically received, a goods receipt is performed against the purchase order. The goods receipt is performed using the 101 movement type in the SAP system. The movement type 101 posts to the general ledger accounts using transaction keys BSX (for inventory posting) and WRX (for GR/IR posting). For a material with price control S, the debit posting to inventory happens at the standard price and the credit posting to GR/IR happens at the purchase order price. If the purchase order price and the standard price are not the same, then it leads to a variance. This purchase price variance is posted to a purchase price variance account using the transaction key PRD. If it is a favorable variance where the purchase price is less than the standard price, it results in a credit posting to the purchase price variance account and vice versa.
Subsequently, an invoice is received against the purchase order that creates a vendor liability. The invoice posting in the SAP system can happen either through evaluated receipt settlement (ERS), electronic data interchange (EDI), or manual posting. However, regardless of the posting method, for a material with price control S the invoice posts a debit to GR/IR at the purchase order price and posts a credit to the vendor at the invoice price. If the invoice and purchase order price are different, it results in a variance that is posted to the purchase price variance account. The SAP system uses transaction key WRX to post to GR/IR and PRD to post to the purchase price variance account.
To enable the purchase order process in the SAP system, you need to configure the transaction keys BSX, WRX, and PRD by following menu path SPRO > Materials Management > Valuation and Account Assignment > Account Determination > Account Determination without wizard > Configure automatic postings. Alternatively, use transaction OBYC. I assigned PRD key to the purchase price variance account PPVACC (Figure 3). Using transaction OBYC, you need to assign the WRX and BSX keys to the INVACC and GRIRCL accounts, respectively.

The account determination configuration allows posting to the general ledger. However, since you have created the purchase price variance account as a cost element, it requires assignment to a CO object for posting. You can configure the default assignment to the cost center by using transaction OKB9 or by following menu path Controlling > Cost Center Accounting > Actual Postings > Manual Actual Postings > Automatic Account Assignment. I configured the PPVACC cost element to be automatically assigned to cost center CCTR (Figure 4).

Figure 4
Default cost center assignment
Standard SAP Design Limitation for Purchase Price Variance
Purchase price variance is the difference between standard price and the price on the actual vendor liability. However, in the SAP system the variance is recorded as a two-step process during goods receipt and invoice receipt against the purchase order. The variance is recorded as the difference between the standard price and purchase order price for goods receipt and the difference between the purchase order price and invoice price for invoice receipt.
Although variance needs to be explained as part of inventory or cost of sales in financial statements, it is not necessarily bad. When recorded appropriately, the variance can provide insights into its source of origin so that you can control cash outflow effectively. You need to capture the variance at an appropriate level. If the variance is captured in one single cost bucket across materials and vendors, then it doesn’t provide any information at all. Similarly, if a variance is captured in multiple cost buckets for each raw material, then it results in data overload.
An appropriate level is one in which you can analyze and act upon the recorded information. For example, it would be meaningful to capture the variance either at a vendor level or for a group of similar materials. You can use the variance information in both these scenarios to understand the specific vendor and material for which prices need better negotiation or for which you need to evaluate another procurement alternative.
The standard SAP system has a limit on the number of cost centers that you can use for recording the variance. This limitation is due to the SAP design interface between inventory accounting and cost flow in CO. According to the SAP design, you can assign only one cost center to the purchase price variance cost element. The cost element is mapped to the purchase price variance general ledger account, which is unique for a plant and valuation class.
Next I’ll consider a business requirement to analyze purchase price variance by vendors. Because different business teams are responsible for different vendors, you need to record the variance into cost centers that are specific to vendors. This is a limitation per the standard design, but I will show you how you can do this using substitution functionality.
Substitution Rule Functionality for Purchase Price Variance
SAP provides substitution functionality for submodules such as FI, cost center accounting, profit center accounting, special purpose ledger, asset accounting, consolidation, project system, and real estate. When a document is posted that is relevant to these submodules, the SAP program goes through the substitution functionality and if an active substitution rule exists, then it is implemented during the posting of the document.
For posting the purchase price variance into multiple cost centers by vendors, I will use this substitution functionality. The SAP system determines the default assigned cost center CCTR from configuration in transaction OKB9 (Figure 4). My objective is to replace the default cost center with a vendor-specific cost center. The cost center to substitute is in the coding block of the financial document. The coding block in the financial document uses structure COBL. This structure is available for use in substitution for cost center accounting, so you need to use the substitution rule for cost center accounting. To define the substitution rule, use transaction OKC9 or follow menu path SPRO > Controlling > General Controlling > Account Assignment Logic > Define Substitution.
To define a substitution rule, you need to decide the event call-up point with which it needs to be associated. The event call-up point determines the point in document processing at which the substitution rule logic is applied. In my requirement, I want to substitute the cost center that is at a line-item level, so I use the event call-up point 1 for document row or line item (Figure 5). The event call-up point is important because if it is wrong, the substitution does not work. The event call-up points are pre-defined by SAP.

Figure 5
Define a substitution rule
A cost center accounting-relevant substitution rule is assigned at the controlling area level, so only one active substitution rule can exist in the system. The substitution rule itself can contain multiple steps. I will now create a step in the substitution rule for my business requirement. I have given a description to step 001 to identify that it is for cost center substitution for vendor A. The substitution step has two parts: prerequisite and substitution. In the Prerequisite section, define the business rule under which the substitution should happen as accurately as possible.
The substitution itself is defined in the substitution part of the rule. Here, check the business logic on the purchase price variance general ledger account, default cost center CCTR, and vendor number for vendor A in the Prerequisite section (Figure 6). If the prerequisite is met, substitute cost center by a constant value of CCTRA. I have defined only one step for this illustration, but the number of steps that you need to define depends on your business requirements.

Figure 6
Define
After defining the steps in the substitution rule, activate it by selecting 1 in the Active field on the screen in Figure 5.
To demonstrate the impact of the substitution rule, I created two goods receipt documents. The first goods receipt document was created with the substitution rule set as active (Figure 7). As described earlier, the general ledger accounts configured for transaction keys BSX, WRX, and PRD have been posted to in the FI document. The purchase price variance account is determined by the PRD key, which is assigned to default cost center CCTR. You can see the same default cost center on the document.

Figure 7
Goods receipt document without substitution rule
The second goods receipt document was created with the substitution rule set as active. This FI document (Figure 8) is similar to the FI document in the previous case (Figure 7), except for the cost center against the purchase price variance general ledger account. The SAP system first determines CCTR as the default assigned cost center from configuration in transaction OKB9 for cost element PPVACC. It then finds a valid substitution rule in which the prerequisite is met and substitutes the cost center to CCTRA. This posting demonstrates that the business requirement to split the purchase price variance into multiple cost centers was successful.

Figure 8
Goods receipt document with substitution rule
The primary objective of recording the purchase price variance into multiple cost centers is to perform a meaningful analysis that can result in improved cost control. You can use transaction KSB1 and execute it by the cost center and cost element of the purchase price variance account. I have executed it using cost center CCTRA for vendor A and cost element PPVACC to get the variance posted for vendor A in the output (Figure 9). The actual variance is a net result of variance on goods receipt and invoice receipt.
To achieve the same, sort the transaction KSB1 output by the purchasing document and line item number and then perform a summation on the amount (i.e., the value in reporting currency). To perform summation, select the Val.in rep.cur. column and press Ctrl+F6. Press Ctrl+Shift+F6 to find the subtotal by purchasing document and item. The report now shows you the price variance. Identify the high-value items from this list and analyze them further to see what needs to be done to bring down this variance. If you need additional data points (e.g., quantity) for your analysis, then download the transaction KSB1 report output in Microsoft Excel and merge this report with a purchase order document report (e.g., transaction ME2M) to get the requisite data points to conduct your analysis.

Figure 9
Analysis of purchase price variance
In my example, I considered the vendor number to be the only basis of allocation for purchase price variance to the cost center. The coding block contains other fields that you could use, such as material group and material number. Which field needs to be used depends on the requirement and the level at which you need to control the purchase price variance.
Keep in mind that once you activate a cost center accounting-based substitution rule, all the CO documents pass through the substitution logic before they are posted in the SAP system. If there are too many steps in the substitution rule, it may slow down the transaction processing for CO document posting and result in performance issues. If you anticipate that the number of steps you need to add to the substitution rule is large, then don’t define a substitution based on the constant cost center value (Figure 6).
Note
Another option is to perform a substitution of a cost center on the basis of a user exit. The option to select a constant value or user exit is provided at the time you define the substitution step. You can create a custom table containing the business rule for the mapping and reference this custom table in the user exit. This way you can define multiple substitutions in a single step. However, a user exit requires you to add custom code to the SAP system and should be avoided unless necessary.
Standard Price vs. Moving Average Price
SAP provides the standard price and the moving average price as the two valuation techniques for the inventory of stock. You can activate a specific valuation technique using the price control field in the material master. A price control of S is used for the standard price and V is used for the moving average price. For price control S, the standard price is maintained in the Accounting1 view of the material master. With the standard price technique, the inventory is valued at the standard price itself. If the purchase price is different from the standard price, it results in a variance.
The moving average price, on the other hand, is a value that is computed with each relevant goods movement. Moving average price can only be updated by the SAP system on the basis of the weighted average computation. The inventory value in the case of moving average price is the cumulative sum of the value on the goods receipts less issues. Conceptually, there is no meaning of variance with moving average price.
Whether to use the standard price or moving average price technique for inventory valuation is a business decision. However, standard price provides better cost management, which is always a main focus. It is also useful to have a standard price benchmark because it facilitates the decision on make versus buy and from whom to buy.
Akhilesh Mittal
Akhilesh Mittal is a lead SAP consultant at Infosys Technologies Ltd. with eight years of consulting and industry experience. He has experience in FI and CO along with exposure to SD. Akhilesh is currently a consultant in the SAP space for a leading organization in the high technology domain. He has a degree in electronics and communication engineering from IIT Guwahati and an MBA in finance and systems from IIM Lucknow.
You may contact the author at akhileshmittal@yahoo.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.