cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new field in pricing condition table.

Former Member
0 Kudos

Hi All,

I want to add new field in pricing condition table.

As per my googling i found out following solution..please let me know if i am wrong.

I have created one custom field that isZZVRTNR in KOMKAZ str, which is having ZZVRTNR data element and PERNR domain.

and in RV60AFZZ program under FORM USEREXIT_PRICING_PREPARE_TKOMK user exit i am writing following code.

FORM USEREXIT_PRICING_PREPARE_TKOMK.

MOVE XVBPA-PERNR TO TKOMK_ZZVRTNR.

ENDFORM.

my question is am i creating ZZ field in right str. i.e komkaz.or need to create in kompaz str???

I am not SD consultant .so i dont know how to check whether values are moving or no.

can anybody tell me step by step process how to check it ??

please reply me as earliest as possible.

thanks and regards,

Kiran.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please go through the below mentioned procedure to add new field

Try to add the filed from the field catalog. In case the required combination field is not there, you can add the field through the following process to filed catalog and create the condition table. It is most common that one or other time we need to use this function while configuring multi tasking & complex Pricing Architecture.

Here I'm giving a simple guide to add fields to the Pricing Field Catalogues:

For example 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.

Condition access, field catalog, allowed fields, KOMG, KOMK, KOMP, KOMPAZ, KOMKAZ, PSTYV are the other terms which we need to know about, to add Fields.

Reason and Prerequisites:

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

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.

Regards,

Krishna O

Answers (2)

Answers (2)

former_member183879
Active Contributor
0 Kudos

Hi,

You have to include the new field in the structure KOMG. This will also enable these fields in the structure KOMK and KOMP.

Then you have to code in the user exit as you have rightly pointed out.

If these two are done, the field in the sales order will be available in the pricing communication structure KOMG, during pricing determination. Hence the values will be read during the determination of condition value.

Former Member
0 Kudos

VRTNR is already an existing field in KOMK, so you don'd need to append KOMKAZ structure. What are you exactly trying to do with the sales employee field?