You are on page 1of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

SAP DATA ARCHIVING STEP BY STEP

Confidential Document

Prepared by Surojeet Dey

Page 1 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

the configuration steps needed to schedule an archiving job.

Objective: - Purpose of this paper is to explain Archiving process in detail. It describes in details all

Introduction: - Data Archiving a service provided by SAP Net Weaver removes mass data that the system no longer needs online, but which must still be accessible at a later date if required, from the database. The following graphic illustrates the archiving process: Archiving objects are used to write documents to archive files, which can be stored on other media.

Data in the database can only be archived using archiving objects, which describe the data structure and context.

Confidential Document

Prepared by Surojeet Dey

Page 2 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Defining Logical Path and File Names


Archive files are stored in the file system under a physical path and file name that is derived from a userdefinable logical path or file name. The definition can be divided into the following steps: 1. 2. 3. Definition of the logical path name Definition of the logical file name Assignment of the logical fine name for the archiving object

The following describes the procedure for creating a cross-client definition using the transaction FILE. You create the client-specific definition in the same way using transaction SF01. Call transaction FILE

Confidential Document

Prepared by Surojeet Dey

Page 3 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Select New Entries tab.

Below Screen will appear, enter the Logical Path always start with Y or Z and Name.

Change request Form will appear provide input as required then click on save a request will be created.

Confidential Document

Prepared by Surojeet Dey

Page 4 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

After Clicking on SAVE request number will appear.

Click to continue.

Select the Path It must be highlighted then double click on Assignment of Physical Path to Logical Path.

Confidential Document

Prepared by Surojeet Dey

Page 5 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Below screen will appear. Click on New Entries tab

Clicking on the drop-down list will appear the type of OS architecture, select as per yours then enter the Physical Path for the archive files remember always use <FILENAME> structure otherwise it will not save.

FOR UNIX : path will start like /etc/home/<FILENAME> and syntax Group you have to select accordingly. Now SAVE and Double Click the tab.

Confidential Document

Prepared by Surojeet Dey

Page 6 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Below Screen will appear then Give the Logical File name for that then enter name. In the Physical File field, enter the required physical file name. The following parameters are of particular interest here: 1. PARAM_1: Two-character application abbreviation (for example, HR, CO, MM) for the classification of the archive files in the system. The value of the definition is determined from the relevant archiving object at runtime. 2. PARAM_2: Single-character alphanumerical code (0-9, A-Z). If, when creating a new archive file, an existing file with an identical physical name would result in a conflict, the ADK increases this value by 1. This value must, therefore, always be a part of the physical name. 3. PARAM_3: This parameter is filled at runtime with the name of the archiving object. In archive management, this enables you to check the file contents or to store the archive files by archiving objects. Application Area: - BC or select accordingly. Logical Path will the above one can be selected from drop down list.

Confidential Document

Prepared by Surojeet Dey

Page 7 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Example of complete archive process: - IDOC


Enter T-code SARA on the initial screen.

Archive administration screen will appear. Enter the archiving object IDOC for the IDOC archiving. Then click on Customizing.

Confidential Document

Prepared by Surojeet Dey

Page 8 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Select Archiving object-specific Customizing click on Technical settings.

Confidential Document

Prepared by Surojeet Dey

Page 9 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Logical File Name: Here, you enter the logical file name that is to be used for the archiving object when archive files are being stored in the file system. This logical file name is converted at runtime to a platformspecific physical file name under which the archive files are finally stored in the file system Give logical file name as Z_ARCHIVE_DATA_FILE_WITH_ARCHIVE_LINK. Archive file size: This parameter specifies the maximum size that an archive file can reach when running a write program You can specify the following: Maximum size in MB or Maximum number of Data Objects

1. The value that is reached first triggers the creation of a new archive file. If you leave both fields blank, only one archive file is created. 2. Many archiving objects have a preset maximum size of 100 MB and a preset maximum number of data objects of 0. For these archiving objects the maximum size of the archive file is the only parameter that 3. determines the size of the file. 4. Note that the maximum size of an archiving file is limited by the operating system and also by the external storage system if one is connected. 5. Since the deletion program is automatically started for each archive file, you can carry out delete and write jobs in parallel if relatively small archive files are created. This parallel activity can have a positive effect on the runtime of an archiving session, as the database is used more efficiently. If a file is too small, the number of processes rises and the system is negatively affected. 6. The ideal size is between 20 and 100 MB. The size must not exceed 2 GB, or no index can be constructed, thereby preventing single document access. Settings for Delete Program: Here, you set the control parameters for running the delete program.
Confidential Document Prepared by Surojeet Dey Page 10 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

You can set up a Test Mode Variant by modifying the parameters accordingly. A test mode variant does not delete data from the database. You can set up a Production Run Variant by modifying the parameters accordingly. A production run variant deletes the archived data from the database. 1. Delete program variants are client-specific. Consequently, you must make the variant settings in all the clients for which you want to carry out archiving sessions. 2. When archiving for the first time using a selected archiving object, the relevant test mode and production mode variants for the delete program must be fully maintained. Check whether both variants exist. Note especially, that if a production mode variant is not available, data is not deleted form the database when the delete program is run. 3. As a part of the delete job, you specify when the delete program is to be run in the background. If you activate the Not Scheduled radio button, the delete program is not run automatically. Instead, you can run the program at any time after archiving. 1. Delete jobs can also be scheduled without using Archive Administration (transaction SARA), either by employing an external job scheduler or with the program RSARCHD If you activate the Start Automatically radio button, the delete program is run automatically immediately after archiving. If it was specified in Customizing that the file storage is to take place before the delete phase, the delete program is not started until the file has been stored. 1. This radio button is of interest primarily if you want to save the archive files before the delete phase. If there is a long time period between the write phase and the delete phase, there is a danger that the data could be changed before it is deleted, which means that the data in the archive and in the database are no longer the same. The delete phase should therefore be carried out as soon as possible after the write phase Since Before Images has been deactivated for the rollback segments, there ought to be enough space available (Oracles Rollback Tablespace). If you activate the After Event radio button, the delete program is run automatically once a specific event has occurred. You select the relevant event by using the input help for the Event field. If an event requires that a parameter be set (an argument), enter the required parameter in this field. A parameter qualifies an event.
Confidential Document Prepared by Surojeet Dey Page 11 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

After the completion of all delete jobs for an archiving session, the ADK issues the event SAP_ARCHIVING_DELETE_FINISHED. The event parameter is the number of the archiving session. You can use this event for event-driven scheduling of accumulated archiving jobs. and the automatic backup of archive files using external tools. You can use transaction SM62 to display and maintain events 1. Here, you can specify whether an archive file is to be transferred automatically after successful processing to a connected storage system. Storage is carried out by the SAP Content Management Infrastructure (which contains the ArchiveLink/CMS interface). You an also specify the sequence of the delete and storage phases

Prerequisites
A storage system is connected to mySAP Business Suite. As a part of the delete job, we specify when the delete program is to be run in the background. We will use Start Automatically. This means that the delete program is run automatically immediately after archiving. Here we copied the test variant to SAP&TEST and production variant to SAP&PROD. While archiving we will specify which variant session it needs to select. Deletion program RSEXARCD will start after archive program RSEXARCA.

Confidential Document

Prepared by Surojeet Dey

Page 12 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Confidential Document

Prepared by Surojeet Dey

Page 13 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Click on SAVE

and go back

, Request screen will appear click to continue.

From the Below screen Click on WRITE to start the archiving process.

Confidential Document

Prepared by Surojeet Dey

Page 14 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Click on Maintain Variant.

Enter Name of Variant

Confidential Document

Prepared by Surojeet Dey

Page 15 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

We can create variants to suit varied requirements of the business. Few possible scenarios are: We can create variants to archive IDocs of a particular or a range of message type and current status .We can use current status as 03 for outbound IDoc and 53 for inbound IDoc so that we can keep all error IDoc in the database itself. We can create variants to archive IDocs coming from a particular sender A mix of the above two. For checking in which time frame IDoc are more go to SE16 and give table name EDIDS and click on content. In the CREDAT column give different date ranges and check for number of entries. You can also check the number of entries for the status type or in the combination of date and status. In the below screen we selected to archive all the IDoc which are created between 26.09.1998 to 27.09.1998 Type Archive Description IDOC status & there meaning.

IDOC STATUS CODE

Meaning of the STAUS code

0 1 2 3 4 5 6 7 8 9 10 11 12 13

No Not used, only R/2 No IDoc created No Error passing data to port Yes Data passed to port OK Yes Error within control information of EDI subsystem Yes Error during translation Yes Translation OK Yes Error during syntax check Yes Syntax check OK Yes Error during interchange handling Yes Interchange handling OK Yes Error during dispatch Yes Dispatch OK Yes Retransmission OK

Confidential Document

Prepared by Surojeet Dey

Page 16 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 50 51 52
Confidential Document

Yes Interchange Acknowledgement positive Yes Interchange Acknowledgement negative Yes Functional Acknowledgement positive Yes Functional Acknowledgement negative Yes Triggering EDI subsystem OK Yes Data transfer for test OK No Error triggering EDI subsystem Yes Error passing data for test No Dispatch OK, acknowledgement still due Yes Error during retransmission Yes Control information of EDI subsystem OK No Processing despite syntax error (outbound) No Error during syntax check of IDoc (outbound) No Error in dispatch level (ALE service) No Not used No Error in ALE service No IDoc ready for dispatch (ALE service) Yes Error - no further processing No IDoc was edited Yes Original of an IDoc which was edited No Error in control record of IDoc Yes IDoc reloaded from archive No Electronic signature not performed (timeout) No IDoc added incorrectly Yes IDoc archived No IDoc is in the receiving system (ALE service) Yes Application document not created in receiving system Yes Application document created in receiving system No IDoc was created by test transaction No IDoc added Yes Error: Application document not posted No Application document not fully posted
Prepared by Surojeet Dey Page 17 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

Yes Application document posted No Error during formal application check No Formal application check OK No IDoc with errors added Yes Test IDoc: Error during application check Yes IDoc-Copy from an R/2 connection No Not used Yes Error during syntax check of IDoc (inbound) No Processing despite syntax error (inbound) No IDoc passed to application No Error passing IDoc to application No IDoc ready to be transferred to application No Error in ALE service No IDoc is waiting for predecessor IDoc (serialization) No Not used Yes Error - no further processing Yes IDoc was edited Yes Original of an IDoc which was edited Yes IDoc reloaded from archive No Not used, only R/2 Yes IDoc archived Yes IDoc was created by test transaction

Confidential Document

Prepared by Surojeet Dey

Page 18 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Enter the variant name and click on maintain

Enter the selection criteria that we have entered for looking at the number of entries, here dates from 26.09.1998 to 27.09.1998 then click on attributes and save after giving proper description for the variant. We can test run for checking or Production run for Archive.

Confidential Document

Prepared by Surojeet Dey

Page 19 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

Now Click on START date and the next popup will appear from here we can select the time and event for the JOB run. Next click on spool parameter and maintain appropriate printer for the output.

Then click on EXECUTE Below in the status bar this msg should appear we can check the status of the JOB in SM37

Confidential Document

Prepared by Surojeet Dey

Page 20 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

After successful completion of the WRITE job from the initial screen execute the DELETE program. From Archive selection screen select the successful session by checking the check-box and again maintain START date and SPOOL parameters.

This will delete the data from the data base.

Confidential Document

Prepared by Surojeet Dey

Page 21 of 22

ManageIT Services

GSMC.SAP.

Step by Step SAP Archiving Process SOP

Effective from:00.00.0000

During the process we can always monitor the archiving the session by clicking Management Tab

This shows that the Archiving session completed successful and the below screen shows the archive file on the Operating System Level.

Confidential Document

Prepared by Surojeet Dey

Page 22 of 22

You might also like