Archiving the Material Master
Transaction SARA contains all the SAP archiving objects for all the SAP R/3
applications modules.
A D V E R T I S E M E N T
All the SAP archive functions are shown in SARA. Choose
the corresponding SAP archive object, hit enter and the archive administration
menu will be shown. Provided here will be an example on how to archive the SAP
Material Master.
Archive a Material Master Record
When a material is no longer required in a company or plant, you can archive
and delete the material master record.
You have to Flag the material master record for deletion. This is known as
logical deletion.
Before a material master record can be archived and deleted, other objects
(such as purchasing documents) that refer to this material must themselves be
archived. You can see which objects these are and the dependencies between them
in the network graphic.
If a material master record cannot be archived and deleted at a given
organizational level, the reason is given in the log (for example, a purchase
order exists for the material). The log also contains technical data such as the
number of material master records read and the number deleted.
Some of the archive error log message :-
- Costing data exists
- Use in routing
- Use in sales and distribution
- Use in bill of material
- Delivery exists
- Costing data exists
- Info record exists
- Purchase order exists
The Archiving steps :-Archiving object MM_MATNR for archiving material master records.
You can display the archived data, but not reload it.
To archive the material master, first goto transaction MM71.
Type in a variant name and click Maintain. (Tick the Test Mode for archive
simulation).
Save the variant.
Maintain the Start date and Spool parameters and click execute.
Click Goto Job Overview to check the archive status.
To do a permanent delete, goto transaction SARA and click Delete
button.
Maintain the Archive Selection, Start date and Spool parameters.
Click Test Session for testing or click execute to start the deletion
program.
Click Goto Job Overview to check the delete status.
Now, if you goto MM02/MM03, you will not be able to find the
record in the material master.
Meaning of Archiving Residence Time
Residence time 1 is for items without deletion indicator.
Before the deletion indicator is set for a document item, the system checks
whan the relevant item was last changed. Changes taken into account include a
change in the order quantity and a goods receipt, for example. The date of the
last change is compared with the current date. If no change has taken place
within the specified residence time 1, a deletion indicator is set for the
item.
Residence time 2 is for items with deletion indicators.
For document items for which the deletion indicator has been set manually or
during the archiving run, the system checks how many days have elapsed since the
deletion indicator was set.
The complete document is not archived until:
- The deletion indicator has been set for all the items of a document
- None of the items have been changed within the specified Residence time 2
(i.e. the last change was the setting of the deletion indicator.
After this, archived documents can be deleted from the database.
This enables you to set the deletion indicator automatically (residence time
1 = fullfilled) during an archiving run and still keep those records for another
time period (residence time 2) in a two step archiving procedure.
How to use "me98" to delete PO from system completely?
If we use "me98"(archive) to delete a PO that have a mistake for vendor
code.
The following step is:
the 1 step: Maintain and save a variant. For this variant, we have to create
a name for this variant and select the PO which want to delete. it's right?
the 2 step: "Start Date". For "Start Date",we select the "immediate " to
execute it. Is it right?
the 3 step: whether we maintain the "Spool Params" or not? May we execute it
immediately or not?
Archiving is not deleting. What do you think why SAP developed that much
programs to retrieve and read data from an archive.
Archiving is saving and keeping data for a certain period (based on local
laws for data retention and auditing purposes) outside of the production data
base. Such a job is usually done to keep the database small and fast.
While doing archiving the records are written to a file and verified to be
readable and then the original record gets deleted from the database. Only if
you delete then the file with the archived data you have deleted the record
forever.
Sometimes people seems to work like a burglar and want erase every single
evidence for an error. But even errors, or especially errors are subject to be
audited if they are corrected in the right way. This is the same for financial
and tax auditiors as for auditors for ISO 9000.
To be able to archive, you need to setup the path from SAP to the archive.
You need to define the size of your archive and how may records should be kept
there.
Step 1: Create variant for Archiving. Give it a name. Enter your PO number.
Flag One step procedure. Flag detailed log. Erase flag for test run.
Step 2: Maintain your start date, you can use Immediate in such a small
case.
Step 3: Maintain spool parameters. Enter your printer and set the values if
you want to print immediatly and if you want keep the print. I suggest to hold
the spool in the system. This helps you to determine any error.
Step 4. Execute the variant.
It creates 4 jobs:
ARV_MM_EKKO_SUB...., ARV_MM_EKKO_WRI.... ARV_MM_EKKO_DEL.....
ARV_MM_EKKO_STO.... If one of the steps fails, then everything is rolled back,
hence nothing is archived, the record is still in your database. In this case
use the jobs spool and joblogs to find out what happend.
Deletion of Vendor Consignment Records
Steps for Deletion of Consignment Records:
To delete the Consignment Record, use transaction MSK2 or menu-path:
Logistics - Materials Management - Material Master - Special Stock - Vendor
Consignment - Change and select the data of the record you want to be
deleted.
To start the archiving:
Process, follow the menu path:
Logistics - Materials Management �Material - Master - Other - Reorganization
- Special Stock � Choose to select the records to delete and
Logistics - Materials Management - Material Master - Other - Reorganization
- Special Stock - Reorganize to create archive file.
Create Archive File: Consignment Record: Data selection
a) Select Action: Archive and enter a new Variant, for example:
Z_CONS_SELE_01, press 'Maintain'
b) On selection screen enter the data range (Vendor, Material, etc.) you
want to archive.
c) Select the 'Create Output File' if you want the selected records
outputted
d) Press the green back-arrow and enter the description of this new variantt
on the screen which follows.
e) Save the variantt which brings you again to the selection screen. Press
green the back arrow again.
f) To start archiving process (batch-job), press the 'Start Date' button and
select the time when you want to start this process. Select 'Immediate' for
instant processing and press the 'Save' button on the bottom of the 'Start
Time' window.
g) Select the 'Spool Parameter' button and save entries. Eventually enter a
valid printer to have the result outputted.
h) You are ready now to start the process. Press the 'Start' button and
monitor the success with the 'Job Overview' button
You can also go the 'fast path' by using transaction SE38, program MMREO002
for selecting the data to archive. For large data archiving, use the
background jobs and run those during off-peak times. Create Archive File:
Consignment Record:
Archiving process:
a) Select Action: Archive and enter a new Variant, for example:
Z_CONS_ARCH_01, press 'Maintain'
b) On selection screen, select the 'Sequential Dataset' if you selected data
as described in the Data Selection step, otherwise enter the material number
and plant for the deletion of a single record.
c) Select the fields 'Consignment' and 'Special Stock' and Test mode, if you
want to try out first.
** This applies for SAP systems prior to release 3.1H: Select also the flag
called 'BATCHES'. The SAP program MMREO020 has a bug which can be worked
around with this selection. Without selecting 'BATCHES', the archived
records cannot be deleted. For systems with applied Hotpackages for 3.1H
this workaround is not necessary
d) Press the green back-arrow and enter the description of this new variantt
on the screen which follows.
e) Save the variantt which brings you again to the selection screen. Press
green back arrow again.
f) To start archiving process (batch-job), press the 'Start Date' button and
select the time when you want to start this process. Select 'Immediate' for
instant processing and press the 'Save' button on the bottom of the 'Start
Time' window.
g) Select the 'Spool Parameter' button and save entries. Eventually enter a
valid printer to have the result outputted.
h) You are ready now to start the process. Press the 'Start' button and
monitor the success with the 'Job Overview' button
You can also go the 'fast path' by using transaction SE38, program MMREO020
for selecting the data to archive. For large data archiving, use the
background jobs and run those during off-peak times. If you run the program
online, you will see a confirmation on the status bar telling 'New Archive
file created:....'
Delete Archived Records: Info Record
a) Follow the menu path: Tools - Administration - Administration - Archiving
b) Select the Object Name MM_SPSTOCK for consignment / Special Stock
c) Select the menu button 'Delete'
d) Select the menu button: 'Archive Selection'
e) Click the archive created in previous step
f) Select Start Date for process and Spool Parameters for output
g) Submit selection.
h) Check status by pressing the Job Overview button
|