Summary
This note describes how the cumulation of scale base values is made for group conditions at the level of the entire document (including an example).
This includes a detailed look at the necessary quantity conversions and the involved
- a) Units of measure
- b) Quantities (Bases)
- c) Conversion factors
- d) Conversion modules
The note thus also provides generally valid information about the process of quantity conversions in the pricing, independent of cumulated scale
Summary of content:
The note deals with the following topics in detail:
1. Which scales can be cumulated?
2. Involved units of measure
3. Involved quantities
4. What are cumulated scale base values?
5. Which Customizing settings are necessary?
6. Which individual steps does the pricing execute?
7. Which conversion modules are used?
8. Which conversion factors are used?
9. In which programs does the conversion logic occur?
10. Example
11. Is it also possible to cumulate value scales?
-
1.
Which scale base values can be cumulated?
Only the scale base values of scales with scale base type (field KZBZG) 'C' (Quantity scale) can be cumulated. See also section 11.
-
2.
Involved units of measure:
Unit of measure Field name in the pricing
Sales unit of measure KOMP-VKRME
Base unit of measure KOMP-MEINS
Condition unit of measure XKOMV-KMEIN
Scale unit of measure XKOMV-KONMS
Cumulation unit of measure KOMT1-GRMEN (or GKOMV-KEY-KONMS)
-
3.
Involved quantities:
Quantity Field name in pricing
Sales quantity KOMP-MGAME
'Quantity in base unit of measure' local variable
Condition basis XKOMV-KAWRT
Overall scale base value GKOMV-KSTBS
Scale base value XKOMV-KSTBS
-
4.
What are cumulated scale base values?
With the help of cumulated scale base values, you can make scale base values of condition records with different scale units of measure (XKOMV-KXKOMV-KSTBS) to a common cumulation unit of measure (KOMT1-GRMEN). Since cumulation unit of measure (KOMT1-GRMEN), they can be added and you receive the scale base value at document level (GKOMV-KSTBS) in the cumulation unit of measure (KOMT1-GRMEN). This overall scale base value is then calculated back again to the scale unit of measure (XKOMV-KONMS) of the condition record for each condition record. This scale base value in scale unit of measure (XKOMV-KONMS) is then used for the determination of the scale level of the condition record. The condition rate of this scale level is finally used for the pricing.
-
5.
Which Customizing settings are necessary?
Make the following settings in Customizing of the affected condition type (for example, Transaction V/06, M/06).
- a) Select the 'Group cond.' checkbox (KGRPE) in the 'Group condition' block.
- b) Enter a group key routine in the 'Group condition' block for the 'GrpCond.routine' field (GRLNR) (for example: group key routine '01'). The grou GKOMV_KEY structure) is filled. This ensures that the condition record number KNUMH is deleted (among other fields), which is necessary for a cumulation of the scale base values of different condition records. This is because the condition record number is a split criterion during the processing of group conditions (see also Note 24944).
-
c) In the 'Scales' block, maintain the cumulation unit of measure for the 'Unit of measure' field (GRMEN).
-
c) In the 'Scales' block, maintain the cumulation unit of measure for the 'Unit of measure' field (GRMEN).
-
6.
Which individual steps does the pricing execute?
Of course, if 'source unit of measure' and 'target unit of measure' are identical in one of the following steps, a conversion is not necessary.
Exception: During the determination of the condition basis, in the case of calculation type 'C', 'M', 'N', 'O' or 'P', the conversion is unit of measure and condition unit of measure are the same, unless the 'Quantity conversion' checkbox (field KMENG) is selected in Customizing of the affected condition type.
- a) First, there is one item pricing run for each item:
- For this purpose, the condition basis (XKOMV-KAWRT) at item level is first determined in condition unit of measure (XKOMV-KMEIN):
Quantity KOMP-MGAME ====> local var. ====> XKOMV-KAWRT
(1) (2)
Unit of measure KOMP-VRKME ====> KOMP-MEINS ====> XKOMV-KMEIN
- (1) Conversion of the sales quantity (KOMP-MGAME) of the item material from sales unit of measure (KOMP-VKRME) to base unit of measure (KOMP-MEINS).
- (2) Conversion of the sales quantity of the item material from base unit of measure (KOMP-MEINS) to condition unit of measure (XKOMV-KMEIN).
- Then the scale base value (XKOMV-KSTBS) at item level is determined in scale unit of measure (XKOMV-KONMS):
Quantity KOMP-MGAME ====> local var. ====> XKOMV-KSTBS
(3) (4)
Unit of measure KOMP-VRKME ====> KOMP-MEINS ====> XKOMV-KONMS
- (3) Conversion of the sales quantity (KOMP-MGAME) of the item material from sales unit of measure (KOMP-VKRME) to base unit of measure (KOMP-MEINS).
- (4) Conversion of the sales quantity of the item material from base unit of measure (KOMP-MEINS) to scale unit of measure (XKOMV-KONMS) of the c
- Due to the (temporarily) determined scale base value (XKOMV-KSTBS) at item level, the corresponding (temporary) condition rate (XKOMV-KBETR) is determined.
- The (temporary) condition value (XKOMV-KWERT) is determined by multiplying the condition basis (XKOMV-KWART) with the (temporary) condition rate (XKOMV-KBETR).
- a) The actual processing of the cumulated scale base values then occurs within the framework of the determination of total price (function module P
- Cumulation of the item scale base values (XKOMV-KSTBS) in different scale units of measure (XKOMV-KSTBM) for the overall scale base value (GKOMV-KSTBS) in cumulation unit of measure (KOMT1-GRMEN):
Quantity XKOMV-KSTBS ====> local var. ====> GKOMV-KSTBS
(5) (6,7)
Unit of measure XKOMV-KONMS ====> KOMP-MEINS ====> KOMT1-GRMEN
- (5) Conversion of the scale base value (XKOMV-KSTBS) of the item from scale unit of measure (XKOMV-KONMS) to base unit of measure (KOMP-MEINS).
- (6) Conversion of the scale base value of the item from base unit of measure (KOMP-MEINS) to cumulation unit of measure (KOMT1-GRMEN).
- (7) Addition of the scale base value (XKOMV-KSTBS) of the item in cumulation unit of measure (KOMT1-GRMEN) to the so far cumulated overall scale base value (GKOMV-KSTBS) in cumulation unit of measure (KOMT1-GRMEN).
- At the end of the determination of total price, an item pricing with pricing type 'F' is carried out for every document item. In this pricing ru unit of measure (KOMT1-GRMEN) is converted to the scale unit of measure (XKOMV-KONMS) of the respective item:
Quantity XKOMV-KSTBS <==== local var. <==== GKOMV-KSTBS
(9) (8)
Unit of measure XKOMV-KONMS <==== KOMP-MEINS <==== KOMT1-GRMEN
- (8) Conversion of the overall scale base value (GKOMV-KSTBS) in cumulation unit of measure (KOMT1-GRMEN) to the base unit of measure (KOMP-MEINS) of the material item.
- (9) Conversion of the overall scale base value of the item from base unit of measure (KOMP-MEINS) to scale unit of measure (XKOMV-KONMS) of the
- Due to the (finally) determined scale base value (XKOMV-KSTBS) at item level, the corresponding (final) condition rate (XKOMV-KBETR) is determined.
- The (final) condition value (XKOMV-KWERT) is determined by multiplying the condition basis (XKOMV-KWART) with the (final) condition rate (XKOMV-KBETR).
- The (final) condition value (XKOMV-KWERT) is determined by multiplying the condition basis (XKOMV-KWART) with the (final) condition rate (XKOMV-KBETR).
- 7. Which conversion modules are used?
- a) In SD (application 'V'), the conversion modules 'MATERIAL_UNIT_CONVERSION' (include LMAMEU03) and 'UNIT_CONVERSION_WITH_F if the required conversion factors already exist (in XKOMV or KOMP). The former conversion module is called if the required conversion factors are not yet known. This conversion module determines the conversion factors from the material master, carries out the quantity conversion and can return the used conversion factors in addition to the converted quantity.
-
b) There is a different process in the purchasing (applications 'M' and 'MS'). Here, the conversion from 'source unit of measure' to 'target unit of measure' is
not carried out in
a triangulation
(using the base unit of measure) by calling a conversion module twice . In the purchasing, you carry out the conversion
directly by a single call of the 'RM_CONDITION_UNIT_CHECK' conversion module (include LV61AU14).
-
b) There is a different process in the purchasing (applications 'M' and 'MS'). Here, the conversion from 'source unit of measure' to 'target unit of measure' is
not carried out in
a triangulation
(using the base unit of measure) by calling a conversion module twice . In the purchasing, you carry out the conversion
directly by a single call of the 'RM_CONDITION_UNIT_CHECK' conversion module (include LV61AU14).
- 8. Which conversion factors are used?
- a) For the conversion between sales unit of measure (KOMP-VRKME) and base unit of measure (KOMP-MEINS), the conversion factors KOMP-UMVKZ and KOMP-UMVKN are relevant [step (1) and (3)].
- b) For the conversion between base unit of measure (KOMP-MEINS) and condition unit of measure (XKOMV-KMEIN), the conversion factors XKOMV-KUMZA and XKOMV-KUMNE are relevant [step (2)].
-
c) For the quantity conversions in steps (4), (5), (6), (8) and (9), there are no fields for the admission of the required factors in the internal table XKOMV or the database table KONV.
Therefore, in general (exceptional cases are listed below), the 'MATERIAL_UNIT_CONVERSION' module is used for the conversion, which determines the required conversion factors itself. However, they are not returned since they cannot be saved (as mentioned).
The 'UNIT_CONVERSION_WITH_FACTOR' module is used in the following cases:
-
c) For the quantity conversions in steps (4), (5), (6), (8) and (9), there are no fields for the admission of the required factors in the internal table XKOMV or the database table KONV.
- For the conversion in step (4), the conversion factors XKOMV-KUMZA and XKOMV-KUMNE are used if condition unit of measure (XKOMV-KMEIN) and scale unit of measure (XKOMV-KONMS) are the same.
- For the conversion in the steps (6) and (8), the conversion factors XKOMV-KUMZA and XKOMV-KUMNE are used if condition unit of measure (XKOMV-KMEIN) and cumulation unit of measure (KOMT1-GRMEN) are the same.
- For the conversion in the steps (5) and (9), the conversion factors KOMP-UMVKZ and KOMP-UMVKN are used if sales unit of measure (KOMP-VRKME) and scale unit of measure (XKOMV-KONMS) are the same.
- For the conversion in the steps (5) and (9), the conversion factors KOMP-UMVKZ and KOMP-UMVKN are used if sales unit of measure (KOMP-VRKME) and scale unit of measure (XKOMV-KONMS) are the same.
- 9. In which programs does the conversion logic occur?
- a) The determination of the condition basis occurs in the FORM KONDITIONSBASIS_ERMITTELN (include LV61AA74) (compare steps (1) and (2) from section 6.a).
- b) The determination of the scale base value occurs in the FORM STAFFELBASIS_ERMITTELN (include LV61AA73) (compare steps (3) and (4) from section 6.a).
- c) The conversion of the item scale base values and cumulation for the overall scale base value occurs in the PRICING_COMPLETE function module (include LV61AU02) (compare steps (5), (6) and (7) from section 6.b).
- d) The calculation back of the overall scale base value from cumulation unit of measure to scale unit of measure of the respective item occurs in the FORM XKOMV_BEWERTEN (include LV61AA55) (compare steps (8) and (9) from section 6.b).
-
e) With Note 666965 (delivered with SAPKH46C48, SAPKH47022, SAPKH50005) or as of Release 600, parts of the relevant source code were removed to the FORM MATERIAL_UNIT_CONVERSION (include LV61AA81). However, the relevant callpoints for this FORM are still in the programs mentioned above.
-
e) With Note 666965 (delivered with SAPKH46C48, SAPKH47022, SAPKH50005) or as of Release 600, parts of the relevant source code were removed to the FORM MATERIAL_UNIT_CONVERSION (include LV61AA81). However, the relevant callpoints for this FORM are still in the programs mentioned above.
- 10. Example:
-
a) For the three materials MAT1, MAT2 and MAT3 (in each case with base unit of measure PC), the following conversion factors are maintained in the material master:
MAT1 MAT2 MAT3
1 PC = 20 KG 1 PC = 10 L 4 PC = 1 M2
5 PC = 1 CS 2 PC = 1 BOX 100 PC = 1 ROL
50 PC = 1 PAL 12 PC = 1 PAL 400 PC = 1 PAL
-
a) For the three materials MAT1, MAT2 and MAT3 (in each case with base unit of measure PC), the following conversion factors are maintained in the material master:
-
b) In addition, the following scale condition records apply to a ZDIS discount:
Condition records for MAT1:
(1) from 1 KG 100.00 EUR / 1 CS
(2) 4001 150.00
(3) 8001 200.00
Condition records for MAT2:
(1) from 1 LI 40.00 EUR / 1 BOX
(2) 501 80.00
(3) 1001 120.00
Condition records for MAT3:
(1) from 1 M2 25.00 EUR / 1 ROL
(2) 251 50.00
(3) 501 75.00
(4) 751 100.00
-
b) In addition, the following scale condition records apply to a ZDIS discount:
-
c) A document with 3 items first has the following condition values for the ZDIS discount as a result after item pricing (compare section 6.a):
Item 10: Material MAT1
Sales quantity 100 PC
Condition basis 100 PC = 20 CS
Scale base value 100 PC = 2000 KG => scale level (1)
Condition value 100 EUR / 1 CS * 20 CS = EUR 2000.00
Item 20: Material MAT2
Sales quantity 60 PC
Condition basis 60 PC = 30 BOX
Scale base value 60 PC = 600 L => scale level (2)
Condition value 80 EUR / 1 BOX * 30 BOX = EUR 2400.00
Item 30: Material MAT3
Sales quantity 200 PC
Condition basis 200 PC = 2 ROL
Scale base value 200 PC = 50 M2 => scale level (1)
Condition value 25 EUR / 1 ROL * 2 ROL = EUR 50.00
-
c) A document with 3 items first has the following condition values for the ZDIS discount as a result after item pricing (compare section 6.a):
-
d) Within the framework of the determination of total price, the scale base values of the items are converted to cumulation unit of measure PAL and cumulated (compare steps (5), (6) and (7) from section 6.b):
Item 10: 2000 KG = 100 PC = 2 PAL
Item 20: 600 L = 60 PC = 5 PAL
Item 30: 50 M2 = 200 PC = 0.5 PAL
Entire document: 7.5 PAL
-
d) Within the framework of the determination of total price, the scale base values of the items are converted to cumulation unit of measure PAL and cumulated (compare steps (5), (6) and (7) from section 6.b):
-
e) Finally, the overall scale base value in cumulation unit of measure PAL is converted to the scale unit of measure of the respective item (compare steps (8) and (9) from section 6.b):
Item 10: 7.5 PAL = 375 PC = 7500 KG => scale level (2)
Item 20: 7.5 PAL = 90 PC = 900 L => scale level (2)
Item 30: 7.5 PAL = 3000 PC = 750 M2 => scale level (3)
This leads to a higher scale level on the items 10 and 30 and results in the following (final) condition values for the ZDIS discount:
Item 10: 150 EUR / 1 CS * 20 CS = EUR 3000.00
Item 20: 80 EUR / 1 BOX * 20 BOX = EUR 2400.00
Item 30: 75 EUR / 1 ROL * 2 ROL = EUR 150.00
-
e) Finally, the overall scale base value in cumulation unit of measure PAL is converted to the scale unit of measure of the respective item (compare steps (8) and (9) from section 6.b):
-
11.
Is it also possible to cumulate value scales?
No. The cumulation of value scales (KZBZG = 'B') is not possible. This function is not provided.
If you have two value scales, for example, where the currency for the scale levels (field KONWS) for the first scale is maintained as 'EUR' and for the second scale as 'USD', these cannot be cumulated in a 'common cumulation currency' (for example: EUR, USD or a different currency) in the R/3 standard system to receive a scale base value for all items for the entire document.
-
-
This is a consulting note. Further inquiries about the function described above are not processed by regular support, but by consulting, and are subject to separate remuneration.
Header Data
Release Status: | |
Released on: | 23.06.2008 11:14:10 |
Priority: | |
Processor: | Ansgar Weissler |
Responsible: | Ansgar Weissler |
Category: | |
Primary Component: | SD-BF-PR 定价码 |
Affected Releases
|
Related Notes
| 1137128 - Incorrect qty conversions from scale UOM to base UOM | ||
Print Selected Notes (PDF) |
Action Log
|