Adding New Fields to Condition Field Catalog

March 8, 2018 | Author: Anupa Wijesinghe | Category: Data, Subroutine, Computer Data, Areas Of Computer Science, Information Technology Management
Share Embed Donate


Short Description

Contents Introduction.....................................................................................................

Description

Contents Introduction .................................................................................................................................................. 2 Basics of modification in pricing ................................................................................................................... 2 Example ..................................................................................................................................................... 2 Steps to follow .......................................................................................................................................... 2 Create data element for new field ........................................................................................................ 2 Add the date element to condition structure ....................................................................................... 5 Add new field to condition field catalog ............................................................................................... 6 Populating the field for sales order processing and billing document processing ............................... 7 Add field to Allowed Fields per Usage and Application ........................................................................ 9 Data sources................................................................................................................................................ 10

Introduction If you want to add a new field to the condition field catalog (Which is not available in the standard field catalog) and use it for condition record determination, then you need to setup below configuration/coding correctly.

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: o o

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 the include MV45AFZZ. Use the following user exits: o o



USEREXIT_PRICING_PREPARE_TKOMK (Sales order header fields) USEREXIT_PRICING_PREPARE_TKOMP (Sales order item fields)

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

USEREXIT_PRICING_PREPARE_TKOMK (Billing header fields) USEREXIT_PRICING_PREPARE_TKOMP (Billing item fields)

Example I want to add the new partner function called “End customer” to the field catalog and determine pricing based on that end customer mentioned in the sales order header.

Steps to follow Create data element for new field  Go to SE11



Enter “ZZKUNNR” under field “Data Type” and press

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. 

Select



You’ll need to have a Access key to proceed

and press

Get it from your basis consultant and enter it under and press 

Maintain below data

field



Save



Check it



Activate

Now you have created a new data element as “ZZKUNNR” Add the date element to condition structure First you need to identify where this field is in the sales order (Header or line item). Since I need to refer header partner functions I need to add my new date element to KOMKAZ structure. If it’s line item data, then you need to add it to KOMPAZ structure. Adding ZZKUNNR to KOMKAZ structure 

Go to SE11

  

Enter KOMKAZ under and press You’ll have to give the access key here as well. Maintain below data



Save



Check it



Activate

Note: Due to the changes in the structure KOMKAZ, the field ZZKUNNR is now known in the structures KOMG and KOMK because the structure KOMKAZ is included in both structures.

Add new field to condition field catalog  Go to below IMG path



Add the new field there



Save

This new filed will be available for you to add in to the condition table under condition table creation IMG step.

Populating the field for sales order processing and billing document processing Now you need to add this field to relevant user exists in order to pick it in sales / billing document processing. For this you can use below includes and user exits. 

Include- MV45AFZZ. Use the following user exits: o o



USEREXIT_PRICING_PREPARE_TKOMK (For Sales order header fields) USEREXIT_PRICING_PREPARE_TKOMP (For Sales order item fields)

Include - RV60AFZZ. Use the following user exits: o o

USEREXIT_PRICING_PREPARE_TKOMK (For Billing header fields) USEREXIT_PRICING_PREPARE_TKOMP (For Billing item fields)

In order to code it;  

Go to SE38 Enter relevant include

   

Press Change You’ll have to give the developer key here Since I’m referring to the sales document header partner function, I have to use below user exit. USEREXIT_PRICING_PREPARE_TKOMK Sample code is as follows

Here it checks the sales order header partner function “XE” and pass it to the “ZZKUNNR” field in the condition catalog. 

You need to add same to the billing user exit under include RV60AFZZ as well.

Add field to Allowed Fields per Usage and Application  Go to SE11  Enter table T681F

  

Press You’ll need Access key and a developer key here as well Add below values

Note: Use "E" has been added for fields in rebate processing.

Data sources   

SAP Note 21040 - Allowed Fields not appearing for condition table SAP Note 531835 - Using field PSTYV in the condition access Documentation available in then IMG node for adding new fields

Author: Anupa Wijesinghe E-Mail: [email protected] / [email protected] Website: www.learnsaptips.com View my profile in LinkedIn Follow me on Twitter

Disclaimer This article is done based on my research and readings, unless otherwise stated. The views expressed are my own and not of anyone else. Author accepts no liability for the content of the articles in this website or for the consequences of any actions taken on the basis of the information provided. Using this information is at the users own discretion and responsibility.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF