Sie sind auf Seite 1von 5

USEREXIT_PRICING_PREPARE_TKOMK

This userexit can be used to move additional fields into the communication table which is used
for pricing:

TKOMK for header fields

This form is called from form PREISFINDUNG_VORBEREITEN.


1 Enhance Pricing Structure by adding new fields in the Pricing Catalog

ZZMVGR2 – Material Group 2 (VBAP-MVGR2)

The technical name of Material Group 2 and Material Group 3 is MVGR2 and MVGR2
respectively. Now these fields also exist in the Sales Order hence we can use these two fields to
carry out different prices. These two fields are not available in the condition table where we select
the fields to define a key combination.

The fields in Sales Order exist in the Additional Data


As a rule system should find the fields in the Sales Order through which prices can change in the
Sales Order. As an example if different customers have different prices in the Sales Order then
the field customer (Sold to or Ship to Party) should be there in the Sales Order. Similarly if
Material Group 2 is a field used to caryy out pricing, this field should be somehwere in the Sales
Order.

Why Material Group 2 or 3 can be chosen to carry out pricing.

During an Implementation of Pricing an organziation can have different prices based on


Material/Customer/Sales Org and some technical characteristics. Now this technical
characteristics of a material needs to be identified somewhere in the SAP system. Its upto a
Functional Consultant to choose one field. Material Group 1 to 5 is been provided in the standard
SAP that can be used for these purposes.

SAP has also provided some additional pricing fields in the customer master. But in situations
where the price selection parameter is huge and complex we have the option to choose the field
from customer or material master as per the suitablility.

How Fields populate in the T-code V/03 (Condition Table).

The fields which are ready to use in the condition table V/03 comes from the field catalog.

Sales and DistributionBasic FunctionsPricingPricing ControlDefine Condition


TablesConditions Allowed Fields
Now here we get the list of fields which if available can be used in pricing. The fields available
above can be seen in Tcode V/03.

The user exit USEREXIT_PRICING_PREPARE_TKOMK adds the fields in the following


communication structures. When the field is added when have to then go to Sales and
DistributionBasicFunctionsPricingPricing ControlDefine Condition
TablesConditions Allowed Fields and then Press New Entry to define the new field added. In
our cases we will choose ZZMVGR2 and ZZMVGR3
Steps to perform the activity.

Adding Material group 2 in the price Catalog:

1. Integrate the field name ZZMVGR2 in the communication structure KOMP using the
INCLUDE KOMPAZ and allocate the data element MVGR2 to it.

Explaining KOMP

There are three structures that need to be populated KOMP, KOMK and KOMG. KOMP is at the
item level, KOMK is at the header level and KOMG is automatically updated when fields are
added in KOMK or KOMP.

ZZMVGR2 is Material Group 2 which needs to be added in KOMP using include KOMPAZ
Include is a component used to add fields, in our case it is ZZMVGR2.

How to add the component is beyond the scope of this book, but it is essential to know which
include and what structures should be used for this purpose. Once ZZMVGR2 is added it
becomes available in Conditions Allowed Fields.

2. Activate the structures.


3. Assign a value to the new field in the FORM routines for sales order processing:

The user exit is found in member MV45AFZZ.

The complete statement is:


FORM USEREXIT_PRICING_PREPARE_TKOMP.
MOVE VBAP-MVGR2 TO TKOMP-ZZMVGR2.
ENDFORM.

4. Allocate the specifications A, V and 001 to the field ZZMVGR2 in table T681F.

Functional way of the 4th point is:

By going to Sales and DistributionBasicFunctionsPricingPricing ControlDefine


Condition TablesConditions Allowed Fields and then add ZZMVGR2.

Das könnte Ihnen auch gefallen