Top Banner
1 SAP Data Archiving Deutsche Bank
23
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SAP Data Archiving

1

SAP Data Archiving Deutsche Bank

Page 2: SAP Data Archiving

2

Table of contents

1. INTRODUCTION .........................................................................................................3

2. SARA (ARCHIVE ADMINISTRATION) TRANSACTION OVERVIEW ........................4

3. ARCHIVING OBJECTS ..............................................................................................8

4. CUSTOMIZING ......................................................................................................... 11

Logical File and Path names ..................................................................................................................................... 12

Archive file size .......................................................................................................................................................... 13

Settings for the delete program ................................................................................................................................. 13

Postprocessing settings .............................................................................................................................................. 13

5. ARCHIVING PROCEDURE ...................................................................................... 14

Creating archive files ................................................................................................................................................. 14 Preprocessing ........................................................................................................................................................ 15 Write ...................................................................................................................................................................... 16 Deleting data from database .................................................................................................................................. 16 Delete .................................................................................................................................................................... 16 Postprocessing ....................................................................................................................................................... 17

Accessing to archived data ........................................................................................................................................ 17

6. FIELD CATALOGS ................................................................................................... 19

Creating field catalogs ............................................................................................................................................... 19

Associating the field catalog to an info structure .................................................................................................... 21

Filling the info structure ............................................................................................................................................ 21

7. INFORMATION LINKS ............................................................................................. 23

Page 3: SAP Data Archiving

3

1. Introduction

Archiving of EBP documents is not in place. Only a one time run will be scheduled in order to archive EBP documents (Shopping Carts, POs and Confirmations) according requirement conditions.

Conditions for Confirmations (GR) archiving: o CF is it is transferred to R/3, deleted, parked, release or rejected and is

older than 1st of January 2010

Conditions for Purchase Orders (Pos) archiving: o PO is it is transferred to R/3 and PO is older than 1st of January 2010 o PO has status deleted and PO is older than 1st of January 2010 o PO marked for deletion through SIR 50552 which was to stop specific

PO’s from getting good receipts must be excluded from SRM archive selection criteria in case they need to be reactivated.

o ARVATO vendor 1002000011 will show as open PO’s but these PO’s can

be included in the SRM archived if older than 2010.

Conditions for Shopping Carts (SCs) archiving: o SC has status I1106 (shopping card ordered), does not have any link to

corresponding follow on documents and SC is older than 1st of January 2010

o SC has status deleted or all SC items are deleted and SC is older than 1st of January 2010

Approach: Schedule to be executed over several weekends in intervals of one year 2005 to 2009:

o GR archiving for 2005-2009 o Arvato PO’s archiving for 2005-2009 o Other vendors PO’s archiving for 2005-2009

o SCs archiving for 2005.2009

Page 4: SAP Data Archiving

4

2. SARA (Archive Administration) transaction overview

From SARA transaction you can configure and check almost all parameters involved in archiving.

Here you can configure application-specific customizing such residence times (time that the completed EBP document remains in the system before it is considered for archiving). You can also perform archiving object-specific customizing (logical file name, maximum size or maximum number of data objects in generated file…).

This tool helps you to investigate which tables are involved in the archiving process. You can either search by a particular table and get the archiving objects that retrieve information from this table or search by a given archiving object and get all the tables from which data is archived.

Page 5: SAP Data Archiving

5

The Archive Information System (AS) is a generic tool for implementing searches in data archives. The search for and display of data follows rules set in the Archive Information Structures, which the user can define and fill with data from the archive. You can access directly to this section by SARI transaction.

Page 6: SAP Data Archiving

6

In this section you can do a search through the archived data for a particular archiving object and info structure. The search is done by accessing the archive information structures that have been created and stored in transparent database tables using the Archive Retrieval Configuration (SARJ transaction).

For the combination shown in the picture above, the following selection criteria appears:

The fields for doing the search are defined using the Field Catalogs. You can add or remove fields by modifying the field catalogue associated to the archiving object.

In this part, you can see the status of a particular archiving session. You can either choose the status per archive, where you can see the status of each archive session or status per info structure where you can see the general status of a particular archiving object grouped by the info structure. It allows you to check whether an information structure has already been filled or not.

Page 7: SAP Data Archiving

7

In this section you can create/display/modify a particular archive info structure with the help of field catalogs. An info structure is the central element of the SAP Archive Information System (SAP AS). It contains data fields and enables you to find and display archived data.

Here you can display some statistic information about the archiving sessions.

Page 8: SAP Data Archiving

8

3. Archiving objects

The archiving object is a central component of SAP Data Archiving. The archiving object specifies precisely which data is archived and how. It describes which database objects must be handled together as a single business object. and interprets the data irrespective of the technical specifications at the time of archiving (such as release and hardware)

It should be noted that when an archiving object is filled with concrete application data it is called data object.

Page 9: SAP Data Archiving

9

o General Information

Object Name Name of the archiving object

Text Short description

Application Area Organizational category for assigning archive files

Application Component Used for assigning archive files

o Programs and Functions

Write Program

Name of the program that writes the archive files

Page 10: SAP Data Archiving

10

Interruption Possible

Setting this indicator means the archiving object supports Interruption and Continuation of an Archiving Session. If you set this, the write program must also handle the interruption request. This indicator must not be set if the Do Not Start Before End of Write Phase is set.

Delete Program Name of the program that deletes the data from the database after the write program has finished

Do Not Start Before End of Write Phase

If this indicator is set, the delete programs do not start until the write program is finished. To actually start the delete phase immediately, the Start automatic. indicator must be set in archiving-object-specific Customizing.

Reload Program (optional) Name of the program with which the data can be loaded from the archive back into the database.

Prohibit New Session During Reload

If this indicator is set, no new archiving session is generated when reloading archiving sessions. The reload program is not authorized to call the function module ARCHIVE_SAVE_OBJECT.

Preprocessing Program (optional) Name of the program with which data is to be prepared for data archiving.

Postprocessing Program (optional) Name of the program with which data is to be processed after it has been archived. If, for example, the data is only marked for deletion in the delete program, the actual deletion can be executed in the postprocessing program.

Index Build Program

Name of the program for building indexes

ArchiveSelect.Active

If this indicator is set, the Archive Selection pushbutton is displayed in transaction SARA for building and deleting indexes. If you select archive files using variants, do not set this indicator.

Index Delete Program

Name of the program for deleting indexes

Index Build Allowed

If this indicator is set, an index can be created for this archiving object.

"Invalid" Indicator Cannot Be Revoked

Page 11: SAP Data Archiving

11

If this indicator is set, the "Invalid" indicator for archiving sessions cannot be reset in archive management once it is set.

Archiving Object Generated

Indicates the archiving object was generated.

Cross-Client Archiving is client-independent.

End Dialog Dialog mode must stop before archiving can begin. Only set this if collisions may occur during data archiving. In general, this should not be set as it was primarily designed for older archiving objects where parallel operation was not able to be guaranteed between online operation and data archiving.

o Documentation

Info for Write Program

Name of the document containing information about the object-specific write program

Info for Delete Program Name of the document containing information about the object-specific delete program.

Info for Reload Program

Name of the document containing information about the object-specific reload program.

Info for Preprocess Prog Name of the document containing information about the object-specific preprocessing program.

Info for Postproc Prog Name of the document containing information about the object-specific postprocessing program.

Info for Read Program

Name of the document containing information about the object-specific read program.

4. Customizing

Customizing for Archiving enables you to set parameters that affect the archiving process.

Page 12: SAP Data Archiving

12

Logical File and Path names

Here, you enter the logical file and path name that is to be used for the archiving object when archive files are being stored in the file system. Those names are converted at runtime to a platform-specific physical file name under which the archive files are finally stored in the file system. The definition and the maintenance of those elements is done through FILE transaction.

Page 13: SAP Data Archiving

13

By clicking on the left menu you can define logical file and path names.

Archive file size

This parameter specifies the maximum size or data objects that an archive file can reach when running a write program. The value that is reached first triggers the creation of a new archive file. If both parameters are left in blank, only one archive file is created.

Settings for the delete program

Here you can set up Test Mode and Production Mode variants. While the first one do not delete data from the database, the second one deletes archived data from database.

Postprocessing settings

Here you can schedule a postprocessing program to run after the delete phase. Postprocessing programs carry out operations following an archiving session, such as updating statistics and cleaning up secondary indexes. Most archiving objects do not require a postprocessing program.

Page 14: SAP Data Archiving

14

5. Archiving procedure

The basic archiving procedure involves the following steps:

1. Creating archive files 2. Storing archive files 3. Retrieving archive files 4. Deleting data from the database

There are two ways to carry out the archiving process:

1. Using SARA transaction, passing through all steps that are defined for the current archiving object. The action buttons appears in this transaction if you have previously configured the associated program in AOBJ transaction. This way allows you to schedule jobs for doing those actions.

2. Executing in order the reports associated to each action manually. You can execute all steps directly using SE38 transaction.

SAP provides a standard archiving object to archive documents. It has associated standard programs to carry out the archiving, which are: PREPROCESSING -> BBP_PD_ARCH_CHECK Deutsche Bank was implemented -> YP00ERQ321_BBP_PD_ARCH_CHECK WRITE -> BBP_PD_ARCH_WRITE Deutsche Bank was implemented -> YP00ERQ321_BBP_PD_ARCH_WRITE DELETE -> BBP_PD_ARCH_SET_STATUS POSTPROCESSING -> BBP_PD_ARCH_DELETE Deutsche Bank was implemented -> YP00ERQ321_BBP_PD_ARCH_DELETE

Creating archive files

In order to create the archive file you have to execute the preprocessing and the write program.It is done by pressing the corresponding button on the above screen.

Page 15: SAP Data Archiving

15

Preprocessing

Here you can maintain variants for preprocessing program, the start date for the job that will execute it and the spool parameters. If you click on maintain variants, the selection screen of the preprocessing program is shown.

Program: “YP00ERQ321_BBP_PD_ARCH_CHECK”

In this step, the program checks whether the SC you have introduced in the variant can be marked for archiving or not. If so, the SC status is set to “Can be archived”.

Page 16: SAP Data Archiving

16

Write In this section you can maintain the same parameters as in preprocessing step, but this time if you click on the maintain variants button the selection screen of the write program is shown. Program: “YP00ERQ321_BBP_PD_ARCH_WRITE”

This program writes in the archive all SCs that accomplish the selection criteria provided in the screen above.

Once you have executed two previous steps, the file is generated and populated with the selected shopping carts.

Deleting data from database

Like the creating archive file process, the deletion process consists of two steps. The first one is DELETE step, that marks all the archived SCs with “Archived” status. The second one is POSTPROCESSING that is in fact the program that actually deletes the SC from the database.

Delete

Once the associated program to this step is executed, all SCs stored into the archive file are marked with “Archived” status so that they can be deleted.

Page 17: SAP Data Archiving

17

In this case you have not to maintain any variants because the associated program has no selection parameters. Instead of that, you have to select from which archive sessions you want to delete SCs. This is done by clicking on the “Archive selection” button. Postprocessing

When the postprocessing associated program is executed, all the SCs archived are deleted permanently from de database.

Accessing to archived data

SAP data that has been archived must be accessible for reading. The following tools are provided for accessing archived data:

1. Archive information System: the archive information system (transaction SARI) allows you to configure your own archive information structures, fill them with data from the archive and use them to search for archived data. It is only possible to access archived data if such an infostructure exists and has been filled. This can be done automatically during the delete phase or at a later point in time, manually (through “Build Structures” in SARI transaction).

Page 18: SAP Data Archiving

18

Transaction “SARI”

Infostructure YP_SAP_BBP_SC

Selection of archived documents

2. Archive file Browser: The archive File Browser (transaction AS_AFB) offers

functions to display the contents of archive files. This tool is particularly useful

Page 19: SAP Data Archiving

19

for administrators and someone who might be looking for problems that occurred during archiving. It is not an end-user tool.

3. Custom program: You can develop your own program to access and display archived data. For do that you must use the functionality that provides the Archive Development Kit. For instance, you can have a look to report RSARCH19 and find out how to read archive files. You can also have a look to the report BBP_PD_ARCH_SEQREAD.

6. Field catalogs

In order to be able to do searches in the archive files, you must define and activate an info structure for the archiving object you are dealing with. Those information structures are defined on the basis of field catalogs.

Creating field catalogs

You can define your own field catalogs by accessing to transaction SARJ (Archive Retrieval Configurator). Then go to Environment Field Catalogs.

Page 20: SAP Data Archiving

20

When you are creating the field catalog, you have to provide values to the “File in index” and “Offset in index” fields. You can use the following values for the file names:

'D' - Includes the file name as a data field. This is the minimum value. It causes the archive file name to be entered in the data area of the structure table.

'K' - Includes the file name as a key field. Select this value if the entries in the table would otherwise not be unique.

You can use the following values for the offset:

'D' - Includes the name of the offset as a data field. This value is sufficient for a direct access to archived data.

'K' - Includes the name of the offset as a key field. Select this value if the entries in the table would otherwise not be unique.

' ' - (No value) The offset is not included in the structure table. Choose this setting if you do not want direct access. This allows you to reduce the size of the structure table.

To carry out the field assignment, first select the catalog and then the Field Selection function in the navigation area. Choose New Entries and enter the required data.

Page 21: SAP Data Archiving

21

Associating the field catalog to an info structure

When you are defining your info structure (SARJ transaction), you must provide the archiving object for which you are going to archive data. You must also provide the field catalog that the info structure is based on.

Once you have associated the field catalog to the info structure you must activate it so that the system creates the transparent table that will contain the data of the archived SC. For instance, the table created for SC archiving is called ZARIXEB2 and if you have a look to its fields, it has the same structure you defined in the field catalog. It should be noted that if you change the field catalog, you have to:

1. Deactivate the info structure 2. Change the field catalog 3. In SARI initial screen, go to Utilities Delete table

4. Activate the info structure 5. Load the data again using SARI transaction (Status)

Filling the info structure

Before you are able to search information on the archive file, you have to fill the info structure with the archived data. As we have already commented, the filling process can be done either automatically during the delete phase or manually at a later point in time.

If there have been any error during the automatic load, you can carry out the filling process using the “Status” button in SARI transaction.

Here you can get two views of the archiving sessions. “Status per archive” lets you to load data from the archiving session you choose.

Page 22: SAP Data Archiving

22

On the other hand, “Status per info structure” groups all the archiving sessions by their info structure. The advantage of this method is you can load all data for a particular info structure.

In both cases, once you have chosen all data you want to load, you must click on the “Build Structures” button so that data is loaded into his corresponding table.