Data archiving: production order

This blog will explain how to archive production order data via object PP_ORDER. Generic technical setup must have been executed already, and is explained in this blog.

Object PP_ORDER

Go to transaction SARA and select object PP_ORDER.

Dependency schedule is empty, so there are no dependencies:

Main tables that are archived:

  • AFKO (order headers)
  • AFPO (order items)
  • AUFK (order master data)

Technical programs and OSS notes

Preprocessing program: PPARCHP1

Write program: PPARCHA1

Delete program: PPARCHD1

Read from archive: PPARCHR1

Relevant OSS notes:

Guided procedure on production order archiving issues can be found here.

Application specific customizing

For archiving object PP_ORDER there is application specific customizing to perform. Select the order type:

And set the residence times:

Residence time 1 determines the time interval (in calendar months) that must elapse between setting the delete flag (step 1) and setting the deletion indicator (step 2).

Residence time 2 determines the time (in calendar months) that must elapse between setting the deletion indicator (step 2) and reorganizing the object (step 3).

Executing the preprocessing run

In transaction SARA, PP_ORDER select the preprocessing run:

Select your data, save the variant and start the archiving preprocessing run.

The run will show several functional issues: orders that are not completed and could not be marked for deletion with the functional reason.

Executing the write run and delete run

In transaction SARA, PP_ORDER select the write run:

Select your data, save the variant and start the archiving write run.

After the write run is done, check the logs. PP_ORDER archiving has low speed, and medium percentage of archiving (60 to 80%).

Proved a good name for the archive file for later use!

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Data retrieval is via program PPARCHR1:

Important here to select the correct archive files.

Output is a list on the left side with details on the right hand side of the screen in table format:

Data archiving: handling units

This blog will explain how to archive handling units via object LE_HU. Generic technical setup must have been executed already, and is explained in this blog.

Object LE_HU

Go to transaction SARA and select object LE_HU.

Dependency schedule:

In case you use production planning backflush, you must archive those first. Then material documents, shipment costs (if in use), SD transport (if in use) and deliveries.

Main tables that are archived:

  • VEKP (Handling unit header table)
  • VEPO (Handling unit item)

Technical programs and OSS notes

Preprocessing program: RHU_AR_ARCHIVABILITY_CHECK

Write program: RHU_AR_WRITE_TO_ARCHIVE

Delete program: RHU_AR_DELETE_FROM_DATABASE

Read from archive: RHU_AR_READ_FROM_ARCHIVE

Reload program: RHU_AR_RELOAD_ARCHIVE

Relevant OSS notes:

Application specific customizing

Archiving object LE_HU has no specific customizing. Retention period is set on the write program screen.

Execution the preprocessing run

In transaction SARA, LE_HU select the preprocessing run:

The run will show you how many can be archived and how many cannot be archived (mainly due to status and preceding documents):

Executing the write run and delete run

In transaction SARA, LE_HU select the write run:

Select your data, save the variant and start the archiving write run.

After the write run is done, check the logs. LE_HU archiving has average speed, but not so high percentage of archiving (about 40 to 90%).

Unfortunately the LE_HU object does not have a Note field to give the archive file a correct name. If you still want to do so, you have to do this in SARA via the management of archiving sessions: select the session and change the description there:

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Data retrieval is via program RHU_AR_READ_FROM_ARCHIVE.

Data archiving: profit center accounting documents

This blog will explain how to archive profit center accounting documents transports via object EC_PCA_ITM. Generic technical setup must have been executed already, and is explained in this blog.

Object EC_PCA_ITM

Go to transaction SARA and select object EC_PCA_ITM.

Dependency schedule:

This means for profit center accounting archiving that there are no dependent objects.

Main tables that are archived:

  • GLPCA (profit center actual line items)
  • GLPCP (profit center plan line items)

Technical programs and OSS notes

Write program: EC_PCA_ITM_WRI

Delete program: EC_PCA_ITM_DEL

Read program: RGUGLPCA

Relevant OSS notes:

Application specific customizing

EC_PCA_ITM has no application specific customization for setting retention periods.

Executing the write run and delete run

In transaction SARA, EC_PCA_ITM select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes controlling area, company code and year. This is needed for data retrieval later on.

After the write run is done, check the logs. EC_PCA_ITM archiving has high speed, and high percentage of archiving (up to 99%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Data retrieval is via program RGUGLPCA:

Put in the correct input values and select the right archive files.

The output is a fairly simple list.

Data archiving: SD transport

This blog will explain how to archive SD transports via object SD_VTTK. Generic technical setup must have been executed already, and is explained in this blog.

Object SD_VTTK

Go to transaction SARA and select object SD_VTTK.

Dependency schedule:

In case you use production planning backflush, you must archive those first. Then material documents and shipment costs (if in use).

Main tables that are archived:

  • VTTK (shipment header)
  • VTTP (shipment item)

Technical programs and OSS notes

Write program: SDVTTKWRS

Delete program: SDVTTKDLS

Reload program: SDVTTKRL

Relevant OSS notes:

Application specific customizing

In the application specific customizing for SD_VTTK you can maintain the document retention time settings:

Executing the write run and delete run

In transaction SARA, SD_VTTK select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes sales organization/shipment point and year. This is needed for data retrieval later on.

After the write run is done, check the logs. SD_VTTK archiving has average speed, but not so high percentage of archiving (up to 40 to 90%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Data retrieval is not possible. Only reload via program SDVTTKRL.

Data archiving: change documents

This blog will explain how to archive change documents via object CHANGEDOCU. Generic technical setup must have been executed already, and is explained in this blog.

Object CHANGEDOCU

Go to transaction SARA and select object CHANGEDOCU.

Dependency schedule: (none):

Change documents are archived as part of other archiving objects. For specific changes you might want to archive the changes sooner to get a grip on CDHDR and CDCLS/CDPOS table sizes and amount of entries.

Main tables that are archived:

  • CDHDR (change header)
  • CDCLS (change details)

Technical programs and OSS notes

Write program: CHANGEDOCU_WRI

Delete program: CHANGEDOCU_DEL

Read program: CHANGEDOCU_READ

Reload program: CHANGEDOCU_REL

Relevant OSS notes:

Application specific customizing

No application specific customizing is required for CHANGEDOCU archiving.

Executing the write run and delete run

In transaction SARA, CHANGEDOCU select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes change document object(s) and year. This is needed for data retrieval later on.

After the write run is done, check the logs. CHANGEDOCU archiving has average speed and very high percentage of archiving (up to 100%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Don’t start the data retrieval program from SARA. Start program CHANGEDOCU_READ from SA38 (see OSS note 3395609 – Default read program for CHANGEDOCU in transaction AOBJ):

In the second screen select the archive files. Now wait long time before data is shown.

For faster retrieval, setup data archiving infostructures SAP_CHANGEDOCU1 and SAP_CHANGEDOCU2. These are not active by default. So you have to use transaction SARJ to set them up and later fill the structures (see blog).

Now transaction RSSCD100 can be use for data retrieval:

Don’t forget to select the tick box “Read from archive info system”.

Another option is via transaction SARE (archive explorer) and then choose object CHANGEDOCU with archive structure SAP_CHANGEDOCU1.

Data archiving: purchase requisitions

This blog will explain how to archive purchase requisitions via object MM_EBAN. Generic technical setup must have been executed already, and is explained in this blog.

Object MM_EBAN

Go to transaction SARA and select object MM_EBAN.

Dependency schedule:

No dependencies.

Main table that is archived:

  • EBAN (Purchase requisitions)

Technical programs and OSS notes

Pre-processing program: RM06BV70

Write program: RM06BW70

Delete program: RM06ID70

Read program: RM06BR30

Relevant OSS notes:

Application specific customizing

In the application specific customizing for MM_EBAN you can maintain the document retention time settings:

You have to set the residence time per requisition type:

Preprocessing

In transaction SARA, MM_EBAN select preprocessing:

There are quite some reasons why a purchase requisition cannot be archived.

Executing the write run and delete run

In transaction SARA, MM_EBAN select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes the purchasing group and year. This is needed for data retrieval later on.

After the write run is done, check the logs. MM_EBAN archiving has average speed, and medium percentage of archiving (50 to 90%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

For MM_EBAN start the read via SARA:

Then select the archive file(s).

Result is in a simple list:

Data archiving: CATS time writing data

This blog will explain how to archive CATS time writing data via object CATS_DATA. Generic technical setup must have been executed already, and is explained in this blog.

Object CATS_DATA

Go to transaction SARA and select object CATS_DATA.

Dependency schedule:

This means no dependencies.

Only table that is archived:

  • CATSDB: time writing data

Technical programs and OSS notes

Write program: RCATS_ARCH_ARCHIVING

Delete program: RCATS_ARCH_DELETING

Read program: RCATS_ARCH_READING

Relevant OSS notes:

Application specific customizing

In the application specific customizing for CATS_DATA is not required.

Executing the write run and delete run

In transaction SARA, CATS_DATA select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes date range. This is needed for data retrieval later on.

After the write run is done, check the logs. CATS_DB archiving has average speed, but high percentage of archiving (up to 100%). Only status 30 (approved) and status 60 (cancelled) are archived. See SAP Help.

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Start the data retrieval program and fill selection criteria:

Result is a simple list:

Data reload program

For emergency cases, there is an undocumented reload program: RCATS_ARCH_RELOADING. Use at own risk.

Data archiving: sales orders

This blog will explain how to archive sales orders via object SD_VBAK. Generic technical setup must have been executed already, and is explained in this blog.

Object SD_VBAK

Go to transaction SARA and select object SD_VBAK.

Dependency schedule:

In case you use production planning backflush, you must archive those first. Then material documents, shipment costs (if in use), SD transport (if in use), deliveries (if in use), purchase orders and purchase requisitions related to the sales order.

Main tables that are archived:

  • NAST (for the specific records)
  • VBAK (sales order header)
  • VBAP (sales order item)
  • VBEP (sales order schedule line data)
  • VBFA (for the specific records)
  • VBOX (SD Document: Billing Document: Rebate Index)
  • VBPA (for the specific records)
  • VBUP (sales order status data)

Technical programs and OSS notes

Preprocessing program: S3VBAKPTS

Write program: S3VBAKWRS

Delete program: S3VBAKDLS

Read program: S3VBAKAU

Relevant OSS notes:

Application specific customizing

In the application specific customizing for SD_VBAK you can maintain the document retention time settings:

Executing the preprocessing run

In transaction SARA, select SD_VBAK. In the preprocessing run the documents to be archived are prepared:

Check the log for the results:

Typically SD_VBAK will yield 30 to 70% documents that can be archived.

Executing the write run and delete run

In transaction SARA, SD_VBAK select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes sales organization/shipment point and year. This is needed for data retrieval later on.

After the write run is done, check the logs. SD_VBAK archiving has average speed, but not so high percentage of archiving (up to 40 to 90%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Start the data retrieval program and fill selection criteria:

In the second screen select the archive files. Now wait long time before data is shown.

For faster retrieval, setup data archiving infostructures SAP_SD_VBAK_001 and SAP_SD_VBAK_002. These are not active by default. So you have to use transaction SARJ to set them up and later fill the structures (see blog).

Data archiving: SD invoices

This blog will explain how to archive SD invoices via object SD_VBRK. Generic technical setup must have been executed already, and is explained in this blog.

Object SD_VBRK

Go to transaction SARA and select object SD_VBRK.

Dependency schedule:

In case you use production planning backflush, you must archive those first. Then material documents, shipment costs (if in use), SD transport (if in use) and deliveries (if in use).

Main tables that are archived:

  • NAST (for the specific records)
  • VBFA (for the specific records)
  • VBOX (SD Document: Billing Document: Rebate Index)
  • VBPA (for the specific records)
  • VBRK (invoice headers)
  • VBRP (invoice line items)
  • VBUK (invoice status)

Technical programs and OSS notes

Preprocessing program: S3VBRKPTS

Write program: S3VBRKWRS

Delete program: S3LIKPDLS

Read program: S3VBRKAU

Relevant OSS notes:

Application specific customizing

In the application specific customizing for SD_VBRK you can maintain the document retention time settings:

Executing the preprocessing run

In transaction SARA, select SD_VBRK. In the preprocessing run the documents to be archived are prepared:

Check the log for the results:

Typically SD_VBRK will yield 30 to 70% documents that can be archived.

Executing the write run and delete run

In transaction SARA, SD_VBRK select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes sales organization/shipment point and year. This is needed for data retrieval later on.

After the write run is done, check the logs. SD_VBRK archiving has average speed, but not so high percentage of archiving (up to 40 to 90%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Start the data retrieval program and fill selection criteria:

In the second screen select the archive files. Now wait long time before data is shown.

For faster retrieval, setup data archiving infostructures SAP_SD_VBRK_001 and SAP_SD_VBRK_002. These are not active by default. So you have to use transaction SARJ to set them up and later fill the structures (see blog).

Data archiving: deliveries

This blog will explain how to archive deliveries via object RV_LIKP. Generic technical setup must have been executed already, and is explained in this blog.

Object RV_LIKP

Go to transaction SARA and select object RV_LIKP.

Dependency schedule:

In case you use production planning backflush, you must archive those first. Then material documents, shipment costs (if in use) and SD transport (if in use).

Main tables that are archived:

  • LIPK
  • LIPS
  • NAST (for the specific records)
  • VBFA (for the specific records)
  • VBPA (for the specific records)

Technical programs and OSS notes

Preprocessing program: S3LIKPPTS

Write program: S3LIKPWRS

Delete program: S3LIKPDLS

Read program: S3LIKPAU

Relevant OSS notes:

Application specific customizing

In the application specific customizing for RV_LIKP you can maintain the document retention time settings:

Executing the preprocessing run

In transaction SARA, select RV_LIKP. In the preprocessing run the documents to be archived are prepared:

You must run the program twice: for inbound and outbound deliveries.

Check the log for the results:

Typically RV_LIKP will yield 30 to 70% documents that can be archived.

Executing the write run and delete run

In transaction SARA, RV_LIKP select the write run:

Select your data, save the variant and start the archiving write run.

Give the archive session a good name that describes sales organization/shipment point and year. This is needed for data retrieval later on.

After the write run is done, check the logs. RV_LIKP archiving has average speed, but not so high percentage of archiving (up to 40 to 90%).

Deletion run is standard by selecting the archive file and starting the deletion run.

Data retrieval

Start the data retrieval program and fill selection criteria:

In the second screen select the archive files. Now wait long time before data is shown.

For faster retrieval, setup data archiving infostructures SAP_RV_LIKP_001 and SAP_RV_LIKP_002. These are not active by default. So you have to use transaction SARJ to set them up and later fill the structures (see blog).