Background documentationArchiving and Destroying Payroll Documents Using PA_PDOC (PY-XX-DT)

 

You can use the archiving object HR: Payroll Documents for Posting to Accounting (PA_PDOC) to archive and destroy posting documents in Payroll (PY) for posting to Accounting.

The archiving object PA_PDOC supports the SAP NetWeaver Information Lifecycle Management (ILM) function for archiving and the destruction of data. For the destruction of data, you specify the rules for retaining payroll documents. When running the write program of the archiving object, the system performs checks to evaluate these rules and determines which of the selected data can be destroyed. The data is temporarily written to an archive file. After the write phase, the associated delete program deletes the data from the database and the archive.

Prerequisites

You can archive or destroy payroll documents of a posting run if they have one of the following statuses:

  • Documents Transferred

  • Documents Posted

  • Reversal Documents Transferred

  • Reversal Documents Posted

  • Partial Archiving Performed

Integration

When posting to Accounting, the payroll results are supplemented by index files. With these index files, an assignment is set up between the payroll results for employees and the document data. The index files are archived using the archiving object PA_PIDX. For more information, see Archiving and Destroying Index Files Using PA_PIDX (PY-XX-DT).

The payroll results are archived using the archiving object PA_CALC. For more information, see Archiving Payroll Results Using PA_CALC (PY).

Features

The following actions are available for the archiving object PA_PDOC:

  • Archive

  • Delete

    The standard SAP system is set up such that the delete program is called automatically after archiving. We recommend that you do not change this setting.

  • Postprocessing

  • Read

  • Administration

The archiving object PA_PDOC archives and destroys all document items of the documents selected using posting runs. The table PPDHD Document Headers is archived but remains in the database. This also applies to a data destruction session.

The following data is not archived or destroyed:

  • Attributes of a posting run

  • Document items of simulation runs

  • Document items of documents with errors

A container of the archiving object PA_PDOC is about 4 KB in size.

Procedure

  1. Familiarize yourself with the features of this archiving object.

    To display the tables from which data is deleted for this archiving object, in Archive Administration (transaction SARA), choose DB Tables.

  2. Perform the Customizing settings for archiving.

    For more information, see Application Customizing (PY_XX_DT)

  3. Familiarize yourself with the periods and criteria for archiving.

    For more information, see Archiving Periods and Criteria (PY-XX-DT)

  4. Archive or destroy the payroll documents.

    For more information, see Archiving and Destroying Payroll Documents (PY-XX-DT)

  5. Create a variant for the write program of this archiving object.

    For more information, see Archiving - Maintaining a Variant (PY-XX-DT)

  6. Create a variant for the postprocessing program of this archiving object.

    For more information, see Postprocessing - Maintaining a Variant (PY-XX-DT)

  7. Create a variant for the display program of this archiving object.

    For more information, see Analyzing - Maintain Variant (PY-XX-DT).

  8. Ensure that you have the authorizations required for this archiving object.

    For more information, see Authorizations (PY-XX-DT)

  9. Display archived payroll documents.

    For more information, see Displaying Archived Payroll Documents (PY-XX-DT)