Reserve Fields

Reserve fields in the customer master record

The customer master includes reserve fields that are not assigned to any particular function. You can assign value to these fields and use them. To maintain the fields, select “Environment -> Additional data” on a customer master maintenance screen. The general data and the sales area data contain different fields:

    1. Ten fields were included in table KNA1 (general part of customer master record):
    Five two-digit fields:
    • KATR 1 (Attribute 1)
    • KATR 2 (Attribute 2)
    • KATR 3 (Attribute 3)
    • KATR 4 (Attribute 4)
    • KATR 5 (Attribute 5)
    Five three-digit fields:
    • KATR 6 (Attribute 1)
    • KATR 7 (Attribute 2)
    • KATR 8 (Attribute 3)
    • KATR 9 (Attribute 4)
    • KATR 10 (Atrribute 5)
    Check tables TVKO – TVK9 and the corresponding maintenance views
    V_TVV1 – V_TVK9 exist for the fields.
    2. Five three-digit fields were included in table KNVV (Sales data of the customer master record):
    • KVGR1 (Customer group 1)
    • KVGR2 (Customer group 2)
    • KVGR3 (Customer group 3)
    • KVGR4 (Customer group 4)
    • KVGR5 (Customer group 5)
    Check tables TVV1 – TVV5 and the corresponding maintenance views V_TVV1 – V_TVV5 exist for the fields. The fields were included in tables VBAK, VRRP, LIPS, KUAGVZ. Value is also assigned to them in the tables, which means that they were copied from the master record of the sold-party and used in the sales and distribution transaction.

Note

In the standard system, the views are not included in the user interface. However, it is possible for you to include them in the user interface.

Using reserve fields

To use a reserve field of the customer master according to your requirements, proceed as follows:

    1. Change the short descriptions of the data elements by using the SAP enhancement.
    2. Choose Tools -> ABAB Workbench -> Utilities -> Enhancements -> Project management -> Text enhancements -> Key words -> Change.
    3. Maintain the corresponding entity tables TVKO-TVK9 or TVV1-TVV5.

Example

You want to use the reserve fields of the customer master (general part) to store the liquidity level of your customer to use for statistical analyses. Proceed as follows:

    1. Change data element KATR1:
    • Change the short description “Attribute 1” to “Customer liquidity”.
    • Change the corresponding key words.
    2. Aktivate data element KATR1.
    3. Maintain entity table TVK1, by defining the following values:
    • “01” good liquidity
    • “02” average liquidity
    • “03” poor liquidity
    4. Use the same procedure for the remaining reserve fields KATR2-KATR10.

Reserve fields in the material master

Five three-digit fields were also included in material master MVKE. The entity tables TVM1 – TVM5 and the corresponding maintenance views V_TVM1 -V_TVM5 exist for these fields. The fields were included in the tables VBAP, VRRP, LIPS, MAAPV, where value is assigned to them. However, you cannot yet enter the fields in the material master maintenance. To use the reserve fields, proceed as described above for customer master maintenance.

Reserve fields in the sales order

In the sales order, the additional fields VBAK-KVGR1 – VBAK-KVGR5 were included at header level, to which value is assigned from the fields KNVV-KVGR1 – KNVV-KVGR5.

In the sales order, the additional fields VBAP-KVGR1 – VBAP-KVGR5 were included at item level, to which value is assigned from the fields MVKE-MVGR1 – MVKE-MVGR5.

To reach the additional fields in the sales document, select Header -> Additional data or Item -> Additional data.

New Fields For Material Determination

  • The following communication structures are relevant for material determination
    • KOMKD (Material determination – communication header)
    • KOMPD (Material determination – communication item)
    • KOMGD (Material determination – allowed fields)
    • For technical reasons, the communication structure KOMGD is used, which combines KOMKD and KOMPD, and which contains all fields that can generally be used for material determination. When entering new fields in KOMKD or KOMPD, the fields are also automatically included in KOMGD.

New fields for material determination are included in the following INCLUDES:

    • Header data: KOMKDZ (INCLUDE in KOMKD, KOMGD)
    • Item data: KOMPDZ (INCLUDE in KOMPD, KOMGD)

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

    • USEREXIT_MOVE_FIELD_TO_KOMKD (header fields)
    • USEREXIT_MOVE_FIELD_TO_KOMPD (item fields)

New Fields For Output Control

  • The following communication structures are relevant for output control:
    • KOMKBK1  (Output Determination Communication Area CAS Appl. K1)
    • KOMKBV1  (Output Determination Communication Area Header Appl. V1)
    • KOMKBV2  (Output Determination Communication Area Header Appl. V2)
    • KOMKBV3  (Output Determination Communication Area Header Appl. V3)
    • KOMKBV5  (Communication Structure for Output Control Groups Appl. V5)
    • KOMKBV7  (Output Determination Communication Area Shipment Appl. V7)
    • KOMPBV1  (Output Determination Communication Area Item Appl. V1)
    • KOMPBV2  (Output Determination Communication Area Item Appl. V2)
    • KOMPBV3  (Output Determination Communication Area Item Appl. V3)
    • KOMB     (Field Catalog for Condition Keys: Output Control)
  • New fields for output control are entered in the following INCLUDEs:
    • Sales activities: KOMKBZ1 (in KOMKBK1)
    • Sales document header: KOMKBZ3 (in KOMKBV1)
    • Delivery header: KOMKBZ4 (in KOMKBV2)
    • Groups header: KOMKBZF (in KOMKBV5)
    • Billing document header: KOMKBZ5 (in KOMKBV3)
    • Sales document item: KOMPBZ1 (in KOMPBV1)
    • Delivery item: KOMPBZ3 (in KOMPBV2)
    • Billing document item: KOMKBZ5 (in KOMPBV3)
    • Shipment: KOMKBZH (in KOMKBV7)
    If you also want to use a new field for the setup of condition tables (key field) it must also be included in the structure KOMBZ (contained in KOMB).
  • The routines and user exits for assigning values to the new fields are found in the programs RVCOMFZZ, RVCOMFZ1, RVCOMFZ4, and LVCOMFZ1. It is also possible to copy partners here.
    The following user exits exist in member RVCOMFZ1:
    • USEREXIT_KOMPBV2_FILL (item fields in delivery)
    • USEREXIT_KOMPBV2_PARTNER (item fields for partners in delivery)
    • USEREXIT_KOMPBV3_FILL (item fields in billing document)
    • USEREXIT_KOMPBV3_PARTNER (item fields for partners in billing document)
    The following user exits exist in member RVCOMFZZ:
    • USEREXIT_KOMKBK1_FILL (header fields in sales activities)
    • USEREXIT_KOMKBK1_PARTNER (header fields for partners in sales activ.)
    • USEREXIT_KOMKBV1_FILL (header fields for sales documents)
    • USEREXIT_KOMKBV1_PARTNER (header fields for partners in sales documents)
    • USEREXIT_KOMKBV2_FILL (header fields in delivery)
    • USEREXIT_KOMKBV2_PARTNER (header fields for partners in delivery)
    • USEREXIT_KOMKBV3_FILL (header fields in billing document)
    • USEREXIT_KOMKBV3_PARTNER (header fields for partners in billing doc.)
    The following user exit exists in member RVCOMFZ4:
    • USEREXIT_KOMKBV5_FILL (header field for groups)
    The following user exits exist in member LVCOMFZ1:
    • USEREXIT_KOMPBV7_FILL (Shipment fields for header and stage)
    • USEREXIT_KOMPBV7_PARTNER (Shipment fields for partners)

In output determination, communication table KOMB contains all key fields that can be used for conditions for output determination.

When you create new fields for output determination, you can distinguish between two types of fields:

  • Fields that are used in condition tables
  • Fields that are only used to query conditions.

Both types of field have to be included in KOMKBV1. Fields which are only used to query conditions do not have to be included in KOMB and T681F or in the field catalog.

Note concerning name assignment

There are two possibilities for naming the field:

    • If the field is identical to the field in the communication table (e.g. VBAK), a value is assigned to it automatically by MOVE-CORRESPONDING. If SAP delivers the field in a subsequent system version, no generation errors will be caused.
    • If the field is not identical with the field in the communication table,you have to assign a value to it using the MOVE command. Begin the field name with the letters ZZ. This will avoid generation errors if the field is later delivered by SAP in a subsequent system version.

Example 1: Creating a new key field in output control

If, for example, you want to use the field ERNAM (name of sales employee) from the sales order (table VBAK) for output determination, proceed as follows:

    1. Enter the field ZZERNAM in communication structure KOMKBV1 in INCLUDE KOMKBZ3 in the Data Dictionary.
    By entering the field in KOMKBZ3, you automatically include it in communication table KOMKBV1.
    2. Enter ZZERNAM in the communication table KOMB (in KOMBZ).
    3. Assign values to the fields
    Values are  assigned to the fields in function module KOMKBV1_FILL. You have to enter the field and assign value to it manually in user exit USEREXIT_KOMKBV1_FILL. You will find the statements that you can use as a reference in the user exits.
    Copying partner numbers is a special case and will be explained in Example 3.
    4. Include ZZERNAM in the field catalog for the condition table for sales documents. The field catalogs must contain all the fields which you want to use to structure condition tables.

Example 2: Entering a condition field in the communication block

If you want to use condition field VBAK-AUDAT for output determination, proceed as described in Example 1. Remember that it is not necessary to include the new field in KOMBZ (KOMB) or to maintain table T681F or the field catalog.

Example 3: Entering a partner number in the communication block

Example 3 presupposes that there is a new partner function for buyer ZY in the sales document and that the number of this partner is to be copied.

When entering partner numbers in the communication block, proceed as described in the examples above. Partner function ZY is assigned to partner type AP in this example.

Remember to use a different routine to assign values to the new fields. If, for example, you want to copy the partner function ZY into the new field ZZEINKA, for example, the statement is:

USEREXIT_KOMKBV1_PARTNER

WHEN ‘ZY’.COM_KBV1-ZZEINKA = COM_VBPA-PARNR.

The VBPA field used to assign a value to the new field depends on the partner function determined in the sales order. Each partner function is assigned to a partner type (e.g. partner function LF – partner type LI), which controls the assignment. Other source fields should be used for other partner types: COM_VBPA-KUNNR, COM_VBPA-LIFNR, COM_VBPA-PERNR and COM_VBPA-PARNR.

The following assignments exist:

  • KU => COM_VBPA-KUNNR
  • LI => COM_VBPA-LIFNR
  • PE => COM_VBPA-PERNR
  • AG => COM_VBPA-PARNR

7 thoughts on “Reserve Fields

  1. Madhu Sudan

    Hi, What do I need to do to make MVKE-MVGR1 show up on Mat Master Sales View ( 1 or 2?)..? It is already set up as a diff field label Ship Type instead of Mat Group1.
    I just can’t see it on Sales View to input a value from its choice list already configured.

    Reply
  2. Kundan Madrecha

    You can run trans OMS9 in IMG and use Field Selection Group 54. You will need to change the settings in the lower half of screen in 2 places. One for the material type (eg FERT) and one for trans code (MM01, MM02, etc).

    Reply
  3. Rodrigo

    and if even after set the transaction code to display the MVKE-MVGR1 field still not available on MM transactions?
    there is any other customization required to do?
    I am on the same situation of Mr. Sudan, but I cannot find a waya to solve it.

    Reply
  4. Mandar Babar

    I have included a new field in structure KOMPBV3 i.e. kvgr3, I want to fill the value in that field using user-exit USEREXIT_KOMPBV3_FILL of program RVCOMFZ1,
    i have created the enhancement implementation for the same but in that program the structure KOMPBV3 is not available, so how to fill the value in it? plz tell me…thanks in advance….

    Reply
  5. Fredrik

    Can I change the label of the fields t.i. KNVV-KVGR4 on VD01-3 screen witout changing the label in the data element?

    Reply

Leave a comment