SAP ABAP IMG Activity /AIN/ARC_OBJECT_CHEC (BAdI: Check Object Data Before Archiving)
Hierarchy
AIN (Software Component) AIN 710: Add-On Installation
   AIE-AII (Application Component) Infrastructure
     /AIN/DM (Package) Auto-ID Data Management
IMG Activity
ID /AIN/ARC_OBJECT_CHEC BAdI: Check Object Data Before Archiving  
Transaction Code /AIN/79000001   (empty) 
Created on 20060728    
Customizing Attributes /AIN/ARC_OBJECT_CHEC   BAdI: Check object data for archiving 
Customizing Activity /AIN/ARC_OBJECT_CHEC   BAdI: Check object data for archiving 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /AIN/ARC_OBJECT_CHECK    

Use

When you archive using program /AIN/DM_ARCH_WRITE and you select the run time parameter Actions without document, the program selects all objects from table /AIN/DM_OBJECT for archiving. This may cause a problem because some of the archived objects may be linked to documents containing actions that were performed on the archived objects. If the related objects are archived, it would result in those documents remaining in the system without their corresponding objects.

Similarly, when you archive using program /AIN/DM_ARCH_WRITE and you select the run time parameter Documents with Actions, the program selects all objects from table /AIN/DM_OBJECT for archiving. This may cause a problem because some of the archived objects may be linked to actions that still point to those same objects. If the related objects are archived, it would result in those actions remaining in the system without their corresponding objects.

The BAdI /AIN/ARC_OBJECT_CHECK solves these problems by allowing you to write code and to perform the checks necessary to prevent this inconsistency. You implement the BADI method CHECK for any evaluations that you want to make before the system archives an object. The method CHECK has one import parameter (I_OBJECT) and two changing parameters (CH_VETO and CH_DETAIL_TEXT).

This BADI is called for each object to be archived. The import parameter I_OBJECT will contain the object details. If you wish to have the archiving process skip certain entries, for example, based on other active references, you specify CH_VETO = 'X'. You may use CH_DETAIL_TEXT to document the reason for skipping an entry during the archiving process.

Requirements

Before the BAdI can be called you must create and activate an implementation of the BADI by using transaction SE19.

Standard settings

Activities

You include your custom code in the CHECK method of your implementation.

Example

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20060915 
SAP Release Created in