Show TOC

  Archiving of EH&S Documents with ADK

Use

By storing EH&S documents in an archive, you relieve the load on your database and reduce its memory capacity requirements. For this purpose, the archiving program Archive Development Kit (ADK) is available.

Prerequisites

For the archiving object CV_DVS you require the authorization S_ARCHIVE.

Features

The archiving of EH&S documents with ADK comprises the following parts:

A preprocessing program in which the documents are marked for archiving. Here, the documents are given the status Archiving Is Running

A write program that performs the actual archiving

A delete program that deletes the documents physically from the database.

A reload program that assigns the report headers and report shipping orders the status Archived

In most cases you run all the parts of the archiving process automatically, one after another. You can display the documents from the archive and also, in theory, reload the documents from the archive – the latter should, however, remain the exception.

Activities

Preprocessing Program

You start the archiving process with the preprocessing program. You can run this program for historical report bodies and completed final reports from archive administration, for historical report bodies from report management, and for completed final reports from report shipping:

Archive administration:

On the SAP Easy Access screen, choose ToolsAdministrationAdministrationData Archiving

The Archive Administration: Initial Screen appears.

Enter the name of the archiving objectCV_DVSand confirm your entry.

Choose the Preproc pushbutton.

Define a variant.

You can specify the following selection criteria; multiple entries are also possible:

Specification

Generation variant

Report language

Change date

When you define the variant, you also specify whether you want to archive report bodies or final reports.

Save the variant and set the start date and the spool parameters.

For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

Report management:

On the SAP Easy Access screen, choose LogisticsEnvironment, Health and SafetyProduct SafetyReportsReport ManagementEdit Reports .

The Report Management: Initial Screen appears.

Select the reports in the report tree.

Choose ReportArchive

This menu path is active only if you have authorization for archiving.

The preprocessing program starts in the background. If you have also selected reports that do not have the status Historical , these are not transferred to the preprocessing program and incur an error message.

For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

Report shipping:

On the SAP Easy Access screen, choose LogisticsEnvironment, Health and SafetyProduct SafetyReportsEdit Report Shipping Orders

The Edit Report Shipping Orders: Initial Screen appears.

This menu path is active only if you have authorization for archiving.

Select the report shipping orders in the hit list.

Choose Report Shipping OrderArchive .

The preprocessing program starts in the background. If you have also selected report shipping orders that do not have the status Historical , these are not transferred to the preprocessing program and incur an error message.

For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

The preselected report bodies and final reports and the corresponding report headers and report shipping orders now have the status Archiving Is Running . The report bodies and final reports have been marked for deletion.

You must not start the delete program MCDOKDEL before the actual archiving with the write program.

Write Program

Start the write program by choosing the Write pushbutton on the Archive Administration: Initial Screen

Define the following variant:

For report bodies enter the document type SBR and for final reports enter the document type SBE.

Choose with the quick info text Dynamic selections and under Document Info Record specify the document status Archiving Is Running using the input help.

Make sure that the Only with Deletion Indicator indicator is not set.

In a productive system you should set the Create Archive File indicator. You should not set the Delete Program as Test Run indicator.

Save the variant.

Set the start date and the spool parameters.

The system writes the documents to an archive file. For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

Delete Program

Start the delete program by choosing the Delete pushbutton on the Archive Administration: Initial Screen

Choose which originals of the files archived by the write program you want to delete from the database.

Set the start date and the spool parameters.

The system deletes the documents from the database. For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

Postprocessing Program

Start the postprocessing program by choosing the PostProc pushbutton on the Archive Administration: Initial Screen

Set the start date and the spool parameters.

The report headers and report shipping orders are given the status Archived . For details about the program flow, choose with the quick info text Job Overview on the Archive Administration: Initial Screen

Automatic Program Run

You can run the archiving process partially automated. To do this, first start the preprocessing program manually as described above – either from archive administration or from the application. You then also start the write program manually from archive administration. If the relevant indicators are set in Customizing, the system starts the delete program and then the postprocessing program automatically.

To check the indicators, choose the Customizing pushbutton on the Archive Administration: Initial Screen . Under Archiving Object-Specific CustomizingTechnical Settings , the Start Automatically indicator must be set both for the delete program and the postprocessing program.

Displaying Documents from the Archive

To do this, start the read program by choosing the Read pushbutton on the Archive Administration: Initial Screen . As a result, the data is displayed unformatted as data records in a list for each document and table.

From the archive information system, which you start by choosing the Information System pushbutton on the Archive Administration: Initial Screen , you can also display data from the archive. The prerequisite here is the active info structure SAP_CV_DVS_EHS.

To check the info structure, choose the Information System pushbutton on the Archive Administration: Initial Screen . The Archive Information System: Central management screen appears. Choose the Customizing pushbutton. In the Archive Info Structure field, use the input help to check whether the entry SAP_CV_DVS_EHS exists and is active.

The system provides a technical view that basically corresponds to the read program described above and a view that calls the original in its application.

Reloading Documents

You should only reload documents in exceptional cases.

On the Archive Administration: Initial Screen , choose GotoReload

Define a variant.

The variant can contain certain document keys.

Select an archive file.

Set the start date and the spool parameters.

If the variant contains document keys, the corresponding documents are reloaded from the selected archive file and the other documents are written to a new archive file. Otherwise all documents are reloaded to the database. Report bodies, report headers, and report shipping orders are given the status Historical Final reports are given the status Completed