Archiving Special Stock Records (LO-MD-MM)

Definition

Archiving object MM_SPSTOCK for archiving special stock records such as records for batches and consignment materials.

Caution Caution

From ECC 608, SP 05 onwards, the following successor objects are available for archiving object MM_SPSTOCK. SAP recommends to use these objects:

End of the caution.

Application Objects

Archiving Object / Destruction Object

Batch (LO-BM)

LO_BATCH

Valuated Special Stock (LO-MD-MM)

MM_STO_VAL

Special Stock (LO-MD-MM)

MM_STO_SOBES_DEST

Consignment Stock (LO-MD-MM)

MM_STO_CONSI_DEST

Batch Stock (LO-MD-MM)

MM_STO_BATCH_DEST

Use

Special stocks are stocks that have to be managed separately. All the information your company needs to manage a material in this way is stored in a data record, sorted by various different criteria. When a special stock is no longer required in a company or plant, you can archive and delete the special stock record. You have the following options:

  • Flagging the special stock record for deletion

    This is known as logical deletion. Before a special stock record is physically deleted by the archive and delete program, the program checks whether the record can be deleted. There are no residence times for special stock records.

    For more information on flagging batches for deletion, see Flagging Batch Master Records for Deletion in the SAP library documentation LO - Batch Management .

    For more information on flagging consignment materials for deletion, see the documentation for program RM06IMKI.

  • Archiving and deleting the special stock record directly

    Here too, the archive and delete program first checks whether the record can be deleted.

To access archiving for special stock records, choose Start of the navigation path Logistics Next navigation step Materials management Next navigation step Material master Next navigation step Other Next navigation step Archiving Next navigation step Special stock/batch End of the navigation path .

You now have the following options (for information on procedures, see Archiving Procedure:

  • Archive/delete

  • By selecting individual objects and choosing Continue , you can display a list of the archived or deleted special stock records. By further selecting individual objects, you can display the following archived data in detail:

    Display archive

    • Tables

    • Long texts

    • Change documents

You can display archived data, but not reload it.

Structure

Tables

The archiving object MM_SPSTOCK is made up of all special stock tables. With this archiving object, data records are archived and deleted in these database tables. For information on how to display the names of these tables, see Tables and Archiving Objects .

Programs

MM_SPSTOCK contains the following program:

Program

Function

MMREO020N

Write

MMREO220N

Delete

Write program

The write program supports the ADK interruption function, meaning that you can interrupt the write phase and restart it at a later point in time. For more information on this function see Interrupting and Continuing Archiving Sessions.

In the selection screen of the write program you can select the documents to be archived under Materials and Restrictions . Under Options you can further restrict the selection of documents. You can find information about the different indicators in the field help. In Processing Options you can determine whether the write job is to start in the test mode or in the production mode. If in archiving-object-specific customizing you set the indicator for the automatic start of the delete program, you can also indicate here that the delete program of the archiving object should be started with the test mode variant you entered in archiving-object-specific customizing.

During the write and delete runs the program produces a standard log with information about the processed data. In the selection screen of the programs you can indicate that you want a detail log. In addition to the information contained in the standard log, the detail log also contains a list of the objects that were processed and the corresponding messages.

In the field Archiving Session Note you can enter a short text about the archiving session, which will help you find and identify the session in archive management later.

Delete program

The delete program has the standard variants SAP&PROD (production mode) and SAP&TEST (test mode). During the write and delete phases the system produces regular progress messages in the job log and in the status line.

Integration

Before a special stock record can be archived and deleted, other objects that refer to this special stock must themselves be archived. You can see which objects these are and the dependencies between them in the network graphic.

If a special stock record cannot be archived and deleted at a given organizational level, the reason is given in the log. The log also contains technical data such as the number of special stock records read and the number deleted.

Other than the general settings to be made in Customizing (see Customizing), no other application-specific settings are required for archiving.

Since special stock records can be archived and deleted individually or in groups for one or more organizational levels, it is not possible to make any general statements on runtimes and memory requirements. The deletion run should take place as soon as possible after the archiving run to avoid problems resulting from the special stocks concerned being changed or used in other functions (such as goods movements) between runs.

See also:

The Archiving Object

ILM-Based Information for the Archiving Object

This archiving object can also be used in the context of Information Lifecycle Management .The ILM Actions checkbox is available when the following conditions are met:

You are working within the SAP NetWeaver Information Lifecycle Management (ILM) framework.

All necessary prerequisites are satisfied, for example, business function Information Lifecycle Management (ILM) is activated (transaction SFW5).

The ILM actions allow you to archive data for which the retention periods defined in the Information Retention Manager (IRM) are evaluated. Furthermore, you can make “snapshots” of data and destroy data that satisfies the appropriate criteria.

For more information, see the ILM Actions in Write Program section of ILM Enhancements for Data Archiving .

The following fields for MM_SPSTOCK are defined in the ILM policy and visible when processing ILM policies (transaction IRMPOL):

  • Available Time Bases

    • End of Year (END_OF_YEAR)

    • Last Changed On (LAST_CHANGE_DATE)

      Available Time Offsets

      • End of Month (END_OF_MONTH)

      • End of Quarter (END_OF_QUARTER)

      • End of Year (END_OF_YEAR)

  • Available Condition Fields

    • Company Code (BUKRS)

    • Material Group (MATKL)

    • Material Type (MTART)

    • Plant (WERKS) (You should have defined the plant as the valuation area.)

  • Available Policy Categories

    RTP: Retention Rules

For more information, see SAP Information Lifecycle Management.