16.3.11

SAP Note 24944 - Group conditions

Symptom:

Problems with group conditions

Other terms

Group condition, condition type

Reason and Prerequisites

There are setting problems in Customizing.

Solution

The special function 'group condition' can be controlled using the group key number when customizing the condition type. Possible entries:
Blank, 1, 2 or 3.

The group condition routines run as follows:

GROUP CONDITION ROUTINE DESCRIPTION

Blank The scale base value of the condition
is calculated by adding the purchase
order quantities for all items which
have a condition record with the same
condition type and variable key.

1 (Entire Document) The scale base value of the condition
is calculated by adding the purchase
order quantities for all items which
have a condition record with the same
condition type and the same OR another
variable key.
If there are 2 condition records,
both must be created with scales.

2 (All Condition Types) The scale base value of the condition
is calculated by adding the purchase
order quantities for all items that
have a condition record with the same
condition type or that have another
condition type which represents a
group condition with FORM routine 2
and the same OR another variable key.

3 (Material Pricing Group) The scale base value of the condition
is calculated by adding the purchase
order quantities for all items which
have a condition record with the same
condition type AND material pricing
group AND the same OR another variable
key.

The group key routines delivered in the standard system only fill field VAKEY of structure GKOMV_KEY, and if VAKEY is filled, only the contents of fields

      a) KNUMH, KOPOS, WAERS, KRECH, MWSK1 and ZTERM


are deleted.
The remaining fields of structure GKOMV_KEY

      b) MANDT, KSCHL, ZAEKO, MDFLG, WAERK, HWAER, KNTYP, ZBD1P, KHERK, KSTEU, KOFRM, KOFRS, KZBZG, STFKZ, TXPRF, GANZZ, KONMS, KONWS, KYBTR, ZAEHK_KO


are not deleted.
The reason for this is that these fields are still required for further processing (for example, determination of overall scale base value, different processing of fixed/unfixed conditions).
However, the entire structure GKOMV_KEY is used for the decision on which conditions are grouped together within the the group condition processing. Therefore, the system may not group together certain conditions (that seem to be related) due to the different contents of the fields listed in b) although you use a group key routine.
To achieve a system response that differs from the standard system response, you can modify user-defined group key routines, condition formulas and scale base formulas, but this has to be done very carefully.

Example for using a group key routine:

A customer tries to accumulate the values of the scale base value by adding all the item quantities. This is not possible if condition type K029 (group condition) is only available in one of the two items of the order document. To calculate the amount of the entire document, ALL items must have the condition type (K029).

If you want to calculate the scale base value as a total quantity of all items in the document regardless of whether or not the individual items have the group condition, you should avoid the problem as follows:

Option 1):
Create a dummy condition record (K029) with a zero value for all items that would NOT be automatically found by K029. Use group routine number 1.


Option 2):
Create a dummy condition type with the same variable key that was used for K029.
Create a dummy condition record with a zero value for all items which K029 would not normally find. Use group routine number 2 both for condition type K029 and for the dummy condition type.


No comments:

Post a Comment