You are on page 1of 5

ADDING NEW FIELD TO PRICING CATALOG IN

SAP
Pricing Field catalogs in SAP 
Field catalogs are the set of fields which can be used as a base of condition tables 
We use these standard field provide by sap in pricing and creates a condition tables
with the combinations of these fields. This condition table is created using the
allowed fields from the field catalog. There are around 200+  pricing fields provided
by SAP

In case customer business requires some fields, which are not included in the
list of these allowed field,
In order to fulfill this requirement, we must create a new field for pricing and include it
to the list of field catalogs.
The field catalog is a structure (KOMG) that consists of two tables (KOMK and
KOMP). These tables contain the header and item data for pricing respectively. They
are called KOM “x” because they are communications structures used to
communicate the transaction data with the pricing procedure. Table KOMG contains
the fields of tables KOMK and KOMP. 
KOMG - Allowed fields for Condition Structures
KOMK  - Communication Header For Pricing 

KOMP - Communication Header For Pricing

If we required field which is not there in KOMG, it means that it is also not available
in KOMK or KOMP.
This means that the field you require cannot be used in pricing because there is no
communication of this field from the transaction to the pricing procedure via the
communication structures.
 
To use a field not defined in the field catalog, you need to add this field to the KOMK
or KOMP structures, and then write the ABAP code to transfer the data in the field
from the transaction tables to the communication structure. Follow these steps:
1. Create the field in the KOMK (header data) or  KOMP (item data) table depending
if the field is header or the item  using the standard includes provided for this
requirement.
2. Write the code in the user exit to read the transaction data and transfer it to the
KOM “x” structures.
 
Menu Path to create the field:

Adding the Field to KOMK and KOMP


 
This process requires some basic knowledge of the ABAP on how to use the ABAP
dictionary to create and change fields and tables. If the field is from the header table,
we need to add it to the include table KOMKAZ in table KOMK.
If the field is from the item table, you’ll need to add it to the include table KOMPAZ in
table KOMP. 

SAMPLE SCENARIO
 
Let’s say you need to use the “base material” to define a price and the base material
is not in the pricing field catalog. The base material is a field on the material master
basic data screen and is defined as MARA-WRKST. Since this relates to the
material, it is at the item level, so you would add the field to the KOMPAZ include
table. 
Note: When you add a field to these tables, it is recommended that we should start
the field name with with “ZZ.” Therefore, the field you add would be ZZWRKST. In
ABAP, when you add the field, use the same domain as in the field in the original
table MARA-WRKST. 

After adding the field, generate the structure KOMP. This field is not available in the
field catalog and can be used in condition tables.
 
Recommended Includes and User Exit
 
The field in the communications structure will be blank unless the ABAP code
transfers the data from the material master to the field KOMP-ZZWRKST. Pricing
occurs in the order and in the invoice, so you need to put this code in both places.
For the order transaction,
write the ABAP code in user exit USEREXIT_PRICING_PREPARE_TKOMP in
include program MV45AFZZ. For the billing transaction, write the ABAP code in user
exit USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ. 
The ABAP code would select the Base material field from the material master table
using the material from table VBAP/VBRP. It would then transfer this field to the
structure TKOMP from MOVE MARA-WRKST to TKOMP-ZZWRKST.
Note:  The TKOMP is for the item level. If you are writing the code for a field at the
header level, you would use the user exits that end with TKOMK.

Adding customer fields in sap

You might also like