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.

Write system log entries from custom ABAP

For some specific requirements (like system monitoring) you might need to write entries into the ABAP system log (transaction SM21).

Preparation

In SE92 (see this blog) create a new message for the system log. It is best to create your own Z message code in stead of re-using standard SAP.

Writing to system log

OSS note 5462 – Writing SysLog entries from within ABAP/4 programs explains 2 methods, for which using function module RSLG_WRITE_SYSLOG_ENTRY is the preferred one.

Program RSLG0014 can be used to test the writing and basis for code re-use:

DWDM: Enjoy demo center

The enjoy controls are old, but still much in use.

If you need to re-use and idea and code, you can use transaction DWDM: the Enjoy Demo Center.

Double clicking program name will show the ABAP code on the right.

Double clicking on the title will give you the output of the example code.

The HTML control as WWW browser can be used to test the internet connectivity from your SAP server to internet.

Some developers might have restrictions on their laptop and use this program to browse....