SAP Program MGVREPMATID - Repair MATERIALID

Title
Repair Program for Table MATERIALID

Purpose
You can implement this program if you notice that entries in tableMATERIALID are missing. The number of entries in table MATERIALID mustalways be the same as the number of entries in table MARA.
The program firstly checks whether there is a difference between thenumber of entries in table MARA and table MATERIALID. If entries arefound in table MARA that are missing in table MATERIALID, the programeither automatically creates these entries in table MATERIALID ifcertain prerequisites are met, or displays the missing entries in alist so that the user can then maintain the entries manually.
If entries are found in table MATERIALID that are missing in tableMARA, the entries are automatically deleted from the MATERIALID table.

Integration

  • The program is client-specific, that means that only those material
  • numbers in the logon clients are processed.
    • If the total length of the material number is longer than 18
    • characters, the program cannot run in the background.
      • In contrast to program MGVERSXPRA1, program MGVREPMATID just
      • regenerates those entires that are missing in table MATERIALID and notall entires.
        • The following only applies when you use the long material number (total
        • length of the material number is greater than 18 characters):
          If more than 0,1% of the entries are missing, you must implementprogram MGVERSXPRA1. For example a maximum of 3 entries in tableMATERIALID and 3000 entries in table MARA. This restriction is necessar
          y because the program does not permit mass data processing in thedialog. The field MATNR_EXT must be manually entered for each material.
          Do not change the tolerance value of 0,1%. If you change this value,SAP takes no responsibility for the consequences and long processingtime that may result under certain circumstances.
          To change the tolerance value, you can reset the NO-DISPLAY addition inthe PTOLER parameter.

          Prerequisites

          • No other program is permitted to access the MATERIALID table at the
          • same time as program MGVREPMATID.
            • The material version function is not permitted to be active in the
            • system.
              • You have already defined the total length of the material number in
              • Customizing, and its total length does not exceed 18 characters.
                • In order to do this choose Logistics - General -> Material Master
                • -> Basic Settings -> Define the Output Format of Material Numbers(system table TMCNV).

                  Features
                  The program works in the following way:
                  The program firstly reads all the entries in table MARA and thensearches for a corresponding entry in table MATERIALID for each mat
                  erial. This part of the program has the longest run time as table MARAhas to be read completely.
                  All entries that are missing in table MATERIALID are displayed in alist at the end.
                  If you have set the test run indicator, the program generates a log. Nochanges are made to table MATERIALID.
                  If you have not set the test run indicator, the program automaticallyrepairs the errors as far as is possible. This means it automaticallyadds the missing entries to table MATERIALID, or deletes the entriesthat only exist in table MATERIALID, and are not in table MARA.
                  CAUTION: It is only possible to for an automatic repair to take placeif the following prerequisites are met:
                  The total length of the material number is not greater than 18characters.
                  The total length of the material number is greater than 18 charactersand the material number concerned is a manufacturer part number (MPN).In this case the program determines the contents of field MATNR_EXT.
                  CAUTION: An automatic repair does not take place,
                  if the material number concerned is a long material number. In thiscase the program cannot determine the contents of field MATNR_EXT. Thismust be entered manually.

                  • Run time of the program:

                  • For the consistency check of table MARA - including the subsequentrepair of the table MATERIALID and recording of missing entries ifnecessary - the program requires approximately 5 minutes to process100,000 MARA materials in the corresponding development systems at SAP.The majority of the time is required for the program to read table MARAand not for the repair of MATERIALID data.
                    All materials that can be repaired automatically, are repairedimmediately by the program. For those materials that require anexternal material number (MATERIALID-MATNR_EXT) to be entered manually,(only applicable for long material numbers), the run time increases bythe length of the input time. Before the system requires such an entry,a repair that has already taken place (if this was possible for somematerials) will be posted. These entries do not, therefore, have to becalled again should the program be suspended.
                    After each successful entry of an external material number(MATERIALID-MATNR_EXT), the entry in table MATERIALID is postedimmediately, so that the program can also be suspended and then calledagain. By doing this, not one external material number entry is lost.
                    For the consistency check of table MATERIALID - including thesubsequent repair and deletion of unnecessary entries in tableMATERIALID if necessary, the program requires approximately 150 secondsto process 100,000 MATERIALID entries in the corresponding developmentsystems at SAP.

                    Selection

                    • Material Number (MARA)

                    • Here you can enter a selection of material numbers. As the program candetermine the missing materials in their entirety and automaticallyrepair them, we do not advise making a selection at this point.
                      In contrast to program MGVERSXPRA1, the program only makes changes inthose places where they are necessary and we do not thereforeanticipate any run time problems.
                      The program only considers those materials in your login client.
                      • Check MARA Consistency

                      • The program reads table MARA and checks whether all material numbers intable MARA (MARA-MATNR) exist in table MATERIALID. The programgenerates an entry in table MATERIALID for all entries that exist intable MARA, but do not appear in table MATERIALID.
                        • Check MATERIALID Consistency

                        • The program reads table MATERIALID and checks, whether all materialnumbers in table MATERIALID (MATNR_INT) exist in table MARA. Theprogram deletes every entry in table MATERIALID for which there is nocorresponding entry in table MARA.
                          • Test Run

                          • If you have set this indicator, the program works as described above.No changes are made to the data base. The word (SIMULATION) appears inthe top left corner of the output log.

735529FAQ: DIMP/DI long material number and MPN