cancel
Showing results for 
Search instead for 
Did you mean: 

PRICING ISSSUE

Former Member
0 Kudos

STEPS FOR CREATING NEW FIELDS IN PRICING CONDITION TABLE IN WHICH THE FIELDS ARE NOT AVAILABLE IN FIELD CATALOG

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Per SAP DOC and examples:

New Fields for Pricing

Basics of modification in pricing

The following communication structures are relevant in pricing:

KOMK (pricing communication header)

KOMP (pricing communication item)

KOMG (allowed fields for condition structures)

For technical reasons, communication structure KOMG is used. It combines the fields from KOMK and KOMP that are relevant for pricing in the standard system and are offered in the field catalog of condition tables. If you want to use a new field in the field catalog, you must add the field to KOMP or KOMK in the following INCLUDES:

header data in INCLUDE KOMKAZ in KOMK

item data in INCLUDE KOMPAZ in KOMP

When you use INCLUDES, the field is automatically added to KOMG and the field catalog.

The routines for assigning values to the new fields in order processing are found in member MV45AFZZ. Use the following user exits:

USEREXIT_PRICING_PREPARE_TKOMK (header fields)

USEREXIT_PRICING_PREPARE_TKOMP (item fields)

The routines for assigning values to the new fields in billing are found in member RV60AFZZ. Use the following user exits:

USEREXIT_PRICING_PREPARE_TKOMK (header fields)

USEREXIT_PRICING_PREPARE_TKOMP (item fields)

Examples for using new fields in pricing

Example 1

In the first example, parts of a document field are to be used in pricing. You want to use the first three digits of the product hierarchy (PRODH) for pricing, for example. Proceed as follows:

1. Check the data elements in the standard system.

2. Since there is no such data element you have to create the new data element ZZPRODH1. Also create a domain with the length "3" and the data type "CHAR" for the new data element.

Remember that new data fields must start with the letters "ZZ" or "YY", since SAP reserved these letters to protect them from being overwritten during a release upgrade.

3. Check whether the product hierarchy (PRODH) is found at header or at item level.

In table VBAP, document field PRODH is defined as an item field.

4. Integrate the field name ZZPRODH in the communication structure KOMP using the INCLUDE KOMPAZ and allocate the data element PRODH to it.

5. Activate the structure.

6. Check in which table the field PRODH exists.

The field is in table VBAP (sales document: item data).

7. Assign a value to the new field in the FORM routines for sales order processing and billing using the appropriate user exits:

In sales order processing the user exit is found in member MV45AFZZ. The complete statement is:

FORM USEREXIT_PRICING_PREPARE_TKOMP.

MOVE VBAP-PRODH(3) TO TKOMP-ZZPRODH.

ENDFORM.

The routines for assigning a value to the new fields in billing are found in member RV60AFZZ. The statement is as follows:

FORM USEREXIT_PRICING_PREPARE_TKOMK

MOVE XVBRP-PRODH(3) TO TKOMP-ZZPRODH.

ENDFORM.

8. Allocate the specifications A, V and 001 to the field ZZPRODH in table T681F. Use "E" has been added for fields in rebate processing.

Example 2

In the second example, you want to use a partner function, created in Customizing for partner maintenance, for pricing.

Assume that the partner function was created for a sales representative of the partner type PE. Z1 is defined as a mandatory function for the customer master record, therefore automatically set in the document and available in the internal partner table XVBPA.

To use the new partner function for pricing, proceed in the same way as for the previous examples.

9. Create a new data element, in this example, data element ZZVRTZ1 with domain PERNR.

10. Include the field ZZVRTZ in KOMK using KOMKAZ and allocate data element ZZVRTZ1 to it.

For order processing, a value is assigned to the field in the user exit for member MV45AFZZ. The entries in the user exits are protected during a release upgrade. The statement is as follows:

FORM USEREXIT_PRICING_PREPARE_TKOMK.

PERFORM XVBPA_LESEN (SAPFV45K) USING 'Z1' VBAP-POSNR SY_TABIX.

MOVE XVBPA-PERNR TO TKOMK-ZZVRTZ.

ENDFORM.

For billing, a value is assigned to the field in the user exit of member RV60AFZZ. The entries in the user exits are protected during a release upgrade. The statement is as follows:

FORM USEREXIT_PRICING_PREPARE_TKOMK.

PERFORM_XVBPA_SELECT_USING'Z1'.

MOVE XVBPA-PERNR TO TKOMK_ZZVRTZ1.

ENDFORM.

Former Member
0 Kudos

Hi Prasad,

Go to IMG -- SDBasic function Pricingpricing controlcondition table

Here double click on Condition : Allowed fields.

Here go to the new entry and your required Field name.

Now this fields are available in the list of Field Catelogue.

Regards,

Vishal

Former Member
0 Kudos

Hi,

I will explain you the process with below example...Please follow steps in below sequence-

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.

Thanks,

Swamy H P