Archiving Campaigns with EHPRC_CMP

Archiving Campaigns with EHPRC_CMP

You archive completed campaigns by using the archiving object EHPRC_CMP.

During archiving, the system determines all relevant compliance data records and stores them in an archive file. In a follow-up process, it deletes the archived compliance data record from the database.

Prerequisites

The following prerequisites need to be fulfilled before a compliance data record can be archived:

  • Campaign is in status complete (02)

  • The BOPF Business Object specific residence Period of the campaign has expired. Adjust the default value 9999 days in the Customizing activity Start of the navigation pathSAP Customizing Next navigation step Implementatin Guide Next navigation step Cross-Application Components Next navigation step Processes and Tools for Enterprise Next navigation step Applications Next navigation step Reusable Objects and Functions for BOPF Environment Next navigation step Archiving Adapter  Next navigation step Maintain BO-Specific Residence PeriodsEnd of the navigation path.

  • The retention residence period of the campaign has expired.

Structure

Tables

The archiving object EHPRC_CMP supports the archiving and deleting of data from different tables.

Under Archive Administration (transaction SARA), you can check the database tables of the archiving object EHPRC_CMP.

Programs

The following programs are delivered with EHPRC_CMP:

Action

Program

Description

Preprocessing

R_EHPRC_CMP_ARCH_PRE

Determines the archivable Campaigns according to the specified selection criteria and changes their status to Archiving in Progress.

Write

R_EHPRC_CMP_ARCH_WRI

Determines the archivable Campaigns according to the specified selection criteria, taking into account only those Campaigns with the status Archiving in Progress. Stores the selected campaigns in an archive file and changes their status to Archived.

Deleting

R_EHPRC_CMP_ARCH_DEL

Deletes the archived Campaigns from the database.

You can find the programs in the Archiving object definition (transaction AOBJ).

Classes

The archiving object uses the following classes:

Generic archiving class CL_EHPRC_CMP_ARCH_GENERATOR to ensure that all Campaigns are archived together with their related business objects. You can find the object-specific archiving class in Customizing for Start of the navigation pathSAP Customizing Next navigation step Implementatin Guide Next navigation step Cross-Application Components Next navigation step Processes and Tools for Enterprise Applications Next navigation step Reusable Objects and Functions for BOPF Environment Next navigation step Archiving Adapter  Next navigation step Maintain BO-Specific Archiving ObjectssEnd of the navigation path

Maintain BO-specific Residence Period

As a standard, the archiving object EHPRC_CMP for the business object EHPRC_CAMPAIGN, is delivered with a residence period of 9999 days as default customizing for the Customizing under Start of the navigation pathCross-Application Components Next navigation step  Processes and Tools for Enterprise Applications Next navigation step Reusable Objects and Functions for BOPF Environment Next navigation step  Archiving Adapter Next navigation step Maintain BO-Specific Residence PeriodsEnd of the navigation path. Đ¢his high value prevents you from deleting data accidentally and you can adapt the residence period according to your requirements.

Application-Specific Customizing for EHPRC_COD

Before you can use the archiving object EHPRC_CMP to archive campaigns, you must first check the archiving settings in Customizing.

Features

The following information has been added in Customizing forMaintain BO-Specific Archiving Objects under Start of the navigation pathCross-Application Components Next navigation step Processes and Tools for Enterprise Applications Next navigation step Reusable Objects and Functions for BOPF Environment Next navigation step Archiving AdapterEnd of the navigation path:

  • Business object: EHPRC_CAMPAIGN

  • Archiving object: EHPRC_CMP

  • Archiving class: CL_EHPRC_CMP_ARCH_GENERATOR

You can access all other Customizing settings under Archive Administration (transaction SARA) by using the Customizing button.

Displaying Archived Campaigns

You can use the Archive Information System (Transaction SARI) to display the archived compliance data in business view or technical view.

Prerequisites
  • The archiving object EHPRC_CMP has one information structure, which is based on the field catalog SAP_EHPRC_CMP.

  • The information structure has been activated and filled (transaction SARJ).

  • The information structure contains the field ROOT_KEY as a key field.

Features

You use the following settings to display summary reports for the archived compliance data

  • Archiving Object EHPRC_CMP

  • Archive Infostructure SAP_EHPRC_CMP

By double-clicking the node ID in the result list of the archive infostructure, you can display the campaigns.

ILM-Related Information for EHPRC_COD

You can use the archiving object EHPRC_CMP with the EHPRC_CMP ILM object as part of SAP Information Lifecycle Management to archive campaigns.

Prerequisites

You have activated the business function ILM (Information Lifecycle Management) under Display Business Function Status (transaction SFW5) to display the campaigns frame under Archive Administration (transaction SARA).

In the Information Retention Manager (IRM), you have specified the retention periods that are used to archive the documents under Archive Administration:

  • IRM Customizing (transaction IRM_CUST)

  • ILM Policies (transaction IRMPOL)

Features

Setting Up ILM Policies

For the archiving object EHPRC_CMP, the following fields have been specified in the ILM policies under IRM Customizing:

  • Available Time References

    • Date (LAST_CHANGE_DATE)

  • Available Time Offsets

    • Month (END_OF_MONTH)

    • Year (END_OF_YEAR)

  • Available Condition Fields

    • Type (EHPRC_CMP_TYPE_CODE)

  • Available Policy Categories

    • RST: Residence Rules

    • RTP: Retention Rules

The entries of these fields are visible when processing ILM Policies.

Setting up Customer-Specific Rules for ILM Policies

Under IRM: Customer-Specific Settings (transaction IRM_CUST_CSS) you can set up customer-specific rules for the archiving object EHPRC_CMP. These rules are considered when campaigns are archived by using ILM policies.

Variant Settings for Archiving EHPRC_CMP

When you schedule an archiving program under Archive Administration (transaction SARA) for campaigns, you must either enter an existing variant or create a new one. The variant contains the selection criteria for the campaigns that you want to archive.

Features

Under ampaigns, you can specify the campaigns that you want to archive. You can use the attributes campaign (unique identifier), campaign description, campaign type, business partner type and responsible person of a campaign to narrow down the selection criteria. As further selection criteria you can specify the timestamp when the campaign was changed the last time.

More Information

  • For more information on ILM, see the SAP ILM documentation in the SAP ERP Library on SAP Help Portal under http://help.sap.com/erp .
  • For more information about activating the ILM business function, see the SAP ILM documentation in the SAP ERP Library on SAP Help Portal under http://help.sap.com/erp .