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).

SAP TREX administration

SAP TREX can be used for search. Search can be done best with HANA system nowadays. For HANA search read this blog. Migration from TREX to HANA is explained in OSS note 2054157 – How to migrate Enterprise Search from TREX to SAP HANA.

This blog will cover the SAP TREX administration. Search tips and tricks for both HANA search and SAP TREX can be found in this blog.

TREXADMIN

The main transaction for TREX administration is TREXADMIN:

Select your TREX RFC and press execute to get to the first tab that shows the Services overview:

Check the second overview tab for the status:

The alert tab contains alert to be checked:

Background information

SAP help file for TREXADMIN can be found in this link.

If you raise OSS message for TREX, provide the TREX logs as explained in OSS note 1140188 – BWA/TREX: How to provide indexes for problem analysis.

OSS notes for specific issues:

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).

Data archiving: material documents

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

Object MM_MATBEL

Go to transaction SARA and select object MM_MATBEL.

Dependency schedule:

In case you use production planning backflush, you must archive those first.

Main tables that are archived:

  • MKPF
  • MSEG
  • NAST (for the specific records)

Technical programs and OSS notes

Write program: RM07MARCS

Delete program: RM07MADES

Read program: RM07MAAU

Relevant OSS notes:

Application specific customizing

In the application specific customizing for MM_MATBEL you can maintain the document lifetime settings:

Executing the write run and delete run

In transaction SARA, MM_MATBEL 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 plant and year. This is needed for data retrieval later on.

After the write run is done, check the logs. MM_MATBEL is fast archiving and has high percentage of archiving (up to 100%).

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.

Faster data retrieval is via archive explorer transaction SARE (for the archive explore the infostructures must be filled first, see this blog):

Fill out the document criteria:

From the result list double click on the line and jump to MIGO transaction to view the archived document.