Programme SAP RM07MARCS - Archiving Material Documents: Write Program

Description
Program RM07MARCS archives the material documents of inventorymanagement.
Material documents are archived in two steps:
Program RM07MARCS creates the archive file.
Program RM07MADES deletes the data from the database.
The material documents (object MM_MATBEL) consist of twosegments:

  • MKPF: Material document header

  • MSEG: Material document items

  • One MFPF record can usually have up to 500 MSEG records.
    You can find the length of records in the data dictionary informationsystem.
    Only material documents are archived. Accounting documents for materialdocuments are archived in FI.

    Material document selection
    You can select material documents by the following criteria:

    • Material document number

    • Note that the material document number depends on the transaction type.
      Example:
      Goods issue documents: 4900000000 - 4999999999
      Goods receipt documents: 5000000000 - 5099999999
      • Material document year

      • Depending on the system settings, a new material document number may beassigned for each year.
        • Plant

        • Note that some material documents (such as stock transfers) can containitems with different plants. If a material document contains an itemwith a different plant from the other items, the document will not beselected.
          • Posting date

          • Since material documents are unique for one year only and the samematerial document number can appear in different years, it makes senseto enter an interval for the posting date.
            • Transaction type

            • Point of sale (POS) documents (cash sale documents), if using a retail
            • system.
              Caution: the selection of POS documents does not take the residence timeinto account (transaction OMB9)<(>,<)>

              Process Control
              In process control you can define which mode should be used to performthe archiving run.

              • Selection of "POS documents": Only set this indicator if you want to
              • archive only POS documents. If this indicator is not set, all documentsexcept POS documents are selected for archiving. In other words, theusual archiving method from inventory processing is processed. Unlikethe previous archiving process, the archiving of POS documents does nottake account of the residence times (transaction OMB9) for documents,depending on the transaction type. Consequently, all existing POSdocuments that have the appropriate indicator set are archivedimmediately when the archiving program runs.
                • If you start the function in test mode, this selects the material
                • documents that match the criteria only. No archive file is created, andno documents are deleted from the system.
                  This setting is the system default each time you start the reportprogram.
                  • If you start the function in production mode, archive files are
                  • created for the selected material documents.
                    • The Delete with Test Variant indicator can only be selected in
                    • production mode. If it is set, the selected material documentsare only archived, not deleted. To delete the documents, you need tostart report program RM07MADE.
                      If the indicator is not set, the documents are both archived and deletedfrom the system.
                      In the system default settings, the indicator is set.

                      Detail Log
                      If you choose the Detail Log indicator, the system shows both thestandard display and a list of the selected material documents.

                      Document Life
                      In Customizing for inventory management and physical inventory, underDefine Document Life, you can define adocument life (for example, 200 days) for each transaction type. Thesystem only selects the material documents that have reached thedocument life.

                      Authorization
                      Before you can archive material documents, you require the followingauthorizations:

                      • General authorization for archiving

                      • Authorization for object M_MSEG_WMB (material documents in plant)
                      • with activity 06.

1116598Archiving of POS (Point-of-Sales) documents using MM_MATBEL
591198Archiving MM_MATBEL: Normalization