Sunteți pe pagina 1din 25

Sales and Distribution

Objectives

● Introduction to:
o Organizational Data
o Master Data
 Customer
 Material
 Prices
o Transaction Data
 Sales Orders
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.
o Revenue account determination
o Output determination
o Text determination
Condition Technique

● The five components of the condition technique are the


following:
o Procedure
o Condition Type
o Access Sequence
o Condition Table
o Condition Record
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:
o Document type (Inquiry, Quotation, Sales Order)
o Customer
o Sales Area
Pricing Procedure

Gross Price
- Customer Discount
- Material Discount
+ Freight
+ Tax
----------------------------------
Net Price
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.
o Condition types are stored in table T685.
Condition Type

PR00 (Gross Price)


- K001 (Customer Discount)
- K002 (Material Discount)
+ KF00 (Freight)
+ UTX1 (Tax)
----------------------------------
Net Price
Access Sequence

● The access sequence define the search strategy for condition


types. It determines which condition tables are searched and in
what sequence.
o The access sequence for a specific condition type is stored in
table T685.
Access Sequence

Condition Type Access Sequence

PR00 PR00 (Gross Price)


K001 K001 (Customer Discount)
K002 K002 (Material Discount)
KF00 KF00 (Freight)
UTX1 UTX1 (Tax)
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.
o The condition tables in a specific access sequence are stored in
table T682I.
Condition Table

PR00 (Gross Price) A001


(Customer/ Material)

A002
(Material)

A003
(Material Group)
Condition Record

● The condition record stores the pricing information such


validity period (start and end dates) and scales.
o Condition record header and item information is stored in tables
KONH and KONP respectively.
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
Pricing Transactions

● VK11 - Create Prices


● VK12 - Changes Prices
● VK13 - Display Prices
SAP Pricing Programs

● SAP automatically generates a program for every


condition table created.
o The program name is the same for all condition tables,
RV13ANNN (where NNN equals the condition table number).
o The program structure (form routines) is the same for all
RV13ANNN programs.
SAP Pricing Programs

● It is possible to call the form routines in the RV13ANNN


programs.

● General program structure:


o Select the access sequence for the condition type.
o Select the condition tables for the access sequence.
o Move the value of the primary keys to structure KOMG.
o Call form FILL_VAKEY_FROM_KOMG.
o Call form ACCESS_SINGLE_USING.
SAP Pricing Programs

● Select the access sequence for the condition type.


o Field KVEWE equals A (Pricing) and field KAPPL equals V (Sales
and Distribution).

● Select the condition table for the access sequence.


o Field KVEWE equals A (Pricing) and field KAPPL equals V (Sales
and Distribution).
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:
o VKORG (Sales Organization)
o VTWEG (Distribution Channel)
o SPART (Sales Division)
o KUNNR (Customer)
o MATNR (Material)
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).
SAP Pricing Programs

● Structure VAKE stores the variable key field as well as


other fields used to select condition records from the
condition table.
o Field KAPPL equals V (Sales and Distribution) and field KSCHL
equals the condition type.
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.
o Structure LOW_VAKE stores the following:
 KAPPL
 KSCHL
 VAKEY
 DATAB (Low value)
 DATBI (Low value)
o Structure HIGH_VAKE stores the following:
 DATAB (High value)
 DATBI (High value)
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.
o 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).
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.
o 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.
Pricing Requirements and Formulas

● In the pricing procedure, it possible to specify


requirements and formulas (ABAP/4 programs) for each
condition type.
o Pricing requirements check whether certain business conditions
exist. If the conditions do not exist, then the condition type is not
applied.
o Pricing formulas calculate the value of the condition type (the value
is not stored as condition record).

S-ar putea să vă placă și