Skip to Content

Prologue:

Industries in normal day to day do produces various documents by the way of doing Transactions through their wings of various sub sections. These documents can be either internal or external. However for all the documents for which primarily a copy is given to the partner in the situation cannot be maintained for N number of years by the Company as it involves carrying costs along with the space for the volumes and data retention issues . However the Data retention is governed by the local legal policies too.

Based upon the above things companies do often plan for archiving the data it produced during the time.

SAP Archive:

Based upon the fact SAP provided the tools for archiving the data. The tools are planned for various Transactional data produced in SAP along with the Master Data.

If an Example the MM module is taken, the following are the various master data as well the Transactional data like the documents,

Master Data

Material Master

Vendor Master

Info Records etc

Transactional Data documents

Purchase Requisitions

Purchase Orders

Material Documents

Invoice documents ETC

What is Archiving?

In SAP archiving is putting a deletion indicator to the objects in scope and removing the objects from the Respective database tables along with pushing the data into an another server called Archiving server enabling the archived data to retrieve as and when needed through the reporting tools .

The Process of Archiving in SAP MM module

Step1  :

Creating the Archiving file:

In this step system creates a file which contains the data to be archived. A program called write program will read the data from the Data Base Tables for the given input criteria and writes to a file in background. The data to be written will be depend upon the Maximum size specified for the Archiving Object for the customizing and or on the maximum number of data objects specified in the Customizing.

An SAP Exert

 

Step 2:

Storing Archive Files

At the end of the successful writing a archiving file a request will be sent to the storing system which is connected to the SAP Suite to store the files. Normally Archiving files can be stored automatically or can be stored at a later point of time based upon the customization settings

The following are the technical settings

Logical File Size

Archive file Size

Delete Program Settings

File system to Storage System

 

Apart from the Technical settings:

The other customizing settings would be

Check and Delete: This will enable Cross Object Archiving for the dependent object.

Archiving Routing: This setting enables the conditions for defining the content repository used to store Arching files.

 

Step 3 :

Running the deleting the Archive Files:

After the archive file creation process a delete program is started so as to delete the specified objects in the Archive file from the data base.

This program will be run in parallel to the Archive file so as to make a guarantee to see that the objects in the archiving file are only deleted.

Config steps required for the step:

However this step can be executed with the program RSARCHD.

This program can be made run either in test mode or Production Run variant.

 

Archive Objects:

Priors going into the process of archiving one must know about various objects related to the module

The following are various objects

MM_ACCTIT            MM- Accounting interface posting data

MM_AMPL  Archive materials from LZHT

MM_ASMD  Service Master

MM_CHVW Batch where-used data

MM_EBAN   Purchase Requisitions

MM_EINA    Purchasing Info Records

MM_EKKO   Purchasing Documents

MM_HDEL   Archiving program for MBEWH, QBEWH, EBEWH

MM_INVBEL            Materials management: Inventory documents

MM_MATBEL          Materials management: Material documents

MM_MATNR           MM: Material master records

MM_PREF    Preference determination, archiving customs log

MM_PREW  Preference determination MatGrp archiv. TarifProt.

MM_REBEL  Materials Management: Invoice Documents

MM_SPSTOCK        LO: Batches and Special Stock

However each objects contains any of the following structure components.

Preprocessing:

Some archiving objects require a preprocessing program that prepares the data for archiving. This preprocessing program marks data to be archived, but it does not delete any data from the database.

Preprocessing programs must always be scheduled manually and are run from Archive AdministrationWrite

This program creates archive files and writes data to them. At this point, however, no data will get deleted from the database.

You can specify in archiving object-specific Customizing whether the next phase which is the delete is to take place automatically after the archive files have been created. Delete jobs can also be event-triggered. To do this, you set up the trigger event in archiving object-specific Customizing.

Delete

This function can entail several activities. The activities are always dependent on the existing archive files.

Normally, the data is deleted from the data base. However, in some case, the archived data in the database may only have a delete indicator.

In archiving object-specific Customizing, it can be specified that archive files, after successful processing, are to be transferred to an external storage system using the SAP Content Management Infrastructure (which contains the Archive Link/CSM interface).

Post processing (optional)

This function is usually carried out after deletion has taken place. It is not available for all archiving objects. If the data has not yet been deleted from the database by the delete program, it is deleted by the post processing program. Depending on the archiving object used, post processing can also fulfill other tasks. For more information, refer to the documentation on the specific archiving object.

Re Load Archive (Optional )

It can also be reloaded the archive data into the system by taking the data from the Archive files. However this is not possible for all arching objects.

Index (optional)

This function builds (or deletes) an index that allows individual access. It is not included in every archiving object.

Configuration Settings for the Archiving Objects:

The below screen shot illustrates the configuration settings

 

This contain

1 . Cross Archiving Object Customizing

Technical Settings : In this step it will be specified with the inputs applies for the system is given like the Activation to monitor for the Data archiving and Check for the Access for the Archiving file stored in the file system or for the stored files and verify the Archive files .

  1. For Check and Delete the files

 

  1. Archiving Object-Specific Customizing:

This will be pertains to the Archiving Object specific

Technical Settings: The settings will be made entered for the archiving Object for the Archiving file size, Maximum number of data objects, Variants for Test as well for Live Modes and settings for Delete Jobs etc .

Settings for Archive Routing: The archive routing rules will be created

 

 

Basis Customization:

 Cross Client file names /Paths: This configuration primarily involves with Logical File path creation and its assignment with Physical path and Operating system Assignments etc .

 

 

b)Client-Specific File Names : In this step client specific files are configured

 

Application-Specific Customizing:

In this step the application object elements to be considered for which is going to be archived is specified.

For Example for MM_EBAN (PR)

 

This will keeps change for the different application objects.

 

 

An Example for Archiving:

Prerequisite: To maintain the configuration steps as discussed earlier

Taking an example of a Purchase Requisition:

Using the Transaction Code SARA .

Step 1. Preprocessing:

To prepare the data for Archiving, Object for PR Archiving requires a preprocessing step which involves with creation of a variant.

 

 

Variant screen with inputs

 

 

Maintain the start date and Spool Parameters for preprocessing

 

 

And execute to schedule the job

Once the job is run and if the spool of the job is checked at SM37.

 

The job log says

 

Step 2 and Step 3 : Write and Delete / Archive the Archive File:

Maintain the write file variant for the documents to be archived as provided in the Preprocessing step.

 

 

After maintaining the job parameters

 

Execute the Job to get scheduled

Once the Job is run, system will delete the Purchase Requisition after the write file is done.

The job log says

 

Normally the Next step is the Delete step.

In this system will delete the Archive file data written in the earlier step .However the delete execution and write file execution can run simultaneously based upon the configuration steps.

In the above process the simultaneous step for Delete is also run.

 

Step 4 : Read

 

 

Once press Read leads to

 

 

Upon the pressing the F8 or Execute Button

 

The Input selection screen will be visible to enter the input criteria

 

 

Execute the screen to get the Job which was run earlier

 

 

After pressing execute system will leads to the PR screen.

Once double clicked the PR number

System will lead to the PR display screen ME53N and says PR does not exists.

 

However in fact if the above effect is not required and if either for the Purchase Requisition given as example or for the other documents to be visible in the Respective document application , a functionality called Archive Info structure to be made active at the Archive Retrieval Confiscator .

The Transaction code path

If the info structure is activated system will be able to show the retrieved document in the application specific transaction with an icon Archive.

 

 

There are other DRB objects for application documents too .

 

 

Conclusion

 

In this Knowledge Based document an attempt have been made to explain what is Archiving in SAP and its process and the necessary steps to accomplish the Archiving using an example for a Purchase Requisition briefly.

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Jürgen L

    Just one more blog on data archiving with a lot pictures but without explanation why the settings should be made like shown and what would be the affect if the settings would be different, nothing about the residence times  and dependencies. And finally showing an error as evidence for successful archiving. Actually you should get into the details of your purchase requisition in your last screenshot, where you should see the purchase requisition as usual, just with an icon for archived:

    You missed to activate the archive info structures to enable the standard transaction ME53N to read from the archive.

    (0) 
  2. raghavendra sai Post author

    Hi Jurgen ,

     

    Thank you for the comments and for the valuable suggestion . In fact being a very big subject , i want to make as brief as possible and hence certain things i omitted . But anyway i keep updating the same .

     

    Regards,

     

    (0) 

Leave a Reply