Note 854978 - Function of cumulated scale base values (in SD)

Summary

Symptom

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

    1. a) Units of measure
    1. b) Quantities (Bases)
    1. c) Conversion factors
    1. 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. 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.
  1. 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)

  1. 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
  1. 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.
  1. 5. Which Customizing settings are necessary?

    Make the following settings in Customizing of the affected condition type (for example, Transaction V/06, M/06).
    1. a) Select the 'Group cond.' checkbox (KGRPE) in the 'Group condition' block.
    1. 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).
    1. c) In the 'Scales' block, maintain the cumulation unit of measure for the 'Unit of measure' field (GRMEN).
  1. 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.
    1. 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).
    1. 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).
  1. 7. Which conversion modules are used?
    1. 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.
    1. 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).
  1. 8. Which conversion factors are used?
    1. 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)].
    1. 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)].
    1. 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:
    • 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.
  1. 9. In which programs does the conversion logic occur?
    1. a) The determination of the condition basis occurs in the FORM KONDITIONSBASIS_ERMITTELN (include LV61AA74) (compare steps (1) and (2) from section 6.a).
    1. 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).
    1. 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).
    1. 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).
    1. 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.
  1. 10. Example:
    1. 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
    1. 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
    1. 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
    1. 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
    1. 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

  1. 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.

Other terms

-

Reason and Prerequisites

-

Solution

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

Software
Component
Release
From
Release
To
Release
And
subsequent
SAP_APPL
40
40B
40B
 
SAP_APPL
45
45B
45B
 
SAP_APPL
46
46B
46B
 
SAP_APPL
46C
46C
46C
 
SAP_APPL
470
470
470
 
SAP_APPL
500
500
500
 
SAP_APPL
600
600
600
 
SAP_APPL
602
602
602
 
SAP_APPL
603
603
603
 
SAP_APPL
604
604
604
 
<script>var evt_array = new Array('empty','empty','empty','empty','empty','');try { for (i=0;i!=evt_array.length;i++) { if(evt_array[i]=='empty') continue; obj=document.getElementById('releases_tab'); obj.setAttribute('colEvt' +( i + 1),evt_array[i] ); } } catch (e) {};</script>

Related Notes

 
1137128 - Incorrect qty conversions from scale UOM to base UOM
Print Selected Notes (PDF)

Action Log

Date
Time
Initiator
Action
20.06.2005
14:32:33
Ansgar Weissler (D031050)
Note Entered
 
 
 
Person Responsible Ansgar Weissler
 
 
 
Set Status In Process
20.06.2005
14:39:13
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
20.06.2005
15:04:07
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
20.06.2005
15:15:31
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
20.06.2005
15:19:17
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
20.06.2005
15:22:56
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
13:59:34
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
18:08:01
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
18:15:07
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
18:38:33
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:09:47
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:13:01
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:14:06
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:15:27
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:17:42
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:21:08
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.07.2005
19:31:37
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
02.08.2005
17:46:15
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
02.08.2005
18:16:00
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
02.08.2005
18:28:55
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
02.08.2005
18:32:19
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
02.08.2005
18:32:59
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
12:55:19
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
13:52:43
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:07:48
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:08:51
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:09:44
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:14:16
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:21:20
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
14:45:36
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
15:05:21
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
15:22:21
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
15:23:52
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
04.08.2005
15:28:44
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
12:58:38
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
13:20:50
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
13:21:45
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
13:22:24
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
13:39:53
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
13:42:19
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
16:16:58
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
16:19:32
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
16:23:19
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
16:24:59
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
23.08.2005
16:26:52
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
05.10.2005
18:42:23
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
06.10.2005
12:51:34
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
06.10.2005
12:54:54
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
10.10.2005
15:11:18
Ansgar Weissler (D031050)
Note Changed
 
 
 
Status Changed In Process For Checking
18.10.2005
15:26:32
Gabriele Weyerhaeuser (D026123)
Note Changed
 
 
 
Text Changed
 
 
 
Version Generated
 
 
 
Status Changed For Checking Released for Customer
04.11.2005
10:55:54
METAL
Note Translated DE EN
09.03.2006
19:26:55
Ansgar Weissler (D031050)
Note Changed
 
 
 
Text Changed
 
 
 
Version Generated
 
 
 
Status Changed Released for Customer For Checking
09.03.2006
19:27:13
Ansgar Weissler (D031050)
Note Changed
 
 
 
Status Changed For Checking Released for Customer
28.04.2006
14:30:32
METAL
Note Translated EN JA
23.06.2008
13:13:54
Uta Flaechsner (D028229)
Note Changed
 
 
 
Text Changed
 
 
 
Version Generated
 
 
 
Status Changed Released for Customer In Process
23.06.2008
13:14:12
Uta Flaechsner (D028229)
Note Changed
 
 
 
Status Changed In Process Released for Customer
07.07.2008
15:05:03
Katharina Katic (I038764)
Note Translated DE EN
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值