Programme SAP PLM_AUDIT_ARC_AUD_CHECK - Archiving of Audit Management Transaction Data: Preprocessing Program

Purpose
Is used to check archivability and set the status 'Archived'

Integration
This function is part of the archiving of archiving object PLM_AUD incomponent Audit Management (CA-AUD).

Prerequisites
To be able to mark audits or audit plans for archiving, they must haveone of the following statuses: To Be Archived (I1805),Deletion Flag (I1810), Canceled (I1811), or Completed
(I1803).
The residence time for the object types Audit (AUO) and AuditPlan(AUP) are also defined in the archiving settings. If the statusis Completed this residence time has expired. The reference datefor the calculation of the date from which an object can be marked forarchiving is the change date of the audit or audit plan. If a changedate does not exist, the creation date of the audit or audit plan isused.
You can use the BAdI Archiving ObjectPLM_AUD: Add-On for Specific Checks (ARC_PLM_AUD_CHECK) to defineadditional archivability checks.
It is possible to define different residence times for the differentaudit types in this BAdI.

Features
After the prerequisites have been checked, the business transactionMark for Archiving (AM07) and the business transactionArchive (AM08) are executed in the preprocessing program. Thecorresponding statuses To Be Archived (I1805) and Archived(I1806) are also set at this point in time.
For an audit, the status Archived can only be set when there areno longer any outstanding actions assigned.
For an audit plan, the status Archived can only be set if thereare no dependent objects like audit plans or audits still linked to theaudit plan.
The status Archived is set in the preprocessing program so thatit does not have to be set in the write program. If there are anyprogram errors, this avoids a time-consuming rollback.
In addition, it is assumed that the write program will be run shortlyafter the preprocessing program and that the data is then written to thearchive.

Output
A summarized or detailed log is created. You can control this via theindicator Detail Log.

Activities
Start the preprocessing program using the transaction SARA via acorresponding job for the archiving object PLM_AUD.