To add customer-specific fields to an existing material master table such as MARA or MARC , you can proceed as follows:
- Use an append structure to add the fields to the required table in the Dictionary. In Release 3.x, the length of the field names must be the same as the standard five character fields. This is necessary because of dynamic assignments. As of Release 4.0A, the lengths of the field names can be longer than five characters. If the changes of the fields should be recorded in the change document and taken into account during ALE distribution, set the 'Change document-relevant' indicator for the corresponding data elements. For table MARA in Release 3.x, you must also enhance the database view MARU because the database changes are carried out using this view. This small modification is no longer necessary as of Release 4.0A because the database view MARU is enhanced automatically when you enhance table MARA or the include EMARA (which is the data part of table MARA).
- Enhancing online maintenance in customized material master maintenance:
Define a subscreen with your customer-specific fields in a customer-specific function group created as a copy of the standard function group MGD1.
In Customizing, assign this subscreen to a maintenance screen using the "Copy customized material master" function. For details, see the Implementation Guide (IMG). As of Release 4.0A, program COPYMGD1 is available. You can use this program to create customer-specific function groups as required. This program is also incorporated in the Customizing function 'Configure customized material master'. Ensure that each field of the subscreen has a field statement in the flow logic, otherwise the data is not transported correctly. You can use subscreen SAPLMGD1 2002 as an example.
If you want these fields to be subject to standard field selection, you must add new entries for them to the central field table for material master maintenance (T130F):
Application examples for standard field selection:
The field is mandatory and is to be flagged with a "?"
The field belongs exclusively to the purchasing user department. Purchasing data and MRP data are both contained on one screen. However, the MRP controller is not to see the purchasing data.
The following data is required for each field:
a) Field name (T130F-FNAME)
b) Field selection group (T130F-FGRUP)
Here, you should use a standard field group if the customer field is subject to the same field selection as the standard fields of the standard field group. If it is not, use a customer-specific field group.
You must then check and, if necessary, modify the attribute of the field group using the function "Maintain field selection for data screens" in Customizing under "Logistics Basic Data -> Material Master".
Field groups 111 through 120 that are not used in the standard system are reserved as customer-specific field groups. As of Release 3.0F, additional customer field groups are available.
c) Maintenance status (T130F-PSTAT)
List of the user departments that may maintain the field. You can display possible values by using the input help for the maintenance status field in the Customizing activity "Configure Material Master" when maintaining logical screens.
d) Reference (T130F-KZREF)
This indicator must be set if the field from the reference material should be proposed during creation with reference.
Note: You cannot yet use Customizing to enhance table T130F; you can use only transaction SE16 (Data Browser) or transaction SM31. Future releases will include a separate Customizing function for maintaining customer-specific fields. See Note 306966. By implementing this note you can add entries to table T130F within Customizing. This type of maintenance is possible as of Release 4.5B.
You may change the entries for standard fields only with regard to the reference data and field selection group. Changing other data for standard fields constitutes a modification. Therefore, you cannot use the Customizing function "Assign Fields to Field Groups" to change this data.
In addition, you must not add new standard fields to table T130F.
- If you want to maintain customer-specific fields using data transfer by direct input or via ALE distribution, proceed as follows:
Add the fields to central field table T130F (see above).
Add the customer-specific fields to the data structures for the data transfer (for example, BMMH1 for the main data).
Also, add the customer-specific fields to the tables in which the incorrect data is stored during direct input. These tables have the same name as the corresponding master data table and also have the suffix _TMP.
For example: If you add customer-specific fields to table MARA, you should add the same fields to table MARA_TMP.
If you use ALE, you must also add fields to the IDoc. To process enhanced IDocs, you can use enhancement MGV00001 with customer exit EXIT_SAPLMV01_002 for creating the IDocs and customer exit EXIT_SAPLMV02_002 for posting the IDocs.
Prior to Release 3.0E, enhancing structure BMMH1 constitutes a modification. In this case, you must add the new fields tot the end of the structure before the last field (SENDE = record end indicator).
As of Release 3.0F, structure BMMH1 contains the customer include CI_MMH1, which is part of the enhancement MGA0001. Here, you must proceed as follows:
a) Add the customer-specific fields to include CI_MMH1.
The names of the fields in CI_MMH1 must be identical to those of the corresponding fields in material master tables MARA, MARC and so on.
Important: The fields must be CHAR type fields. Therefore, create CHAR type data elements whose lengths are identical to the output length of your fields in table MARA and so on. Use these data elements in include CI_MMH1, but use the field names from table MARA and so on.
b) Activate include CI_MMH1.
c) If you have not used customer structure ZMMH1 before, create it as a copy of structure BMMH1 and delete the standard fields that you do not require. You are not permitted to delete field STYPE and include CI_MMH1 when doing this. If you have already used structure ZMMH1, add include CI_MMH1 to it.
d) Activate structure ZMMH1. This also adds the customer-specific fields to ZMMH1.
Run program RMDATING. This program generates routines which are supplied to your customer-specific fields from the input file. As of Release 4.5A, you also need to activate the routines/function modules generated by program RMDATING (especially, the MAT_MOVE_BMMH1_XXXX modules). Details about this subject (especially the procedure when using customer structure ZMMH1) are described in the IMG for transferring the material data under item 'Maintain Transfer Structure'. Also, check the declaration of structure WA in program RMMMBIMC to see whether it is declared with sufficient length. If necessary, enhance the declaration (for the time being, this still constitutes a minor modification).
In addition, lengthen domain DI_DATA with CHAR 5000. As of Release 3.1H, this has already been done.
Important: When using customer-specific fields, you can use only structure ZMMH1 to transfer the data. Otherwise, after the next SAP upgrade which contains new standard fields in structure BMMH1, the input files no longer match. If you want these new standard fields to be transferred, add them after your customer-specific fields (the order of the fields in structure ZMMH1 does not need to be the same as the order of the fields in BMMH1).
If you want foreign key dependencies or fixed domain values to be checked, or another check for a customer field, this is possible up to and including Release 3.0D only by modifying the corresponding check function modules. As of Release 3.0E, you can use function exit EXIT_SAPLMGMU_001 (SAP enhancement MGA00001) for these purposes.
If you want to use engineering change management to schedule future changes for your customer-specific fields or you want to use the 'Display at Key Date' function, execute program GENERATE in addition. This program generates the necessary assignments for interpreting the change documents.
To date, it is not possible to integrate customer-specific tables in material master maintenance without making a modification. However, you can create customer-specific development objects containing the essential additional logic. You can then integrate these development objects in your system as part of only a minor modification.