cancel
Showing results for 
Search instead for 
Did you mean: 

adding fields to the pricing condition table

Former Member
0 Kudos

Hi Gurus

How to add fields to the pricing condition table KOMG, KOMK.

Please developrs can you help us on step by step.

Thanks

Kris

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Menu path is SPRO-S&D-BASIC FUNCTIONS-PRICING-PRICING CONTROL-DEFINE CONDITION TABLES-CONDITIONS ALLOWED FIELDS-

HERE WE HAVE SOME FIELDS IF YOU WANT ADDITIONAL FIELDS GO TO FIELDS PRESS F4 and you can see number of fields out of you select the fields which you want to add and add in field catalog in new entries

<b>REWARD if helpfully</b>

Former Member
0 Kudos

Gurus

Any suggestions?

Please.

Thanks

Kris

Former Member
0 Kudos

Dear Kris,

Data elements:

MVGR2 Product group (of 3 characters length)

MVGR2_BEZ Description material group 2 (of 40 characters length)

I cannot find RKE_MVGR2 in the table. Was this already extended ?

Regards,

Naveen.

Former Member
0 Kudos

Hi Naveen and Gurus

Yes,It was extended .

please correct me if I am wrong .

so any field using for pricing in access sequence has to be append in KOMPAZ, KOMG, KOMK and KOMP.

pelase let me know.

Thanks

Kris

Former Member
0 Kudos

Dear Kris,

ADDING OF NEW FIELDS IN PRICING

In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure.This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields. The fields which are not in either of the two tables KOMK and KOMP cannot be used in pricing .Sometimes a need arises when the pricing is to be based on some other criteria which is not present in the form of fields in either of the two tables. This problem can be solved by using USEREXITS which are provided for pricing in SD. Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done.Hence SAP provides 2 userexits ,one for sales order processing which is

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.

In the case of userexit which will be called when invoicing is done ,these

are provided in the include RY60AFZZ which is in the standard SAP program SAPMV45A. The name of the userexits are same. i.e

USEREXIT_PRICING_PREPARE_TKOMP or

USEREXIT_PRICING_PREPARE_TKOMK

These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newely created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.

Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose includes are provided in each of them .

To create the field in header data(KOMK) the include provided is KOMKAZ

and to create the field in item data(KOMP) the include provided is KOMPAZ.

One possible example for the need of creating new fields can be e.g. Frieght to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.

Visit the following help link for list of user exits for sales documents:

http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm

USEREXIT_PRICING_PREPARE_TKOMK

Use this user exit if you want to include and assign a value to an additional header field in the communication structure KOMK taken as a basis for pricing.

USEREXIT_PRICING_PREPARE_TKOMP

Use this user exit if you want to include or assign a value to an additional item field in the communication structure KOMP taken as a basis for pricing.

Step by step procedure:

http://www.sap-basis-abap.com/sd/how-to-add-new-fields-to-field-catalog.htm

For adding field into Field catalogue:

I shall give an example. But you should first identify the field for Profit Center (Design ID) and then do as follows:

For example if you want to use field PSTYV ('Sales document item category') that is included in structure KOMP ('Pricing Communication Item') as a key for a condition table.

When you create a condition table (Transaction V/03), however, the system does not propose the field in the field catalog.

Prerequisites:

For technical reasons, field PSTYV was included in structure KOMP, however, not in structure KOMG ('Allowed Fields for Condition Structures').

To solve the problem, proceed as follows:

1. Call up the ABAP Dictionary (Transaction SE11) and create data type ZZPSTYV. Choose PSTYV as a domain.As a short text, you can use, for example, 'ZZ - sales document item category' and as a field label, you can use the field labels of PSTYV.Save, check and activate your entries.

2. Call up structure KOMPAZ in the ABAP Dictionary (Transaction SE11) in the change mode and make the following entry:

Component Component type

ZZPSTYV ZZPSTYV

Save, check and activate the change you made.

3. Note:Because of the change in structure KOMPAZ, field ZZPSTYV is now known in structures KOMG and KOMP because structure KOMPAZ is included in both structures.

4. Call up Transaction SPRO. Navigate to 'Sales and Distribution -> Basic Functions -> Pricing -> Pricing Control' and execute 'Define Condition Tables'. Choose 'Conditions: Allowed fields' and include ZZPSTYV as a new entry.

5. Note:Now you can use field ZZPSTYV as a key field when you create a condition table Axxx.

6. Supply the new field you defined by including the following source code line in USEREXIT_PRICING_PREPARE_TKOMP:

MOVE xxxx-PSTYV TO TKOMP-ZZPSTYV.

In order processing you find the user exit in Include MV45AFZZ, and in billing document processing you find it in Include RV60AFZZ.

Consider that you can also use this note as a help if you want to use other customer-specific fields as key fields in a condition table.For header fields, use structure

KOMKAZ instead of structure KOMPAZ and USEREXIT_PRICING_PREPARE_TKOMK instead of USEREXIT_PRICING_PREPARE_TKOMP.

For more information, see Transaction SPRO via the path 'Sales and Distribution -> System Modifications -> Create New Fields (Using Condition

Technique) -> New Fields for Pricing' and Note 21040.

For creating a condition Table:

1) There are almost all the regularly used Conditon Table predefined in the system from 001 to 500.

See what best you can use the Standard Tables to avoid further errors.

2) In case you should define the new condtion Table,

a) Goto TCode: V/03

b) Give a Table any number from 501-999

Press execute and reach to next screen.

c) Check up whether the field you are looking is already added in Field catalogue.

d) Double click on the fields you want to make a Table..one by one. Note that the sequence here is important in higher hierarchical to lower..

Eample : Sales Org, DC, Division, Customer and then Material etc..,

e) After selecting, click on the Techincal View buttin (redone) and reach to next screen.

7) Check which key should be in header and which key should be footer. Use check and uncheck functionalities there..

😎 Once you are through with all the above steps ..click on generate button.

Check the Table is generated or not.

You can check it at V/04 or V/05 or in SE11.

http://sap.ittoolbox.com/groups/technical-functional/sap-log-sd/problems-with-komk-765239

Regards,

Naveen.

Former Member
0 Kudos

Hi Naveen

Great help my friend, It is really help full for me and every body,

I gave you 6 points, once it solves my isuue I give 10 points.

please send me your personal email id to kris_k_kris@hotmail.com.

Thanks

Kris

Former Member
0 Kudos

Naveen

I am back once gain, Please can you help me on this.

So, according to your reply I checked and please help me to solve this.

In KOMPAZ (structure) - MVGR2 (material group field 2 already existing)

But in KOMG table - RKE_MVGR2 (material group field 2 existing)

and also in KOMP table - RKE_MVGR2 (material group field 2 existing)

what is the difference between the filed RKE_MVGR2 from MVGR2 fields?

Because of this reason I am not able see the field MVGR2 filed in the field catalog and not able to create table.

Please can you help me ont his

Thanks

Kris

Former Member
0 Kudos

Hi Kris,

USEREXIT_PRICING_PREPARE_TKOMK (module pool SAPLV60A, program RV60AFZZ)

This user exit allows you to copy additional fields for pricing in the TKOMK communication structure (header fields), which have not been provided in the standard SAP system. These fields can also be used for pricing in the billing document.

This user exit is described in detail in the "New fields in pricing" section.

USEREXIT_PRICING_PREPARE_TKOMP (module pool SAPLV60A, program RV60AFZZ)

This user exit allows you to copy additional fields for pricing in the TKOMP communication structure (item fields), which have not been provided in the standard SAP system. These fields can also be used for pricing.

This user exit is described in detail in the "New fields in pricing" section.

Reward points if useful

Regards,

Amrish Purohit