• No results found

Data Archiving in SAP

N/A
N/A
Protected

Academic year: 2021

Share "Data Archiving in SAP"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

Contents

Introduction ... 3

Advantages of database archiving ... 3

What is an Archiving Object? ... 3

Archive Information System ... 3

How to find the relevant Info Structure for each object ... 4

How to activate info structures ... 5

How to fill an Info Structure ... 6

How to create a new info structure ... 9

Archiving Configuration steps ... 11

Cross – Archiving Object Customizing ... 11

Archiving Object – Specific Customizing ... 12

Define Delete jobs ... 13

Basis Customizing ... 14

Application Specific Customizing ... 16

Define “Residence time” for Archiving object ... 16

Sales Document Archiving ... 18

Archiving object Sequence ... 18

Archiving – Step by Step ... 19

Pre-requisites to archive sales documents ... 19

Step 01: Pre-Processing ... 19

What are Spool Parameters and why? ... 21

Check Suitability for Archiving ... 23

Step 02: Writing ... 25

Step 03: Delete ... 28

Step 04: Read ... 30

Archiving management tool ... 31

Archiving statistics ... 32

Retrieving SD documents from archiving ... 33

(2)

Retrieving Billing Documents ... 35

Read archived SD documents from document relationship browser (DRB) ... 35

What is DRB? ... 35

Read archived SD documents from archive Info system ... 38

(3)

Introduction

As the time goes on any database system can suffer from performance issues due to large volume of data. Once data volume is high, it uses more resources hence system performance get dropped. To avoid such cases, data which is no longer used by the system should be removed from the database and kept in a separate place for later references. During archiving, data is automatically compressed by up to a factor of 5.

This process is known as Archiving.

Advantages of database archiving

 Resolves storage space and performance problems caused by large volumes of transaction data  Makes master data easier to handle and to keep up to date

 Ensures statutory data retention rules are observed

 Ensures that data can be re-used at a later date, for example in new product development.

What is an Archiving Object?

The archiving object is the core of the SAP archiving concept. The archiving object determines what is archived and how. It also describes which database objects must be handled together as a commercial object and which must be interpreted independently.

Data in the R/3 Database can only be archived using archiving objects, which describe the data structure and context.

Archive Information System

The Archive Information System (AS) is a generic tool for indexing data archives and is fully integrated into the SAP Data Archiving environment. The indexes created with this tool, which are called Archive Information Structures, are used to display archived data.

First you should check if an information structure already exists that you could use for reporting. You can then change this information structure to suit your needs. If there is no information structure available that you can use, you can create a new one.

You define the information structure to be used for archive reporting. In doing this, you specify which source fields from the archive are copied to which fields in the information structure. You do this with the help of application-specific field catalogs, which are included in the features of the Archive Information System.

(4)

In simple terms, if you need to retrieve data after archiving took place, you need to activate all relevant info structures for that archive object first.

How to find the relevant Info Structure for each object

Transaction: SARA

 Press button option

Same can be directly reached through the transaction SARI.

 Click on button

 User search help or Press “F4” under “Archiving Info structure” field

 Use search option in the F4 help

(5)

 You’ll be able to see all relevant “Info structure” for that object here.

Important:

You have to find relevant info structures for all your archiving objects before archiving any data. Then you need to activate those.

How to activate info structures

Transaction: SARA

 Press button option

Same can be directly reached through the transaction SARI.

 Press on button. Transaction: SARJ will get you to the same window as well.  Enter relevant info structure

(6)

 Press button

 If it’s successful, system will give a message like this;

Important:

Same has to be done for all relevant info structures in all relevant archive objects. For example, for archiving object: SD_VBAK; you have to activate below info structures.

How to fill an Info Structure

This step is optional. (Only if you have done archiving without activating Info structures)

During an archiving delete run all (activated) archive information structures belonging to an archiving object are filled automatically. Also the Archive Development Kit (ADK) transfers all data records found in the archive to the AS interface. From the defined info structure, the AS filters the data from the data records transferred and enters it in a transparent database table together with an access key. This table serves as the basis for later searches.

This function allows you to fill an information structure with data from the available archives if the delete program has already processed those archives.

(7)

 Click on button

You can directly access this window from the transaction SARI

 Click on button

 Enter “Archive Object” and press button

(8)

 Mark all info structure with red light and click on button

 Choose processing time as “Dialog” for below message

 You’ll get a message as below

 Press Enter

(9)

How to create a new info structure

This step is optional.

If required; you can create new info structures to read archived data. An information structure is only valid for one archiving object. Several information structures can be defined for one archiving object. Eg: For archiving object SD_VBAK; you have below set of info structures.

Transaction: SARA

 Click on button

 From screen, click on button

 From press button

 Give a ID, Description, relevant archive object and Field Catalog for new info structure as follows

(10)

 Enter relevant Development Package (Get it from Technical/Basis consultant)

 Press

 Now from , add fields you want to be in the selection criteria

from “Optional fields” table to “Info structure fields” table by highlighting and clicking button

(11)

Now you have created a new info structure. You need to activate this structure before using it for archiving.

To activate it; please refer; “How to activate info structures” section in this document.

Archiving Configuration steps

Transaction: SARA

This transaction is a one stop shop for all archiving related settings, such as customizing, pre-processing, archiving, deleting, reading, management, etc.

Before archiving an object, you need to customize relevant settings.  Enter relevant Archive object

 Press button

Cross – Archiving Object Customizing

 Accept all default settings in section

You can review the defaults and update them appropriately. For example, you may want the system to check for files in the file system or for stored files, have the system verify the archive file existence before deleting, indicate the maximum amount of data you can write to the archive file, and give the name of the server group name for a background job.

(12)

Archiving Object – Specific Customizing

 Click on under

(13)

 Press

 Under “Settings for Delete Program”, you have to maintain given 2 variants  To maintain “Test Mode Variant”, click on button

 Mark “Test Mode” option

 Click on button

 Enter a name under “Meaning” field. Here I’ll user same Name as Meaning.

 Press

 Press button and come to screen

 Now click on “Live Mode Variant” and press button  Create the variant there as per above mentioned steps.

This has to be done to all relevant objects. Define Delete jobs

Once archiving is done, you need to delete archived data from the data base. You can setup this in 3 ways. This you can define under “Delete Jobs” section.

(14)

Select if you want to manually carry out deleting.

 Once done, Press

Basis Customizing

In this step you have to define the archive file path. This path is a global setting for the entire client. (Object Independent) You can specify the external storage system and based on the configuration, the system automatically transfers the archived files to the subsystem. You should link the external storage system to the SAP system for file transfer. If you haven't specified the external storage system, you can use the SAP Content Management Infrastructure.

As the name specified, this is done by basis consultants.

 Click on under section

(15)

 Highlight “ARCHIVE_GLOBAL_PATH - Global path for archiving files” line and click on node in “Dialog Structure” section

(16)

As per my example, my archive files are saved to “G:\usr\sap\archive\<FILENAME>”

Application Specific Customizing

Define “Residence time” for Archiving object What is Residence time?

The residence time refers to the amount of time that has to pass before a business object to be archived. Residence time is measured in number of days and is entered in application-specific Customizing for a specific archiving object.

The residence time can begins either with the creation date of the document, or with the last change date.

Transaction: SARA

 Press button

 Click under “Application-Specific Customizing”

(17)

Same can be accessed from the transaction VORA as well.

 Enter Sales Organization, Sales Document type & Residence time in days here

 Press and get the TR number Note:

If you haven’t maintained the above step, you’ll get below error message during the archiving process. Message no. VB801 - Internal error: DYNSQL_GENERATE_WHERE_CLAUSE (4)

(18)

Eg:

Sales Document Archiving

Archiving object Sequence

Archiving has to be done in a sequence. For example, to archive sales document, you need to archive delivery, billing first. (It’s like you need to archive all depended data of it first.)

In order to find depended objects, go to transaction SARA.  Enter the object under “Archiving object” field

 Press

(19)

With the network graphic, you can display an overview of the existing archiving objects, their interdependencies, and the status of the most recent archiving.

 By double clicking each box, you can directly go to relevant archiving screen.

 By dragging the navigation box in the navigation area, you can get all dependent objects.

Archiving – Step by Step

Scenario

Eg: I’ll get single sales document and archive. SO # 1000093

Pre-requisites to archive sales documents

Please refer SAP Note 481577 - Archivability criteria for sales documents

Step 01: Pre-Processing

Some archiving objects require a program that prepares the data for archiving. This program flags 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 Administration. This is not available for all archiving objects.

Transaction: SARA

(20)

 Press button  Enter a variant ID

 Click on button

 Set relevant selection parameters. (As per my example; EI have to enter the Sales Document no)  Mark below tick boxes

 Press button

(21)

 Press

 Click on button

 Click on button to enter a start time for archiving process. Based on scheduling or immediate execution, you have to setup data in this screen.

 If it’s a immediate execution, click on button  Click on ,

Now you need to maintain Spool Parameters for the archiving process. What are Spool Parameters and why?

Controls the print output of the generated archiving log.

You can choose Properties to maintain additional properties of the spool request. You do not generally change these properties for each spool request.

If you have not configured any printer Enter LP01 or LOCL .These output types comes with the system and just create spool and the spool will be deleted based on the Basis Configuration. Spool parameters that are already specified in the user defaults or in the user-specific print parameters are automatically applied. Otherwise, you only have to specify the spool parameters for the execution of the first ction in an archiving session. They are retained until the end of the archiving session.

(22)

 Click on in same screen.  Press

 Once above 2 steps are completed, traffic lights has to be turned to green.

 Now press button

 You’ll get a system message like this.

 To check the log on processing status, click on button  In the “Job Overview” you can see the status of the job.

(23)

 Click on the line and press button to see details.

 Now press and come to

 Now you need to write the Archive file.

You can check whether any SD document can be archived by executing below report. Check Suitability for Archiving

Transaction: SE38

(24)

 Enter the report name as S3VBAKPT and press . (This report is for SD documents only)

 Enter sales document number you want to check

 Make sure you mark below tick boxes under “Document Selection” section

 Press

(25)

Step 02: Writing

This program creates archive files and writes data to them. It does not delete the data from the database. You can specify in archiving object-specific Customizing, whether the delete program is automatically started after an archive file is created.

(26)

 Press button

 Enter a variant ID for write data to archive file.

 Click on button to create a variant.

 Click on below options

By selecting you specify, last change will have an impact on

residence time calculation.

(27)

 Set below settings for logs

 Click on button to maintain variant attributes  Enter description for variant in “Meaning” field

 Press

 Press and come to screen

 Press button

 Press to start immediately.  Press

 Press button

 Press

 Now you should be able to see all traffic lights are turned to green.

 Now press button

 Click on button to see the log.

(28)

 Click on to view details.

You have created the Archive file successfully.  Press and come to

Step 03: Delete

The data is usually deleted from the database, but in some circumstances, the archived data is only flagged for deletion in the database.

You can specify in Customizing for archive objects whether archive files are to be automatically passed to an archive system via ArchiveLink after processing.

 Click on button to delete the archived files from the database.

 Click on with your user ID

(29)

 Press

 Press button

 Press to start immediately.  Press

 Press button

 Press

You should be able to see all traffic lights are turned to Green.

 Now press button. You’ll get message.

 Make sure you un-tick “Test Mode” button

 Press to check the log.

 Press button till you get “Finished” status for the job.  Once job is finished, click on to see the log

(30)

Same process is applicable for each archive object. Eg:

SD_VBAK - Sales Documents RV_LIKP – Deliveries

SD_VBRK - Billing Documents

Step 04: Read

You can read archive data via this option. Transaction: SARA

 Enter relevant archive object and press button

 Press button

(31)

 Press button

 If you know the relevant archive session, then select that or mark all archive sessions

 Press button

Archiving management tool

In the transaction SARA, if you press button, you can see Sessions, Files Archiving Objects, Job details, Physical File Name, Logical Path, File Name, size and the status.

(32)

 Enter the object

 Press button

Archiving statistics

This is used to see statistics about space saved in MB. From the transaction SARA,

 Enter the archiving object

(33)

You should be able to see the statistics of the data archiving for that object.

Retrieving SD documents from archiving

Some archived documents can be viewed directly from SAP transactions.

Retrieving Delivery Documents

When you archive delivery documents, you can read them via VL03N transaction. But, system issues a message as follows,

(34)

To view connected documents (Sales order, billing, etc) you have to use the menu option, Environment -> Relationship Browser

(35)

Retrieving Billing Documents

Transaction: VF07

Once billing documents are archived, you can read them from the transaction VF07.  Enter the billing document number

 Press Enter key

Read archived SD documents from document relationship browser

(DRB)

What is DRB?

Using the DRB, you can display linked objects or documents. Generally, these are documents resulting from a common business transaction or belonging to a common process. The DRB groups the documents together across applications. Typical accounting and logistics documents are included in the DRB.

(36)

As of SAP Web Application Server Release 6.20, workflow logs and I-docs are also displayed in the DRB. All objects are connected to the DRB so as to allow access to archived data.

Transaction: ALO1

 Select the relevant category

 Press

(37)

 Select option  Press

 You’ll get the archived data as follows

(38)

Read archived SD documents from archive Info system

Transaction: SARA

(39)

 From screen, click on button

 From screen; press

button

 Enter relevant “Archive lnfostructure” and press

(40)

 You should be able to see the relevant document overview

 Click on button to view the document  Select the relevant data object and press Enter

(41)

 If you select option, you’ll be able to view data relationship browser.

Useful SAP Notes on SD Archiving

Below listed are some useful SAP notes on SD archiving.  547748 - FAQ Archiving of Sales Documents  492938 - FAQ Document Relationship Browser  481577 - Archivability criteria for Sales Documents  488970 - Archivability criteria for billing docs  99388 - Archive Information System

 102446 - Archiving objects, Application Area, Customer Messages  497768 - Reloading archived deliveries (object RV_LIKP)

(42)

Author: Anupa Wijesinghe

E-Mail: [email protected] / [email protected]

Website: www.learnsaptips.com View my profile in LinkedIn Follow me on Twitter

Disclaimer

This article is done based on my research and readings, unless otherwise stated. The views expressed are my own and not of anyone else.

Author accepts no liability for the content of the articles in this website or for the consequences of any actions taken on the basis of the information provided. Using this information is at the users own discretion and responsibility.

References

Related documents

These stakeholders included DoD employees and their supervisors, federal government oversight agencies to include the Government Accountability Office (GAO) and the Office

In this Delphi survey, 30 physical therapists reached consensus on the majority of items relating to the def- inition and application of Pilates exercise in people with CLBP

The WarpDrive card enables very high IOPS to accelerate high demand applications such as real time network analysis.. Where standard HDD technology might not be able to keep up,

More information on what mobile payment calculator to credit approval process easier for new home loan term of the calculation.. Responsible for rapidly appreciating values can

[r]

Reconnex Niche player Network filtering – CMF to capture full forensic information of inbound and outbound traffic in a database. Integrate with e-mail systems and

Email filtering is a process of monitoring incoming email and then taking the appropriate action to protect against Spam and viruses. Certain criteria are set to determine if an

One feature emerging from Reddy and Hill’s (2002) research on placement assessment was that the sandwich year was clearly valued by students to the extent that a ‘placement