Skip to Content
author's profile photo Former Member
Former Member

SD adding to field catalog

Hi All,

I have an issue where I have to add a new z field to field catalog. I am in middle of my project. Can somebody help me with adding a field to field catalog.

I appreciate your help.

Thank you.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Mar 15, 2011 at 01:48 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 15, 2011 at 04:19 AM

    Hi,

    You can add the Zfield to the field catalog and remember it is cross client. With the Z filed create your own table and introduce the same in your access sequence.

    After all this the following Zfield has to be called in your communication structure using the includes.

    New Fields in Pricing

    To use a field in pricing, one creates a condition table. This condition table is created using the allowed fields from the field catalog. Should the fields one requires not be included in the list of allowed fields, one can add the fields from the list of available fields. However, one may find that a new field may not be in the list of available fields. For this reason, one must create new fields for pricing. The document and item data in SD is stored in data tables, such as VBAK and VBAP (for the order transaction). Many of the fields from these tables are available in the field catalog.

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

    If you require a field that is not in KOMG, it means that it is not 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) and KOMP (item data) tables 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 u201Cxu201D structures.

    Menu Path

    The menu path here is IMG, Sales and distribution, System modification, Create new fields (using the condition technique), New fields for pricing.

    Adding the Field to KOMK and KOMP

    This process requires some knowledge of the ABAP dictionary and how to use the ABAP dictionary to create and change fields and tables. You may have to use an ABAP skill to assist you. If the field is from the header table (for example, the order table VBAK), youu2019ll need to add it to the include table KOMKAZ in table KOMK. If the field is from the item table (for example, the order item table VBAP), youu2019ll need to add it to the include table KOMPAZ in table KOMP.

    Letu2019s say you need to use the u201Cbase materialu201D 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 must start with u201CZZ.u201D 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 MARAWRKST.

    After adding the field, generate the structure KOMP. This field is not available in the field catalog and can be used in condition tables.

    Writing the ABAP Code

    The field in the communications structure will be blank unless the ABAP code transfers the data from the material master to the field KOMPZZWRKST. 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.

    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. 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 MARAWRKST to TKOMP-ZZWRKST.

    regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2011 at 02:18 PM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.