Reserve fields in the customer master record The customer master includes reserve fields that are not assigned to any particu lar function. You can assign value to these fields and use them. To maintain the fields, select Environment -> Additional data on a customer master maintenance sc reen. The general data and the sales area data contain different fields: 1. Ten fields were included in table KNA1 (general part of customer master recor d): 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 custom er 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 exi st 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. Howeve r, 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, pr oceed as follows: 1. Change the short descriptions of the data elements by using the SAP enhanceme nt. 2. Choose Tools -> ABAB Workbench -> Utilities -> Enhancements -> Project manage ment -> 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 stor e 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 t ables 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, w here 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 abo ve 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 -> Additiona l 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 m aterial determination. When entering new fields in KOMKD or KOMPD, the fields ar e 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 m ember 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 c an 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 t o 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 th e 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 l etters 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 t he 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_FI LL. You will find the statements that you can use as a reference in the user exi ts. 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 docume nts. The field catalogs must contain all the fields which you want to use to str ucture 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 s ales document and that the number of this partner is to be copied. When entering partner numbers in the communication block, proceed as described i n 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, fo r 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 fu nction determined in the sales order. Each partner function is assigned to a par tner type (e.g. partner function LF partner type LI), which controls the assignm ent. 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 LI PE AG