4
SAP Note Header Data Symptom Content overview: 1. What effect does an entry in the 'Subto' column (KZWIW field) have? 2. Which settings are possible? 3. Which condition/subtotal line is taken into account? 4. In which cases is cumulation performed/not performed? 5. Which program contains the corresponding logic? 6. Are the cumulative values stored in the database? 7. Can inactive conditions also be taken into account? 8. Examples of how KZWIW is used 9. What you can do if the number of freely available subtotal fields in the KOMP (KZWI1 - KZWI6) is insufficient? 10. What you can do if the number of internal auxiliary variables (XWORKD -XWORKM) is insufficient? 1. What effect does an entry in the 'Subto' column (KZWIW field) have? You can make certain entries in the 'Subto' column (KZWIW field) in the Customizing settings for the pricing procedure. These determine that the condition value or the condition rate of the condition or subtotal line is copied into a certain field of the KOMP structure or into certain internal auxiliary variables (XWORKD - XWORKM). For more details, see Point 2 below. 2. Which settings are possible? The following options are provided in R/3 standard pricing: 1 Value transfer to KOMP-KZWI1 2 Value transfer to KOMP-KZWI2 3 Value transfer to KOMP-KZWI3 4 Value transfer to KOMP-KZWI4 5 Value transfer to KOMP-KZWI5 6 Value transfer to KOMP-KZWI6 7 Value transfer to KOMP-BONBA (Rebate basis) 8 Value transfer to KOMP-PREVA (Preference value) 9 Value transfer to KOMP-BRTWR (Gross value) A Price transfer to KOMP-CMPRE (Credit price) B Price transfer to KOMP-WAVWR (Cost) C Value transfer to KOMP-GRWRT (Statistical value) D Value transfer to XWORKD E Value transfer to XWORKE F Value transfer to XWORKF G Value transfer to XWORKG H Value transfer to XWORKH I Value transfer to XWORKI J Value transfer to XWORKJ K Price transfer to XWORKK L Price transfer to XWORKL M Price transfer to XWORKM S Value transfer to KOMP-EFFWR (Effective value) Y Value transfer to KOMP-OIIDC (IS-OIL/only JVA CRP Pricing) Z Value transfer to KOMP-OIEBC (IS-OIL/only JVA CRP Pricing) The following points apply in this case: Value transfer = transfer of the condition value XKOMV-KWERT Price transfer = transfer of the condition rate XKOMV-KBETR 3. Which condition/subtotal line is taken into account? A condition is only taken into account if it is not inactive with one of the inactive indicators 'AKLMXZ'. For the settings 'B' (Cost), 'C' (Statistical value) and '9' (Gross value), inactive conditions are not taken into account, even with 'Y'. It is of no consequence whether the condition is statistical or not. Subtotal lines are always taken into account in the standard R/3 system because they never have an inactive indicator in R/3 standard pricing. 4. In which cases is cumulation performed/not performed? 1022966 - FAQ for the 'Subto' column (KZWIW) in the pricing procedure Version 3 Validity: 26.03.2007 - active Language English Released On 26.03.2007 15:04:38 Release Status Released for Customer Component SD-BF-PR Preisfindung Priority Recommendations / Additional Info Category FAQ

Subtotal In pricing

Embed Size (px)

DESCRIPTION

Subtotal In pricing

Citation preview

Page 1: Subtotal In pricing

SAP Note

Header Data

Symptom

Content overview:   1. What effect does an entry in the 'Subto' column      (KZWIW field) have?   2. Which settings are possible?   3. Which condition/subtotal line is taken into account?   4. In which cases is cumulation performed/not performed?   5. Which program contains the corresponding logic?   6. Are the cumulative values stored in the database?   7. Can inactive conditions also be taken into   account?   8. Examples of how KZWIW is used   9. What you can do if the number of freely available       subtotal fields in the KOMP (KZWI1 - KZWI6) is insufficient? 10. What you can do if the number of internal auxiliary variables      (XWORKD -XWORKM) is insufficient?

1. What effect does an entry in the 'Subto' column (KZWIW field) have?

You can make certain entries in the 'Subto' column (KZWIW field) in the Customizing settings for the pricing procedure. These determine that the condition value or the condition rate of the condition or subtotal line is copied into a certain field of the KOMP structure or into certain internal auxiliary variables (XWORKD - XWORKM). For more details, see Point 2 below.

2. Which settings are possible?

The following options are provided in R/3 standard pricing:   1 Value transfer to KOMP-KZWI1   2 Value transfer to KOMP-KZWI2   3 Value transfer to KOMP-KZWI3   4 Value transfer to KOMP-KZWI4   5 Value transfer to KOMP-KZWI5   6 Value transfer to KOMP-KZWI6   7 Value transfer to KOMP-BONBA (Rebate basis)   8 Value transfer to KOMP-PREVA (Preference value)   9 Value transfer to KOMP-BRTWR (Gross value)   A Price transfer to KOMP-CMPRE (Credit price)   B Price transfer to KOMP-WAVWR (Cost)   C Value transfer to KOMP-GRWRT (Statistical value)   D Value transfer to XWORKD   E Value transfer to XWORKE   F Value transfer to XWORKF   G Value transfer to XWORKG   H Value transfer to XWORKH   I Value transfer to XWORKI   J Value transfer to XWORKJ   K Price transfer to XWORKK   L Price transfer to XWORKL   M Price transfer to XWORKM   S Value transfer to KOMP-EFFWR (Effective value)   Y Value transfer to KOMP-OIIDC (IS-OIL/only JVA CRP Pricing)   Z Value transfer to KOMP-OIEBC (IS-OIL/only JVA CRP Pricing) The following points apply in this case:   Value transfer = transfer of the condition value XKOMV-KWERT   Price transfer = transfer of the condition rate XKOMV-KBETR

3. Which condition/subtotal line is taken into account?

A condition is only taken into account if it is not inactive with one of the inactive indicators 'AKLMXZ'. For the settings 'B' (Cost), 'C' (Statistical value) and '9' (Gross value), inactive conditions are not taken into account, even with 'Y'. It is of no consequence whether the condition is statistical or not. Subtotal lines are always taken into account in the standard R/3 system because they never have an inactive indicator in R/3 standard pricing.

4. In which cases is cumulation performed/not performed?

    1022966 - FAQ for the 'Subto' column (KZWIW) in the pricing procedure  

Version   3     Validity: 26.03.2007 - active   Language   English

Released On 26.03.2007 15:04:38

Release Status Released for Customer

Component SD-BF-PR Preisfindung

Priority Recommendations / Additional Info

Category FAQ

Page 2: Subtotal In pricing

a) With the 'A' setting (credit price), only the last line in the pricing result that has the setting 'A' and the satisfies the conditions specified in Point 3 below is taken into account (because multiple use of 'A' is permitted). The credit price is always determined in the sales unit (VRKME). The condition price unit is always 1 in this case.

                       Example: If the sales unit is KG, the credit price is determined "per 1 KG".

b) With all other settings, all lines that satisfy the conditions specified in Point 3 and have the relevant setting are taken into account, that is, the condition values of these lines are cumulated.

                       Note: With the settings 'K' and a 'L' (transfer of the condition rate), multiple use (= cumulation) is not useful in most cases.

5. Which program contains the corresponding logic?

The corresponding logic is contained in the SAPLV61A program in the FORM XKOMV_BEWERTEN (Include LV61AA55):     * L O O P       LOOP AT xkomv.         ...     * calculate subtotals in KOMP         IF xkomv-kinak NA 'AKLMXZ'.           ...     * fill subtotal work fields           CASE xkomv-kzwiw.        <== The setting for KZWIW             WHEN ' '.                  is checked in this             WHEN 'A'. CASE statement.               ...             WHEN 'B'.               ...             WHEN ...               ...           ENDCASE.           ...         ENDIF.         ...     * L O O P       ENDLOOP.

6. Are the cumulative values stored in the database?

The values, that are included in the fields of the KOMP structure are returned from pricing (program SAPLV61A) to the calling program. The specific application determines whether the values are then stored in a database table with corresponding fields. This is the case in sales (table VBAP) and in the customer invoice (table VBRP), for example. The XWORKD - XWORM fields are auxiliary variables. They are initialized at the start of a pricing evaluation (FORM XKOMV_BEWERTEN, Include LV61AA55) and their contents are lost at the latest on completion of the pricing call (exit of program SAPLV61A).

7. Can inactive conditions also be taken into account?

This is possible if you use a corresponding condition value formula. Example: You want to cumulate all condition values of a condition ZZZZ in XWORKJ, even if they could be inactive due to a manual entry (KINAK = 'M'). You must create a condition value formula with the following source code:     * if condition is active or inactive with 'M'       IF xkomv-kinak NA 'AKLXZ'.         xworkj = xworkj + xkwert.  "cumulate condition value in xworkj       ENDIF. The formula must be assigned to the condition ZZZZ in the pricing procedure. In addition, the 'J' setting must be removed from the 'Subto' column to prevent the standard R/3 source code for cumulation (see Question 5) from being executed also. This is necessary so that active ZZZZ conditions are not cumulated twice by mistake. Variant: If the formula contains the following source code, the setting 'J' must be retained in the 'Subto' column in the pricing procedure: IF xkomv-kinak = 'M'. "if condition is inactive with 'M' xworkj = xworkj + xkwert."cumulate condition value in xworkj ENDIF. In this case, the inactive conditions with the setting 'M' are cumulated in the formula and the active conditions are cumulated in the R/3 standard source code.

8. Examples of how KZWIW is used:

a) In purchase price calculation schema RM0000, the condition value of the statistical condition EDI1 is copied to XWORKD. For the next condition EDI2, the condition value is calculated with the condition value formula 040 (Include FV64A040) as the difference between XWORKD and the accured net value.

b) A percentage condition ZZ13 refers to three previous conditions ZZ02, ZZ04 and ZZ07, which do not appear in a direct sequence in the pricing procedure. In this case, it is not

Page 3: Subtotal In pricing

possible to cumulate the condition values of these three conditions using from-to steps (see Note 834174). However, you can cumulate the condition values of the three conditions ZZ02, ZZ04 and ZZ07 in XWORKL, for example, by setting 'L' in the pricing procedure for all three conditions. In addition, you must create a condition base formula for the ZZ13 condition, which copies the content of XWORKL as a condition basis:     * use the content of xworkl as condition basis        xkwert = xworkl.

9. What you can do if the number of freely available subtotal fields in the KOMP (KZWI1 - KZWI6) is insufficient

An enhancement is possible as part of a modification. For more details, see Note 155012. Note: With 155012, the imported fields (for example, KOMP-ZZWI11) must be filled in each case using a condition value formula. However, to maintain a corresponding setting for the field name in the 'Subto' column of the pricing procedure ('11'), the modifications in this note are insufficient. Why are further modifications not recommended?

a) Firstly, the value range of the R/3 standard data element KZWIW would have to be extended with the value '11' (transaction SE11). However, the KZWIW data element has only one character. Therefore, the two-digit value '11' is not possible. You can only assign a vaule other than the values listed under Point 2 above (for example, N, O, P).

b) In addition, the source code of the R/3 standard routine FORM XKOMV_BEWERTEN (Include LV61AA55) would have to be modified by including a relevant branch in the CASE statement from Question 5, for example:   WHEN 'N'. " modification: 'N'     ADD xkomv-kwert TO komp-zzwi11.  " cumulates in field zzwi11

10. What you can do if the number of internal auxiliary variables (XWORKD -XWORKM) is insufficient

An enhancement is possible as part of a modification. For this purpose, a corresponding data declaration must be made in the LV61ATOP Top Include of the SAPLV61A program, for example:     * additional work field for xkomv_bewerten       DATA:  zwork1 LIKE komv-kwert, You must then also fill the zwwork1 auxiliary variable using a condition value formula (see Question 9).

Other Terms

KZWIW

Reason and Prerequisites

These problems are due to the design of R/3 pricing.

Solution

This is a consulting note. Other inquiries relating to the functions described above do not fall within the scope of 'Support', and are instead processed as part of consulting, which is subject to a separate charge.

Validity

This document is not restricted to a software component or software component version

References

This document refers to:

SAP Notes

This document is referenced by:

SAP Notes (1)

155012   Further subtotal fields in pricing

155012   Further subtotal fields in pricing

Page 4: Subtotal In pricing