1 of 25

Sales and Distribution

2 of 25

Objectives

  • Introduction to:
    • Organizational Data
    • Master Data
      • Customer
      • Material
      • Prices
    • Transaction Data
      • Sales Orders

3 of 25

Pricing

  • SAP uses the condition technique to calculate prices in sales orders. The condition technique is also used in other areas of Sales and Distribution as well as in other modules.
    • Revenue account determination
    • Output determination
    • Text determination

4 of 25

Condition Technique

  • The five components of the condition technique are the following:
    • Procedure
    • Condition Type
    • Access Sequence
    • Condition Table
    • Condition Record

5 of 25

Pricing Procedure

  • The pricing procedure is the step-by-step instruction for calculating the net value of a line item. The pricing procedure is determined by the following:
    • Document type (Inquiry, Quotation, Sales Order)
    • Customer
    • Sales Area

6 of 25

Pricing Procedure

Gross Price

- Customer Discount

- Material Discount

+ Freight

+ Tax

----------------------------------

Net Price

7 of 25

Condition Type

  • The steps (with the exception of sub totals and totals) in the pricing procedure are condition types. They are different classes of pricing. Examples include prices, surcharges or discounts, freight and taxes.
    • Condition types are stored in table T685.

8 of 25

Condition Type

PR00 (Gross Price)

- K001 (Customer Discount)

- K002 (Material Discount)

+ KF00 (Freight)

+ UTX1 (Tax)

----------------------------------

Net Price

9 of 25

Access Sequence

  • The access sequence define the search strategy for condition types. It determines which condition tables are searched and in what sequence.
    • The access sequence for a specific condition type is stored in table T685.

10 of 25

Access Sequence

Condition Type Access Sequence

PR00 PR00 (Gross Price)

K001 K001 (Customer Discount)

K002 K002 (Material Discount)

KF00 KF00 (Freight)

UTX1 UTX1 (Tax)

11 of 25

Condition Table

  • The condition table stores the condition records. The primary keys of condition tables vary so it is possible create different types of pricing records. For example you can a customer specific material price and a material specific price. These two prices are stored in two different condition tables. The naming convention for pricing condition tables is ANNN, where NNN is the condition table number.
    • The condition tables in a specific access sequence are stored in table T682I.

12 of 25

Condition Table

PR00 (Gross Price)                    A001

                                               (Customer/ Material)

                                                 A002

                                                 (Material)

                                                 A003

                                                  (Material Group)

13 of 25

Condition Record

  • The condition record stores the pricing information such validity period (start and end dates) and scales.
    • Condition record header and item information is stored in tables KONH and KONP respectively.

14 of 25

Condition Record

Table A001

Customer 100 Material A-1200 Price $10.00

Customer 100 Material B-1000 Price $15.00

Customer 200 Material A-1200 Price $8.00

Table A002

Material A-1200 Price $12.00

Material B-100 Price $20.00

15 of 25

Pricing Transactions

  • VK11 - Create Prices
  • VK12 - Changes Prices
  • VK13 - Display Prices

16 of 25

SAP Pricing Programs

  • SAP automatically generates a program for every condition table created.
    • The program name is the same for all condition tables, RV13ANNN (where NNN equals the condition table number).
    • The program structure (form routines) is the same for all RV13ANNN programs.

17 of 25

SAP Pricing Programs

  • It is possible to call the form routines in the RV13ANNN programs.

  • General program structure:
    • Select the access sequence for the condition type.
    • Select the condition tables for the access sequence.
    • Move the value of the primary keys to structure KOMG.
    • Call form FILL_VAKEY_FROM_KOMG.
    • Call form ACCESS_SINGLE_USING.

18 of 25

SAP Pricing Programs

  • Select the access sequence for the condition type.
    • Field KVEWE equals A (Pricing) and field KAPPL equals V (Sales and Distribution).

  • Select the condition table for the access sequence.
    • Field KVEWE equals A (Pricing) and field KAPPL equals V (Sales and Distribution).

19 of 25

SAP Pricing Programs

  • Structure KOMG stores allowed fields for condition tables. In other words, this structure stores the possible primary key fields for condition tables. Examples of KOMG fields include:
    • VKORG (Sales Organization)
    • VTWEG (Distribution Channel)
    • SPART (Sales Division)
    • KUNNR (Customer)
    • MATNR (Material)

20 of 25

SAP Pricing Programs

  • Form routine FILL_VAKEY_FROM_KOMG concatenates the primary keys of the condition table into a variable key field (character field, length 100).

21 of 25

SAP Pricing Programs

  • Structure VAKE stores the variable key field as well as other fields used to select condition records from the condition table.
    • Field KAPPL equals V (Sales and Distribution) and field KSCHL equals the condition type.

22 of 25

SAP Pricing Programs

  • Form routine ACCESS_SINGLE_USING selects condition records from the condition table based on values in structures LOW_VAKE and HIGH_VAKE.
    • Structure LOW_VAKE stores the following:
      • KAPPL
      • KSCHL
      • VAKEY
      • DATAB (Low value)
      • DATBI (Low value)
    • Structure HIGH_VAKE stores the following:
      • DATAB (High value)
      • DATBI (High value)

23 of 25

SAP Pricing Programs

  • The first two parameters to ACCESS_SINGLE_USING are form name and program name. After each condition record is selected, program RV13ANNN calls the passed form and program.
    • The form can be a form routine in the custom program. Use the form routine to select header and item data from table KONH and KONP.
      • The primary key to KONH is field KNUMH.
      • The primary keys to KONP are fields KNUMH and KOPOS (always equals 01).

24 of 25

Pricing User Exits

  • The sales order processing program (SAPMV45A) populates two pricing communication structures (KOMK and KOMP) and then calls several function modules to determine the sales order item price.
    • It is possible to modify the pricing communication structures (KOMKAZ and KOMPAZ) and to populate these additional fields in include MV45AFZZ, forms USEREXIT_PRICING_PREPARE_TKOMK and USEREXIT_PRICING_PREPARE_TKOMP.

25 of 25

Pricing Requirements and Formulas

  • In the pricing procedure, it possible to specify requirements and formulas (ABAP/4 programs) for each condition type.
    • Pricing requirements check whether certain business conditions exist. If the conditions do not exist, then the condition type is not applied.
    • Pricing formulas calculate the value of the condition type (the value is not stored as condition record).