Optically Archiving Batch Records (PP-PI) 
Use
You can use this function to store the documents with the R/3 data of the batch records in an optical archive. You carry out this function to archive a batch record before approving it. If your batch records are automatically archived during approval (see overall profile of the relevant material), carry out the procedure
Approving Batch Records instead.Batch records that have status Created are processed as follows during archiving:
- For the first version of the batch record, the system at the same time archives all documents that belong to a batch record according to your Customizing settings.
- For all later versions, the system only archives the changed documents Table of contents and Version data and any documents of R/3 objects that may have been added.
If new R/3 objects are created for a batch record that has already been archived, one of the following situations will occur:
- If the current version has not yet been archived, it is assigned status Partially archived as soon as you access it the next time to change it. The documents of the newly added objects and the changed table of contents are archived.
- If the current version has already been approved, the system creates a new version of the batch record when you access the batch record transaction in the change mode. You can then archive this new version (see above).
You can start archiving as follows:
- Online for selected batch records (see below)
- For a larger number of batch records by using a background job for the program PPPI_EBR_ARCHIVE Archive Batch Records
You can schedule the background job as follows:
- In Customizing to repeat the job periodically at certain time intervals
- From the batch record menu to start the job only once at a specific point in time (see below)
Prerequisites
The batch record has been generated (see
Generating Batch Records).
The current version of the batch record does not have status Partially approved.
- All process orders that belong to the batch record have status Closed or Technically completed.

When you close an order, the system does not check whether all process messages for the order have been sent successfully. To make sure that all message are transferred to the batch record, check the message status and message logs in the message monitor first.
- All PI sheets that belong to the batch record have status Completed, Terminated, or Discarded.
- All inspection lots that belong to the batch record have statuses Batch record required, Inspection close completed, and Lot locked for batch record.
- The usage decision has been taken for all inspection lots that belong to the batch record and do not have inspection lot origin 04 Goods receipt.
Procedure
Defining Background Jobs for Archiving
Choose Logistics
®
Materials Management
®
Material Master
®
Batch
®
<Activity>
®
Environment
®
Batch record
®
Environment ® Background processing.A dialog box appears from which you can call up the activities Define Selection Variant and Define Background Job.
Define a selection variant and schedule the background job.
For more information on how to proceed, see Customizing for Batch Records, section Define Background Jobs for Processing.
Archiving Batch Records Online
Create a worklist for batch record editing and call up the batch record you want to edit in the change mode (see
Editing Batch Records).

If you want your worklist to contain only batch records that can be archived, you must enter a selection profile that requires status Created or Partially archived as a selection criterion on the initial screen.
Choose
Archive.The R/3 documents of the batch record are archived.
If archiving terminates due to an error, an archiving log is created and the system issues a corresponding system message.
Evaluate the archiving log if required.
- Choose
Archiving log.
- Position the cursor on a message and choose Long text.
If available, a long text explaining the message is displayed.
- Correct the errors and start archiving again.
Result
The current version of the batch record is assigned status Archived. It can now be approved.
All R/3 objects belonging to the batch record are locked and can no longer be changed.
The process orders, inspection lots, and PI sheets belonging to the batch record are assigned status Batch record archived or Archived (EBR). You can thus delete them from the R/3 database in the next archiving run.

This also applies if the document profile assigned to the batch record in Customizing specified that process orders, inspection lots, or PI sheets are not included in the batch record.