Fundamentals of SAP SD Pricing
Pricing is one of the core concepts in SAP SD and all SD consultants need to know pricing. Just as the name says, SAP SD Pricing is configuring the system to effectively determine the price of a product under different circumstances. The most easiest example to explore pricing is to take a simple grocery bill and expand on it.
Consider this as an extract of a grocery bill. You have purchased some items from the Produce section and some from the stationery section. Your Produce sub-total is 18.00 and your stationery sub-total is 10.00. You have been taxed 10% and your total comes to 27.00 as shown in the picture above.
Let’s just explore on how the pricing is calculated on line item No. 10 – Milk. However, they might not be shown on the bill but are internal to the company selling the product. Let’s explore how a potential bill could be created. As you can see from the picture below, there is a Base Price from the price list – 5.00 . And since the bill is for a retail customer , there is a retail discount of 1.00. So the sub-total for the line item 10 is 4.00.
Condition Type :
The types of calculation ( whether its a price, discount or a tax calculation, and in price – if its a retail price or a wholesale price or a variant price etc ) are called condition type. Normally, condition types of a particular kind are not cumulative – Meaning if there are more than 1 Pricing condition type, they don’t add up – instead the last pricing condition type is taken by the system. There are some exceptions to this however. For example when pricing a car, its the sum of the different pricing condition types that gives you the Price. They are called variant condition types.
A requirement is a piece of code that calculates if a particular condition type should be evaluated or not. This is not necessarily the only way to check if. However, since this involves hard-coding the logic in the system, this functionality should be used sparingly.
For example, the following piece of code says, “If the item is not relevant for pricing – do not price it”. Functional consultants should be aware of the final result SY-SUBRC. SUBRC stands for SUB Routine Return Code. Typically in SAP, a return code of 0 signifies a success. Otherwise its a failure.
* Pricing is turned on in item category configuration (TVAP)
* Pricing is turned on in item category configuration (TVAP)
sy-subrc = 4.
if komp-kposn ne 0.
check: komp-prsfd ca ‘BX’.
check: komp-kznep = space.
sy-subrc = 0.
sy-subrc = 0.
Similarly, the following picture shows a simple requirement. There are 2 types of discount condition types – Retail and Wholesale. If the customer is retail, then apply that discount. If the customer is wholesale, then apply the other discount. So the actual total depends on who the Order’s customer is. The same can be achieved using many different ways, but this is sure one hard-coded way to do it.
A sub-total as the name implies holds temporary totals before the final price is calculated. As shown in the picture below, the Gross price is a sub-total that results from the base price. The Net Price is a sub-total that is arrived at subtracting the Discount percentage off of the Gross Price. There are many additional steps that might be required to arrive at the final price. For example, if the item is taxable, should the tax be applied on the Gross Price or the Net Price..? That actually depends on the business scenario. However, the Sub-totals allow for easily identifying and computing values for further use.
Alternative Calculation Type
The value 5.00 for the Base Price ( shown in the picture above ) is derived based on condition records which we will see much further in the discussion. However, if the condition type should NOT be calculated based on a condition record, but should be calculated based on an external or internal logic, then an alternative calculation routine should be used. Each alternative calculation routine is a 3 digit number between 1 and 999 that contains a piece of code that does some calculation either internally or externally and returns a value. That value will be used to calculate the condition type as opposed to a condition record. A simple example for the same is US Taxes. Taxes in the US and Canada are based on Jurisdiction code. There are around 50000+ jurisdiction codes in the US alone ( Based on all possible variations of City, County, State and District ). And they change continuously. So it is not practical for companies to keep track of the changes in tax rates. There are external tax companies ( Called Tax Vendors ) that only does this. So it is wiser for companies to just call an external tax vendor using a remote function call, get the tax rate as relevant for the corresponding jurisdiction code and return that value to the pricing procedure.
When an invoice is created, the finance departments wants the corresponding Sales, expenses, tax accounts etc to be updated on the fly. The account key in the pricing procedure ( with the help of Account Determination ) helps in identifying which G/L account this should the amount flow into. A simple example could be
|Account Key||Description||Customer A/C Group||Material A/C Group||G/L Account|
This is a flag ( A Check mark ) that is used to signify if the pricing condition type is being used in the calculation or not. For example, the actual cost of the material ( not the price but the cost price ) is available in all pricing procedures, since this is used by Controlling ( CO ) to evaluate profitability. However, the value should not be relevant when pricing to the customer. So, if you need informational condition types for further analysis set them up in the pricing procedure as statistical.
The print flag is another check mar that is used to tell SAP if the particular pricing condition type should be printed on the final bill or not. As discussed in the previous example, the cost condition type should not be printed on the invoice. With the advent of advanced technologies like SmartForms, Adobe Forms etc, this flag has almost no use ( Since what is printed and what is not is decided mostly by these programs ).
SAP Pricing Configuration
Now that we have understood the basic terminology used in Pricing, let’s dig deeper into the configuration. The configuration is very similar to SAP Condition Technique. We will only discuss the rest of the pricing relevant stuff going forward.
Maintain Condition Records
A condition record is actually a row in a database table. The actual database table is defined in the Condition Table assigned to the Access Sequence. Let’s start by creating an condition record for a condition type PR00. The transaction code to create the same is [VK11]. The menu path is [ Logistics -> Sales and Distribution -> Master Data -> Condition -> Select Using Condition Type ]. Enter the pricing condition type, and select the right Condition Table.
Enter the values and save the record. There are some advanced concepts like rebate functionality, condition supplements, scales etc which will not be discussed here.
SAP Pricing DEMO
Let’s start by creating a new sales order for the customer and material that we have created condition records for and see the effect of the condition records on the sales order pricing. A sales order is shown below for Customer 1400 and for the material M-01 that we created the condition record for with a price value PR00 of 50. Select the line item and click on the Nickel button in the bottom ( Pricing button ) to view the pricing details for that line item.
You will be taken to the Line Item’s Condition tab where the pricing details can be viewed specific to that line item. As you can see, the PR00 value is set as 50.00 which is exactly what we have set in the pricing condition record.
Let’s say somebody else has entered the condition record for that material and you have just created the sales order. Now if you want to analyze and backtrack why the pricing is coming up as 50.00 click on the Analysis button as shown below.
A new screen opens up where if you explore the particular condition type ( PR00 in this case ) you will see for which combination ( customer material in this case ) that pricing has been picked up.
You can just click on the area highlighted above to see further details of the condition record. For example, if you click on PR00 above, you will be taken to a new screen that shows you the actual condition record, its validity ( Valid From and Valid To dates ) along with the value for PR00.
This concludes SAP SD Pricing Fundamentals.
Questions & Comments Welcome
Every organization’s Sales is structured in a certain way. This structure needs to be represented in SAP based on pre-defined organizational elements and combine them in a pre-defined way. This method of representing all the different organizational elements of the company in a structured way is called Enterprise Structure. Organizational elements or Org Units for short are a system representation of an actual company organizational unit. For example, an org unit in real life could be a particular product division , or a Sales Office in Seattle, or a manufacturing plant in Boston or a warehouse in Alabama. The following picture shows how an enterprise structure is created in SAP.
Instead of discussing the text book definitions of these organizational units, let’s take a company in real life and discuss the same. However, please do note the cardinality. For example, a company can be linked to multiple company codes as shown in the beginning of the picture above. Let’s take the example of General Electric Healthcare ( or GE Medicals ) and discuss the enterprise structure in detail. We have taken GE just as an example, and this enterprise structure in no way represents GE’s internal structure. In fact, GE Healthcare does not even use SAP as its ERP.
Before discussing the same, let’s look at another pictorial representation of the same picture as above – but with GE’s org units.
GE Medicals is the name of the company. This company has presence across the world. And when GE Healthcare declares profits in the US, it is not just including the US company but the entire world. In SAP parlance, GE Medicals is a Company.
GE Medicals in the US will be run through a legal entity. A company code is an entity that has to report its financials to the government on a timely basis. For example an Incorporated entity can be called a company code. In this case, GE Medicals in the US is being called as a legal entity.
Since the company has presence across the US, there will be sales organizations across the united states responsible for selling goods. For example, the Western division is responsible for selling goods in the Western states. The same organization is also responsible for handling returns, credits, availability of materials etc.
Just as the name speaks, a distribution channel is the sales channel through which products are distributed. In this case, the medical equipment could be sold through the direct channel or through an agency. Each of them will be represented as a distribution channel. A more common example could be Retail or Wholesale.
Division is purely related to the product/service we are selling. Its a grouping of our products. For example all different types of X-Ray machines would fall under the X-Ray division.
The western division of the company might be having multiple sales offices in california. For example there could be one in the bay area and another in Los Angeles
Each sales office contains multiple sales groups who have a fixed set of responsibilities. It could be based on the products that they sell or the type of sales that they perform or the role they play in the actual sale. For example, a sales group could be responsible for selling consumables used in the X-Ray while the field-apps will be responsible for selling the software used in the machines.
A plant is where goods are manufactured. Sometimes, you might not even manufacture anything – Just trade goods. Still you would need a plant. So a plant could be a physical or virtual place where goods are manufactured or stored at a high level. For example, there could be a plant in New Jersey.
Each plant could be associated with multiple storage locations – A place where goods are stored before being sold. For example, the new jersey plant could have storage locations in Edison and Iselin.
A warehouse is an extension of the storage location. While a storage location represents a location where goods are stored, a warehouse goes much further and describes how the goods are sold, the topography of the storage, storage conditions etc. Goods can still be sold without using Warehouse Management, but a sales cannot happen without a storage location.
A combination of the sales organization, distribution channel and division is called the sales area.
Sales Organization + Distribution Channel + Division = Sales Area
The configuration for the enterprise structure is very simple. The Menu path is [ SPRO -> IMG -> Enterprise Structure ]
The first step before doing the configuration is to assess the requirement as to how the company is organized and how best it can be represented in SAP. Each company is run in a different way. Since SAP’s enterprise structure is rigid, you might have to try different things to fit their organization’s model into SAP’s org structure. After you have fully understood the organizational units in the company, start by defining those in SAP. The following picture shows the path of the enterprise structure definition in IMG. While the Company and company codes are defined by FICO consultants, the ones highlighted in red below are absolutely necessary for the functioning of the SAP Sales & Distribution Module.
In normal practice, organization units are normally copied from 0001 . While creating a new organizational unit is easy, there are many associated links in the background that are normally not easy to understand. So it’s always best to copy from 0001. Let’s see an example of how to create a new sales organization.
Click on Define, copy, delete, check Sales Organization under the Sales and Distribution section. Choose the option highlighted below.
Enter the copy button and choose the “From” and “To” sales organizations.
Enter 0001 as the source and target for example is WEST. Thats it and you are done.
Organizational units can be defined in a similar way for the rest of them.
After defining the org elements, we have to assign them to each other to make a meaningful representation of the company’s organizational units. The menu path is [ SPRO -> IMG -> Enterprise Structure -> Assignment ]. Let’s set up a sales area by assigning a distribution channel and division to the sales organization, just as an example. Select “Set up Sales Area”. However, if you are trying to create a sales area with the combination of WEST sales organization that you just created along with a distribution channel of 01 and a division of 01, you will see an error as shown below. The reason being that when WEST sales organization was copied with reference to the sales organization 0001, the assignments were also copied. This is just one of the default assignment – there are many more. So to be on the safer side, its better to copy it and delete all the necessary assignments rather that start from scratch. Otherwise, this is how assignments are created. Assignments can be made similarly based on our first illustration to all other organizational units based on your requirements.
The exact configuration steps are below.
Define the plant New Jersey or Arkansas.
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics General -> Define, Copy, Delete Check Plant ]
Define A division say X-Ray or CT
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics General -> Define, Copy, Delete Check Division]
Define the Sales Organization East, West or South West
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Sales & Distribution -> Define, Copy, Delete,Check Sales Organization]
Define the division say Agency or Direct
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics General -> Define, Copy, Delete Check Distribution Channel]
Define the Sales office , say – Bay Area or Los Angeles
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Sales & Distribution -> Maintain Sales Office]
Define the division say Field Applications or Consumables
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics General -> Maintain Sales Group]
Define the Storage Location say – Edison or Iselin
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition ->Materials Management -> Define Storage Location]
Define the warehouse – Give it any name you like.
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics Execution-> Define, Copy, Delete Check Warehouse Number]
Define the Shipping Point , say – Door1 or Door 2
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics Execution -> Define, Copy, Delete Check Shipping Point]
Define the division say Field Applications or Consumables
Configuration = [ spro -> IMG -> Enteprise Structure -> Definition -> Logistics General -> Maintain Sales Group]
Plant to Company Code
Assign the Plant you have created to the company code 1000.
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Logistics General -> Assign Plant to Company Code ]
Sales Organization to Company Code
Assign the Sales Organization to the company code 1000
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Sales & Distribution -> Assign Sales Organization to Company code]
Distribution Channel to Sales organization
Assign the distribution channel you have created to the sales organization you have created in the definition step.
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Sales & Distribution -> Assign Distribution Channel to Sales Organization]
Division to Sales Organization
Assign the division that you have created to the sales organization .
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Sales & Distribution -> Assign Division to Sales Organization]
Set up Sales Area
Set up Sales area as the combination of Sales Organization, distribution channel and division
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Sales & Distribution -> Set up Sales Area]
Sales Office to Sales Area
Assign the Sales Office Created earlier in the definition step to the Sales Area you created in the previous step.
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment->Sales & Distribution -> Assign Sales Office to Sales Area]
Sales Group to Sales Office
Assign the Sales Group to the Sales Office
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment->Sales & Distribution -> Assign Sales Group to the Sales Office]
Sales Organization + Distribution Channel to Plant
The Sales Organization and Distribution Channel needs to be assigned to Plant.
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Sales & Distribution-> Assign Sales Organization – distribution Channel – Plant]
Warehouse Number to Plant / Storage Location
Assign the Warehouse Number you have created to the Plant and Storage Location combination
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Logistics Execution ->Assign Warehouse Number to Plant/Storage location]
Shipping Point to Plant
Assign the shipping Point to Plant
Configuration = [ spro -> IMG -> Enteprise Structure -> Assignment-> Logistics General -> Assign Shipping Point to Plant]
Questions & Comments Welcome
Each document is either created on its own or created with reference to another document. For example, a sales order can be created with reference to the quotation, whereas the quotation itself can be created on its own. The following diagram illustrates all the possible document flows in SAP.
Transaction Codes Tip: The transaction codes can for the respective document flow configuration transactions can be easily identified by visualizing the picture below. If ‘A’ stands for Sales documents , ‘L’ stands for Deliveries and ‘F’ stands for Billing documents, then the transaction for configuring the Sales document to the delivery document is VTLA. So it is VTXY with X as the target document and Y as the source document.
Let’s see some examples of different types of document flow using examples of standard commonly used sales scenarios.
Sales-to-Sales Document Flow : For example you can create a Sales Order from a Contract or a Quotation.
Sales-to-Delivery Document Flow : For example you can create a standard or a rush delivery from an order. Similarly you can create a consignment delivery from a consignment.
Delivery-to-Billing Document Flow : A standard invoice is created with reference to a delivery.
Billing-to-Billing Document Flow : Invoice cancellations are typically done with respect to the original invoice.
Billing-to-Sales Document Flow : In case of debit memo requests or credit memo requests, the original invoice is used as a reference document.
Without going further, let’s dig a little deeper into the concept of “Reference”. Whenever we mean a document is referencing another document, this means that information is copied over from the previous document into the subsequent document. What is the need for information to be copied over..? There are many reasons for this. For example, this reduces burden on the person entering the subsequent document. Also, this ensures that information is accurately copied over without mistakes.
Let’s take an example. A customer has called us and asked for a quotation. Our sales force has responded with a quotation.
The quotation could contain a bunch of data like who the customer is, his/her internal number with us, date of the quotation, date valid until, prices, discounts, surcharges, taxes, materials, quantity etc.
The customer then places an order referring to the prices in the quote.
During the process of creating the order referring to the quotation a bunch of date needs to be copied. Example data could include prices, customer data, materials and quantity, discounts given etc. In order to do these efficiently copy control routines are used. Copy control configuration is also part of the document flow.
Let’s look at the configuration for a Quotation to a sales order. The rest of the configuration ( Order to delivery , delivery to billing etc ) are very similar.
Menu Path is SPRO -> IMG -> Sales and Distribution -> Sales -> Maintain Copy Control for Sales Documents
Double click on Sales to Sales copy controls.
Select the row corresponding to QT ( Quotation ) as the source document and OR ( Standard Order ) as the target document.
You will be presented with a screen that contains a bunch of numbers. These are either data transfer routines or copy requirements.
Data Transfer Routines : These routines are pieces of code that are either standard or custom written where the logic to transfer the data from the previous to the subsequent documents is placed. For example, Data transfer routine 101 is used to transfer Business Data of the document header from the source to the target document.
Copying Requirements : Copying requirements is again a piece of code that evaluates whether the copy of the data should happen or not. If the conditions in the code re not met, then the document flow is stopped. An example is checking for the same customer – Meaning the order should be placed for the same customer as the quotation has been created for.
Copy Item Number : This copies the line item numbers in the source document to the target document. So, line number 20 in the quotation will exactly be line number 20 in the sales document
Let’s create a quotation and create an order with respect to the quotation to see how this works.
Step 1 : Creation Quotation for customer 1400 and with material M-01
Step 2 : Create a sales order referring this quotation No. 20000035. Enter the transaction [VA01] and click on the “Create with Reference” to enter the quotation with reference to which we wish to create the sales order.
Step 3 : Enter the Quotation Number in Quotation field of the pop-up. As you can see from the pop-up screen, you can create orders with reference to an inquiry, contract, scheduling agreement, a billing document etc.
Step 4 : After creating the quotation, if you want to track back and see with respect to which document the current order has been created, click on the document flow button.
Step 5 : The document flow will be displayed. If deliveries were created with respect to the order, they will also be shown.
Comments and Questions Welcome
Customer Master Customization
Customer master is the primary master data in SAP SD. Typically SAP SD functional consultant will have to customize the customer master at least a little bit to suit the requirements of the project. Since this is very standard data and needs to be synced across systems ( For Example ECC CRM ), SAP allows very little customization to the customer master. Nevertheless, SAP allows full customization in the customer master in terms of fields (Hide, show, grey out fields, make fields mandatory etc)and external interfaces ( Interacting with external tax vendors like Vertex etc ) .
Menu Path is [ SPRO -> IMG -> Logistics General -> Business Partner -> Customers -> Control ]
Configure Field Statuses in Customer Master
Step 1. – The control is defined at the customer account group level. So for a customer type of Sold-to – 0001 , the fields can be customized. Select the Customer Account Group. In this case we have selected the 0001 – Sold-to Party.
Step 2. – A customer master in standard R/3 can have multiple views – General view, company code view and the sales view. Double click on the corresponding text in the Field status tab to customize the specific view.
Step 4. – Fields in the customer master data are grouped into “Status Groups” or “Field Status Groups” . For example, the Address group contains all the fields related to the address data like the name, street name, zip code etc. Select the right field status group.
Step 5 .- Each field can have any of the following 4 statuses – These statuses are self-descriptive.
- Suppress – Do not show the field in the master data.
- Required Entry – Make this field mandatory.
- Optional Entry – Make this field an optional entry.
- Display – Gray out this field.
Here is an example of the customer master “Name” field for the standard customer account group 0001- Sold to party. The little check mark in the name field signifies that the field is indeed mandatory.
Now change the radio button of the first field ( Name 1/Last name ) to Opt. entry.
If you create a new customer now, you can see that the name of the customer will be optional ( As is evident by the lack of the check mark in the Name field )
Please click here for SAP training.
SAP SD Pricing – How to Add Custom Fields to Condition Tables
In SAP condition records store the pricing values. These records are stored in condition tables. Condition tables name has three digits. From 1 to 500 are reserved by SAP name space and from 501 to 999 are given to customer space. In the actual database a persistent data base table is created with “A” prefixed to the table number .i.e. condition table 980 creates a table with name A980.
During the condition table creation required fields can be selected. Only the fields present in the field catalogue are available for selection in the condition table. Fields present in the KOMG table can be added to the field catalogue. By default SAP does not add all the fields of KOMG to field catalogue. KOMG table is a union of KOMP, KOMK tables. KOMK table contains the header information of the document (Sales order or Billing), KOMP contains item level information of the document (Sales order / Billing). New fields can be added to the KOMP, KOMK structures. To add the new fields to these structures, an append structure should not be created. To add a field to KOMP structure, field should be added to KOMPAZ structure, which is an include in KOMP structure. Similarly fields should be added to KOMKAZ structure.
If it is required to create a condition table with a custom field the following steps should be followed.
- Add the field in KOMKAZ or KOMPAZ structure. If the field is at the header level, add the field to KOMKAZ, and if the field is at the item level add to KOMPAZ structure. This step should be done SE11 transaction.
- Activate the structure.
- Add the new field to field catalog.
- Create the condition table.
Adding the field to field catalog and condition table creation can be done VOK0 transaction.
At run time the custom field should be filled with the appropriate value. To to this the following user exits should be used.
USEREXIT_PRICING_PREPARE_TKOMK in RV60AFZZ .
USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ.
Below is an example to add sales representative , who is a partner at item level to KOMP structure.
1. Go to Se11, and add the field WWSR1.
2. Open the program RV60AFZZ using SE38 transaction.
3. Add the field to field catalog. To do this go to VOK0 transaction. Then environment ? condition table ? field catalog.
4. Create the condition table. To do this goto VOK0 transaction. Goto environment-> condition table create. Enter the condition table number 980 .
Once the condition table is created, this table can be used in the access sequence. Access sequence is assigned to the condition type. Condition type is inserted in the required pricing procedure. Condition records can be created in VK11 transaction. All the condition records are created with reference to the condition type. As the condition type is linked to access sequence, and access sequence to condition table, system displays all the condition table assigned to access sequence , in the initial screen. User should select one table, and enter condition records.
Page 4 of 5