Data Archiving in Controlling (CO)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

9/14/2022

Data Archiving in Controlling (CO)


Generated on: 2022-09-14 10:23:34 GMT+0000

SAP S/4HANA | 1909 (Sep 2019)

PUBLIC

Original content: https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/a87b965528884868b4404902123c6004?locale=en-


US&state=PRODUCTION&version=1909.000

Warning

This document has been generated from the SAP Help Portal and is an incomplete version of the official SAP product
documentation. The information included in custom documentation may not re ect the arrangement of topics in the SAP Help
Portal, and may be missing important aspects and/or correlations to other topics. For this reason, it is not for productive use.

For more information, please visit the https://help.sap.com/docs/disclaimer.

This is custom documentation. For more information, please visit the SAP Help Portal 1
9/14/2022

Controlling (CO)
The following table gives an overview of the CO objects and their archiving objects:

Objects in Controlling Archiving Object

CO line items CO_ITEM

Line items (cost center) CO_ITEM

Totals (cost center) CO_TOTAL

Master data (cost center) CO_CCMAST

Fully reversed documents (cost center) CO_ALLO_ST

Orders with transaction data CO_ORDER

Business processes CO_PROCESS

Settlement documents CO_KABR

Material cost estimate data CO_COPC

Base planning object data CO_BASEOBJ

Cost object data CO_KSTRG

Material ledger data CO_ML_DAT

Material ledger documents CO_ML_BEL

Material ledger indexes CO_ML_IDX

Transaction data for costing-based pro tability analysis COPAA_xxxs, COPAB_xxxx, COPA1_xxxx (obsolete)

Transaction data for account-based pro tability analysis COPA2_xxxx

Pro tability segments for costing-based/account-based COPAC_xxxx


pro tability analysis

My Unusual Items FICO_MYUS

Table COEP

De nition

Use
The procedure described here provides an aid to dealing with table COEP if it grows too quickly or if there are data quantity
problems within the table.

Structure
Often CO objects are mentioned in connection with cost accounting data, whereby these could be any object that produces data
in cost accounting (CO data). Examples of these are cost centers, internal orders, sales document items (items in sales orders),
cost objects, and production orders.

Central elements are the master record and line items.

This is custom documentation. For more information, please visit the SAP Help Portal 2
9/14/2022
The master record is stored in different tables, depending on the respective application

The master records contain, for example, a short text to the object and organizational data, such as controlling area, company
code and plant. The object currency is often also stored in the master record or is derived from information in the master
record.

Line items in cost accounting are stored in the same tables for all applications. Primary costs, for example, are all stored in
table COEP regardless of whether they belong to a cost center or a sales order.

Characteristics of an object

Orders, sales document items, or cost centers can be described as object types.

The connection of an object to its CO data is given by the general object number (OBJNR eld in the CO tables, such as COEP-
OBJNR). This eld provides you with information about the object type and, if needed, about the object key (such as the order
number).

Integration
Decide which archiving object to use. The following questions may help you decide:

Which archiving objects are already being used or are planned?

What can be archived using the archiving object CO_ALLO ST?

More Information
For more information on determining archiving objects, see Determining Archiving Objects.

For information on archiving object CO_ALLO_ST, see Archiving Fully Reversed Documents (CO-OM-CCA).

Determining Archiving Objects

Context
Using table analysis, you can determine which archiving objects can be used to archive COEP entries.

Procedure
1. Only examine those archiving objects that cover the largest amount of data. As a general rule, two or three archiving
objects will cover 90% of the data.

2. You may already be using one of these objects. If this is the case, proceed as follows:

a. Archive your data using this object, then repeat table analysis. Execute program RARCCOA1 again. Much less data
should now appear in the list produced by RARCCOA2.

b. If the list produced by RARCCOA2 for this object still contains a large amount of data, you should try to extend
archiving with this object. For example, reduce the residence times or extend the selection criteria. You should, of
course, consult with the departments concerned before doing so.

c. If the previous step did not produce any signi cant reduction, and if you no longer require the CO line items for
the respective object type, designate the object type for CO_ITEM archiving.

For more information, see Archiving CO Line Items (CO).

This is custom documentation. For more information, please visit the SAP Help Portal 3
9/14/2022
3. You may be planning to carry out archiving for one of the objects (still) being examined. You should try to prioritize this
with a view to the dataset in table COEP. It would probably be more effort to use CO_ITEM in addition.

4. If the archiving object CO_COSTCTR appears in the list with an appreciable amount of data, you should also consider the
archiving object CO_ALLO_ST. Proceed as follows:

a. Start program RARCCOAA. It is advisable to execute this program in the background at a time when system
activity is low.

b. The program generates a list of entries in the tables COEP and COEJ that belong to allocation documents which
have been completely reversed. If an appreciable number of entries is displayed, you should use the archiving
object CO_ALLO_ST.

You can use CO_ALLO_ST in real time without problems. The archived documents are reversed documents from cost
accounting and are no longer of import. Such documents are created when assessments, distributions, and so on are
repeated.

5. If a signi cant number of entries still appears in the RARCCOA2 list, or if you designated object types (see above) to be
archived with CO_ITEM, you should now use the archiving object CO_ITEM. Create a list of object types to be archived
using CO_ITEM. You can use the RARCCOA2 list and cross out everything that has already been dealt with by other
archiving objects.

Archiving CO Line Items (CO)


Archiving object CO_ITEM is not supported within SAP Accounting.

Archive Access with CO Line Item Reports


You can access the archives using the following line item reports from Cost Accounting:

Transaction Description

KSB1 Cost centers (actual)

KSBP Cost centers (plan)

KKCS Cost objects (actual)

KOB1 Orders: Actual

CPB1 Processes: Actual

KVBI Sales orders: Actual

KSB5 Documents: Actual

KABP Documents: Plan

Selection of Data Source

When you run the selected reports, via Extras Data Source , you can display a dialog box where you can de ne how you want
to access the archived data. Choose whether you only want to access the database, only the archive, or both.

If you select access via the archive, you have the following options:

Use the archive information system

If you select this option, the system uses the selection criteria to automatically determine which data has to be read from the
archive. You do not have to make any further entries. The system automatically determines the corresponding archiving object.

This is custom documentation. For more information, please visit the SAP Help Portal 4
9/14/2022
The system ignores any archiving object that you enter.

To use the archive information system, you have to ful ll the following prerequisites: Settings in the Archive Information System
.

Select les manually

If you select this option, you have to select the archive les to be evaluated manually. To do so, select an archiving object
dependent on the report.

 Note

With the archiving object CO_ITEM, you can archive the CO line items of all object types.

Reports and their archiving objects

Report Archiving Object

KSB1 CO_COSTCTR, CO_CCTR_EP, CO_CCTR_ID, CO_ITEM

KSBP CO_COSTCTR, CO_CCTR_EP, CO_CCTR_PL, CO_ITEM

KKCS CO_KSTRG, CO_ITEM

KOB1 CO_ORDER, PP_ORDER, PR_ORDER, PM_ORDER, CO_ITEM

CPB1 CO_PROCESS, CO_ITEM

KVBI CO_ITEM

KSB5 All archiving objects that archive COEP

KABP All archiving objects that archive COEJ

 Note

For transactions KSB5 and KABP, all of the archiving objects that archive the cost accounting line items are valid. Using
transaction DB15, you can nd out which these are. You can evaluate all archiving objects that archive entries for COEP with
transaction KSB5 (as for table COEJ and KABP).

Archiving Settlement Documents (CO)

De nition
You can use the CO_KABR archiving object to archive settlement documents independently of the corresponding settlement
senders. Settlement documents are created during settlement of orders, WBS elements, sales orders and cost objects as well
as during settlement of assets under construction.

Structure
The system ensures that the settlement documents are archived and deleted by period, starting with the earliest settlement
period. This means that you must archive all or none of the documents for a settlement sender and a settlement period. Note
also that the settlement documents for a settlement period are only archived if the settlement documents for the previous
periods have already been settled or are being settled in this run.

This is custom documentation. For more information, please visit the SAP Help Portal 5
9/14/2022
Plan settlement documents: The system archives all documents belonging to a settlement sender by scal year and not by
period. The scal year replaces the settlement period. This means that either all or no settlement documents from a scal year
for one settlement sender are archived.

Selection Criteria

You can use the following selection criteria for the CO_KABR archiving object.

Controlling area

Object type, settlement sender: Here, you can specify the object types for which you want to archive settlement
documents.

Latest posting date: Settlement documents with posting dates after this date are not archived.

In addition to the selection conditions that you specify, the system also checks each settlement document to ensure that its
residence time has expired. For more information, see Checks (CO) .

See also:

Concepts

Runtimes (CO)

Checks (CO)

Application Customizing (CO)

Log (CO)

How to Use Archiving

Create Archive Files

Call Archive Session Management

Runtimes (CO)
Archiving Object CO_KABR

1,000 total settlement documents in the AUAK, AUAB, AUA0, AUAS, and AUAV tables and 2000 entries in the AUAA and AUAI
tables were archived in a test.

The test produced the following results:

Write to archive: 5 minutes

Delete data: 8 minutes

Size of database: c.1,063,000 bytes (uncompressed)

File size: 1.1 MB

This data should be regarded as an example. The tests were conducted when the system was at its busiest.

This is custom documentation. For more information, please visit the SAP Help Portal 6
9/14/2022

Checks (CO)
Archiving Object CO_KABR

The system only archives settlement documents if their residence time has expired. You enter the residence time in the
settlement pro le. To do so, choose Actual postings Settlement Maintain settlement pro le in customizing. You can nd the
settlement pro le for a settlement sender in the settlement parameters for the settlement rule.

Note that the residence time only starts from the posting date. The posting date is usually the last day of the period that you
are settling.

See also: CO - Settlement

Application Customizing (CO)


Use

Note: when selecting the residence time, you can no longer reverse a settlement if the settlement documents created have
been deleted.

Activities

In customizing for Overhead Cost Orders, enter the residence time for the settlement documents under Actual postings
Settlement Maintain settlement pro le .

Log (CO)
If you have selected Log per document in the variant for archiving object CO_KABR, the SAP system outputs all documents with
their document numbers.

The log informs you which archived data objects have been deleted. This is because CO_KABR generally deletes all archived
data.

Archiving Cost Center Data (CO-OM-CCA)


Archiving of master data and transactional data for cost centers is not supported in SAP Accounting.

Archiving Fully Reversed Documents (CO-OM-CCA)

De nition
Archiving object CO_ALLO_ST is used to archive and delete all allocations (assessments, distributions, periodic reposting, and
indirect activity allocations) that have been fully reversed.

 Note
This archiving object was revised in the course of a project to standardize and optimize data archiving. You can use the
standardized archiving object by archiving the business function Data Archiving:Standardization of Archiving Objects

This is custom documentation. For more information, please visit the SAP Help Portal 7
9/14/2022
(technical name DA_ARCHOBJ_STANDARD_1). For more information, see the business function documentation in the Switch
Framework (transaction SFW5) under Data Archiving:Standardization of Archiving Objects.

 Note
You can use this archiving object in Information Lifecycle Management. You must have activated the corresponding business
functions to do this. The system then also shows the ILM Actions group box. You can use these actions to carry out archiving,
for example, where the retention periods stored in the Information Retention Manager can be evaluated. Additionally, you
can create snapshots (copies) of data or destroy data that matches the requirements. For more information, see ILM
Enhancements in Data Archiving, section ILM Actions in the Write Program.

Use
If the allocations are repeated frequently, this results in a large volume of data, in particular in the planned distribution. This
archiving object allows you to "clean up" without any adverse effects on the functions in the SAP system.

In the case of a complete reversal, the corresponding documents (original document and reversal document) and document
items are removed from the database.

You can limit the selection to one or more cycles.

The table analysis of table COEP helps you to select a suitable archiving object. For more information, see Table COEP .

Selection criteria

The following selection criteria apply to CO_ALLO_ST:

You must enter the controlling area.

You can enter the cycle.

You can enter the scal year.

If you do not limit the scal year and/or cycle, the selection is not restricted either.

Structure
Displaying Individual Objects Using SAP AS

To display the line items for archiving object CO_ALLO_ST using SAP AS you require an information structure that has been
created based on the standard eld catalog SAP_ALLO_ST_001. The information structure must be active and con gured
correctly.

For more information about information structures, see Using the Archive Information System .

For more information about the Archive Information System, see SAP Library under Cross-Application Components CA -
Archiving Application Data Introduction to Data Archiving Archive Information System (SAP AS) .

Special Features Relevant to Application (CO-OM-CCA)


Reloading data into the database is not supported. Therefore, you should only archive data when you are sure that you no
longer need it.

This is custom documentation. For more information, please visit the SAP Help Portal 8
9/14/2022

Technical Data (CO-OM-CCA)


Due to the complex structure of the archiving objects, it is not possible to estimate the runtimes or storage capacity required
for archiving.

The record lengths of the individual logical database segments are found in the ABAP Dictionary. The number of records per
segment in your system depends on various factors:

Number of postings in external accounting (document sizes) to cost centers

How many of the Cost Center Accounting functions you use

If you do not use all the functions, some of the tables for the cost centers will remain empty. Furthermore, the data
volume for the individual functions can be quite different. Plan distribution, for example, generates much more data than
other functions.

The data volume of the cost centers themselves will probably vary greatly as well.

Archiving Dependencies (CO-OM-CCA)

Use
Archiving in Cost Center Accounting can be performed independently of other archiving programs.

If you repeated the allocations often, you can use archiving object CO_ALLO_ST at any time to reduce the amount of data
stored.

More Information
Network Graphic

Archiving Internal Orders (CO-OM-OPA)


You use archiving object CO_ORDER to archive or delete internal orders with the corresponding transaction data.

 Note
This archiving object was revised in the course of a project to standardize and optimize data archiving. You can use the
standardized archiving object by activating the business function Data Archiving: Standardization of Archiving Objects
(technical name DA_ARCHOBJ_STANDARD_1). For more information, see the business function documentation in the Switch
Framework (transaction SFW5) in Data Archiving: Standardization of Archiving Objects .

Concepts

Application Customizing (CO-OM-OPA)

Dependencies (CO-OM-OPA)

Authorizations (CO-OM-OPA)

Log (CO-OM-OPA)

This is custom documentation. For more information, please visit the SAP Help Portal 9
9/14/2022
Checks (CO-OM-OPA)

Terms (CO-OM-OPA)

Using Archiving

Creating Archive Files

Accessing Archiving Management

Additional Archiving Objects

You can use archiving object PP_ORDER to perform the archiving of production orders in production planning and control.
Choose Logistics Production Shop Floor Control,thenTools Archiving Orders.

See also: Production Orders (PP-SFC)

You can archive funds commitment with archiving objectFM_FUNRES. In the internal order menu, choose
Environment Archiving Funds Commitment.

See also: Archiving Funds Commitment (FI-FM ).

Archiving Orders with Transaction Data (CO-OM-OPA)


For internal orders, you use the CO_ORDER archiving object to archive and delete all master and transaction data that ful ll
speci ed conditions.

 Note
This archiving object was revised in the course of a project to standardize and optimize data archiving. You can use the
standardized archiving object by activating the business function Data Archiving: Standardization of Archiving Objects
(technical name DA_ARCHOBJ_STANDARD_1). For more information, see the business function documentation in the Switch
Framework (transaction SFW5) in Data Archiving: Standardization of Archiving Objects .

 Note
You can use this archiving object in Information Lifecycle Management . You must have activated the corresponding business
functions to do this. The system then also shows the ILM Actions group box. You can use these actions to carry out archiving,
for example, where the retention periods stored in the Information Retention Manager can be evaluated. Additionally, you
can create snapshots (copies) of data or destroy data that matches the requirements. For more information, see ILM
Enhancements for Data Archiving , ILM Actions in the Write Program .

Selection Criteria
The following selection criteria apply to the CO_ORDER archiving object:

Controlling area

Order type

Order number

An order can only be archived if:

This is custom documentation. For more information, please visit the SAP Help Portal 10
9/14/2022
It meets the selection criteria

It has one of the following order categories:

01 Internal order (Controlling)

02 Accrual order (Controlling)

03 Model order (Controlling)

04 CO Production order

05 Production cost collectors, repetitive manufacturing

06 QM orders

Its deletion indicator is set

Its residence time 2 is expired

For more information about deletion indicators and residence times, see Checks for Internal Orders (CO-OM-OPA) .

Displaying Individual Objects Using SAP AS


A business view for archiving object CO_ORDER is delivered as standard. To display individual objects for archiving object
CO_ORDER using SAP AS you require an information structure that has been created based on the standard eld catalog
SAP_CO_ORDER001 . The information structure must be active and con gured correctly.

Recommendation

Use the information structure SAP_CO_ORDER001 delivered as standard.

For more information about information structures, see Using the Archive Information System .

For more information about the Archive Information System, see SAP Library underCross-Application Components CA -
Archiving Application Data CA - Cross-Application Functions Introduction to Data Archiving Archive Information System (SAP
AS).

Starting the Read Program (CO-OM-PA)


Archiving object CO_ORDER

To call the Archive Management initial screen choose Environment Archiving Orders . Here you can display the master
data list for orders to be archived by choosing Analyze and then Execute . From this list, you can go to the master data
display, to a summary report, and a line item report.

Some of the summary and line item reports in the information system can also read data from the archive. The following
are examples of summary reports:

List: Cost elements by orders

Orders: Actual/Plan/Variance

Orders: Breakdown by partner

Orders: Breakdown by period

This is custom documentation. For more information, please visit the SAP Help Portal 11
9/14/2022
List: Orders

The following are examples of line item reports:

Orders: Actual line items

Controlling documents: Actual costs

In the SARA transaction, you can go to the master data list and the reports from the information system by choosing Analyze .

You can use the ODK logical database to write your own reports.

Run Times for Internal Orders (CO-OM-OPA)


The CO_ORDER archiving object

1,000 total orders in the AUFK, CDHDR, CDPOS, COBRA, COBRB, COSP, COSPD, COSS, COEP, COBK tables were archived in a
test..

The test produced the following results:

Write archive: 8.5 minutes

Delete archive: 8 minutes

Size of database: approx. 5,052,000 bytes (uncompressed)

File size: 1.4 MB

The data is only intended as an example. The tests were conducted when the system was at its busiest.

It is hard to estimate runtimes and storage requirements for archiving Internal Orders data because the structures are so
complex. Runtimes depend on the settings in Customizing and the functions used in the application component. If, for example,
you have the classi cation active with many characteristics, this will have consequences for runtimes and storage
requirements.

The CO_KABR archiving object

1,000 total settlement documents in the AUAK, AUAB, AUA0, AUAS, and AUAV tables and 200 entries in table AUAA and AUAI
were archived in a test..

The test produced the following results:

Write archive: 5 minutes

Delete archive: 8 minutes

Size of database: approx. 1,063,000 bytes (uncompressed)

File size: 1.1 MB

Checks for Internal Orders (CO-OM-OPA)

This is custom documentation. For more information, please visit the SAP Help Portal 12
9/14/2022
Because the create archive program only selects orders that can be deleted, the criteria for deleting data is the same as for
archiving data.

Internal orders have a deletion ag and a deletion indicator. Both are set by task functions.

Setting and deleting the deletion ag

You activate or reset the deletion ag for an internal order in the master data maintenance. If you set the deletion ag, the
system checks whether the order can be deleted. Normally, you can only set the deletion ag if the order balance is zero. The
following are exceptions:

Statistical orders

Orders for which the settlement pro le is set up so that the actual costs are not to be settled or do not require
settlement.

Setting the deletion indicator

Before you can set the deletion indicator, you need to set the delete ag. Residence time one must also have expired. You
cannot reverse the deletion indicator once it is set.

You can set both the deletion ag and the deletion indicator in mass processing. In the Internal Orders menu, choose
Tools Archiving Orders and then Preparation.

This process only archives orders for which the deletion indicator is set and for which residence time two has expired.

Both the residence times are part of the order type. You can change them in the implementation guide for internal orders by
choosing Order Master Data De ne Order Types.

Authorizations (CO-OM-OPA)
To archive internal orders, you require the authorizations described in Authorization Checks .

You also require the following authorizations:

Authorization Object Authorization

K_AUFK_ART Activity = *

K_ORDER Authorization Check Actions = *

To access the archive evaluation, you also need the authorizations for displaying the master data and, where appropriate, for
the information system.

Archiving Log (CO-OM-OPA)

De nition
Information about the archiving les produced during archiving.

Structure

This is custom documentation. For more information, please visit the SAP Help Portal 13
9/14/2022
For each archive le, the log shows the number of objects archived and the number of tables entries archived in the tables
involved. If no entries from a particular table were archived, that table does not appear at all in the log.

The standard log does not contain information on whether the data objects archived were deleted, as CO ORDER or CO KABR
delete virtually all data.

If you set the Log per order indicator in the variant for the CO_ORDER archiving object, the log also includes the orders numbers
and descriptions.

If you set the Log per document indicator in the variant for the CO_KABR archiving object, the standard log also shows all
documents with their document numbers.

Dependencies (CO-OM-OPA)
You can archive internal orders independently of other archiving programs.

Settlement documents for internal orders are automatically archived when you archive using the CO_ORDER archiving object.
However, the system does not check the residence time for the settlement documents, as it does not process settlement
documents without orders.

 Note

If you want to ensure that settlement documents are stored in separate archive les, you should choose the residence times
for internal orders and settlement documents so that the total of order residence time 1 and 2 is greater than the residence
time for the settlement documents. You should also archive the settlement documents before archiving the internal orders.

See also:

The Network Graphic

Application Customizing (CO-OM-OPA)

Use
For information on the general settings you must enter to be able to execute archiving runs, see Customizing: Overview . You
must also maintain the residence periods for the objects to be archived. As you cannot reload the archived internal orders, you
should take the following safety precautions.

Archiving object CO_ORDER

Set the residence period, so that the deletion ag can only be set when no more changes should be made to the orders and
archiving is only to occur when you no longer need the orders.

Archiving object CO_KABR

Note that during the selection of the residence period, you can no longer reverse a settlement if the settlement documents
created have been deleted.

Activities
Go to the implementation guide for overhead cost orders and enter the residence periods for:

This is custom documentation. For more information, please visit the SAP Help Portal 14
9/14/2022
Internal orders under Order master data De ne order types .

Settlement documents under Actual postings Settlement Maintain settlement pro le .

Archiving Activity-Based Costing (CO-OM-ABC)

De nition
Archiving object CO_PROCESS is used to archive and delete data (transaction data with the corresponding master data).

You cannot restrict this to certain business process groups.

 Note
This archiving object was revised in the course of a project to standardize and optimize data archiving. You can use the
standardized archiving object by activating the business function Data Archiving: Standardization of Archiving Objects
(technical name DA_ARCHOBJ_STANDARD_1). For more information, see the business function documentation in the Switch
Framework (transaction SFW5) under Data Archiving: Standardization of Archiving Objects .

 Note
You can use this archiving object within Information Lifecycle Management . You must have set up the relevant business
functions to do this. The system then also shows the ILM Actions frame. You can use these actions to carry out archiving, for
example, where the retention periods stored in the Information Retention Manager can be evaluated. Additionally, you can
create snapshots (copies) of data or destroy data that matches the requirements. For more information, see ILM
Enhancements in Data Archiving in the ILM Actions in the Archiving Program section.

Use
You can only archive if the business processes and their data are no longer required for postings or analyses.

 Caution
Note that scal year comparisons between archived data and data in the online position are no longer possible in reporting.

If all data for a business process is deleted, the scal years up to the ʻto scal year’ are truncated from the validity interval
(business processes have time-dependent master data). Following that, the business process is still available to the scal year
and all previous scal years are available neither as account assignment objects nor as planning objects.

 Note
The current number levels for the CO documents are not reset.

You cannot reload the data into the database. Do not archive until you are sure that you no longer need the data to be
archived.

Selection Criteria

The following selection criteria apply to CO_PROCESS:

You must enter the controlling area.

This is custom documentation. For more information, please visit the SAP Help Portal 15
9/14/2022
The entry to which scal year you want to archive is designed so that all data that belongs to the entered and previous
scal years is archived.

Input of the business process group is optional. If you do not make an entry, all business processes of the entered
controlling area are processed.

Reading Data

The reports of the information system enable you to read archived data. Choose Information System Report Selection to call
up a report. Then choose the Data Source function and select Read from Archive. On the Select Data Source screen, enter
archiving object CO_PROCESS and choose Archive Selection . On the screen Archive Administration: File Selection for Reading
select the desired report and choose Next. This takes you back to the Data Source Selection screen and choosing Next and
then Execute takes you to the report you chose.

It is not advisable to write your own reload program.

Displaying Individual Objects UsingSAPAS

Archiving object CO_PROCESS comes with a standard business view. To display individual objects for archiving object
CO_PROCESS using SAP AS you require an information structure that has been created based on the standard eld catalog
SAP _CO_PROCESS1 . The information structure must be active and lled.

Recommendation

Use information structure SAP _CO_PROCESS1, which is supplied in the standard.

For more information about information structures, see Using the Archive Information System .

For more information about the Archive Information System, see theSAPLibrary documentation inCross-Application
Components CA – Archiving Application Data CA – Cross Application Components Introduction to Data Archiving Archive
Information System (SAPAS).

Technical Data (CO-OM-ABC)


Due to the complex structure of the archiving objects, it is not possible to estimate the runtimes or storage capacity required
for archiving.

The lengths of the individual archiving objects are found in the ABAP Dictionary. The number of records per segment in your
system depends on the capacity utilization of the Activity-Based Costing functions.

 Note
If you do not use all the functions, some tables for the business processes will remain empty. Furthermore, the data volume
for the individual functions can be quite different.

The data volume of the business processes themselves will probably vary greatly as well.

Dependencies (CO-OM-ABC)
The archiving in Activity-Based Costing can carry on its work independent of other archiving programs.

See also:

This is custom documentation. For more information, please visit the SAP Help Portal 16
9/14/2022
The Network Graphic .

Log (CO-OM-ABC)
When you set the indicator Log per Business Process in the variant to the archive object CO_PROCESS, then all business
processes will carry your short text.

The log provides no information on whether the archived business process was deleted or not since CO_PROCESS actually
deletes all archived data.

Archiving Material Cost Estimates

Use
Material cost estimates that you still require can be removed from the database and archived.

Integration
Archiving for material cost estimates can be performed independently of other archiving programs.

Prerequisites
You de ne the technical data for archiving cost estimates (such as the name, path, and maximum size of the archive le) in
Archive Administration under Customizing. For further information, see the following:

Customizing

Basis Customizing

Archiving Object-Speci c Customizing

For the archiving of material cost estimates, no additional settings are required in Customizing.

The material cost estimate to be archived is not allowed to be agged or the one currently released. In other words, a link to the
material master record is not allowed in order to ensure data consistency. You can only archive cost estimates that have a Valid
from date in the past. This means you can archive cost estimates at any time during the year.

Authorizations

To archive material cost estimates, you need the following authorizations:

General archiving authorization: Authorization object S_ARCHIVE with

Activity 01 (creating archive les, reloading, deleting, and reading)

Application area: CO

Archiving Object: CO_COPC

For more information, see Authorization Check.

Authorization object K_KEKO with activity 06 (delete)

Authorization object S_ADMIN_FCD for printing and using the spool

This is custom documentation. For more information, please visit the SAP Help Portal 17
9/14/2022
Authorization object S_BTCH_JOB for archiving, deleting, and reloading and for the read program in batch processing

You can, depending on the system environment and the amount of data, archive approximately 13 000 cost estimates per hour.
Depending on the amount of data, you need about 5000 bytes for each cost estimate.

Activities
To get to these functions, go to Accounting Controlling Cost of Product - Controlling Product Cost
Planning Environment Archiving Material Cost Estimate .

This takes you to the screen Archive Management: Initial screen . In the Object Name eld, the archiving object CO_COPC is
proposed. For more information, see Archive Management.

The following table provides an overview of the functions that you can go to from this initial screen:

With function you can...

Archive Generate archive les (archive material cost estimates)

Delete Schedule and start the deletion program

Reload Schedule and start the reloading of an archive

Analyze Schedule and start an analysis program

Index Construct or remove an index for existing archive les

Administration View and change management information for archiving runs

call a network graphic to view the dependencies between archiving


objects

Customizing Check the Customizing settings

Job Overview Display a list of all the archiving jobs, and from here:

Display the log for a speci ed job ( job log)

Branch to detailed information for a speci ed job ( )

Release a job( Release )

Delete a job from the database ( )

Cancel an active job ( )

DB Tables Determine all the archiving objects that belong to a table

Information System Branch to the central administration of the Archive Information


System (AS)

See also:

Introduction to Data Archiving

Archive Selection and Archive Administration

Schematic archiving process and Archiving Procedure

Explanation of fundamental terms and background information

Archiving Performance Characteristics

This is custom documentation. For more information, please visit the SAP Help Portal 18
9/14/2022

Archiving Object CO_COPC

De nition
Archiving object for a material cost estimate

Use
The archiving object CO_COPC contains the following objects (provided they were saved for the cost estimate):

General data for the cost estimate

Cost component split

Itemization and log

 Note

The itemization and the log only exist if they were saved when the object was costed. For more information, see Saving
Material Cost Estimates .

When you archive material cost estimates, these objects are transferred from the database to the archive.

When you reload a material cost estimate from the archive back into the database, the above objects are transferred (except
for the cost element itemization). The standard functions for analyzing a material cost estimate are available.

For more information, see:

Analyzing the Results

Archiving Material Cost Estimates

Archiving Material Cost Estimates

See also:

The Archiving Object

Sample Data Description Used by the FI Document

The Data Object

Archiving Material Cost Estimates

Prerequisites
You are on the initial screen for the archiving of material cost estimates. To get to this function, go to
Accounting Controlling Cost of Product - Controlling Product Cost Planning Environment Archiving Material Cost
Estimate .

This is custom documentation. For more information, please visit the SAP Help Portal 19
9/14/2022
The material cost estimate to be archived is not allowed to be agged or the one currently released. In other words, a link to the
material master record is not allowed in order to ensure data consistency. You can control the remaining check criterial when
you de ne the variant.

You can only archive cost estimates that have a Valid from date in the past. This means you can archive cost estimates at any
time during the year.

Procedure
Creating Archive Files:

1. Choose Archive .

2. Enter an existing variant or create a new one.

The variant enables you to select the cost estimates to be archived.

1. If you want to use an existing variant, enter it in the Variant eld. Choose Maintain in order to check the settings in
this variant.

2. To create a new variant, leave the Variant empty and choose Maintain.

Enter a name for the variant and choose Create . Enter the criteria to restrict the selection to those cost estimates to be
archived, as follows:

Company code, plant, material number, costing variant, costing version, validity period

Type of material cost estimate ( automatic and/or additive , with and/or without quantity structure )

Choose Continue. Enter a short text in the Description eld.

Set the indicator only for background processing if the variant should only be allowed for background processing.

1. Choose and then .

1. Choose Start Date to de ne the start of the archiving run.

You can, for example, de ne that the archiving run

should be executed immediately

or should only be executed once another job has nished or only when a particular event should be executed

or should be executed periodically.

For more information, see Maintain Start Date and the Spool Parameter and Maintain Start Date .

1. Choose Spool Parameter to de ne the background print parameter.

2. For more information, see Maintain Start Date and the Spool Parameter and Maintain Spool Parameter .

3. Choose .

4. Choose Job Overview .

In this case the job names are:

ARCHIVE_CO_COPC_DEL (delete from the database)

This is custom documentation. For more information, please visit the SAP Help Portal 20
9/14/2022
ARCHIVE_CO_COPC_WRI (write to archive)

For more information, see Generate Archive Files .

To Delete an Archive

1. Choose Delete .

You see the screen Archive Administration: Start Deletion Program .

1. Enter the necessary data:

1. Archive Selection ( The Archive Selection )

2. Start Date ( Maintain Start Date )

3. Spool Parameter ( Maintain Spool Parameter )

1. If you only want to simulate the deletion of the costing data, select the Test run indicator.

2. Choose .

For more information, see Deleting Archived Data from the Database.

To Reload an Archive

1. Choose Reload .

2. Enter an existing variant in the Variant eld, or create a new one.

You use the variant to select the cost estimates that you want to reload.

1. To create your own variant, choose Maintain.

2. Enter a name for the variant and choose Create.

3. You can also restrict selection to just the cost estimates that you want to reload by entering the necessary criteria.

4. Choose to save the variant.

1. Choose Archive Selection to select the archive you want.

2. Choose Start Date to de ne the start of the archiving run.

3. Choose Spool Parameter to de ne the background print parameter.

4. Choose .

5. Choose Job Overview .

In this case, the job name is ARCHIVE_CO_COPC_REL.

For more information, see

To Reload an Archive

Accessing Archived Data

To Display Material Cost Estimates from the Archive

This is custom documentation. For more information, please visit the SAP Help Portal 21
9/14/2022
1. Choose Evaluate .

2. You see the screen Archive Administration: Start Evaluation Program.

3. Choose .

4. You see the screen Archiving: Displaying Cost Estimates in the Archive.

5. In the group box Restriction: Cost Estimates to Be Displayed, enter the required selection criteria to restrict the cost
estimates to the ones you want to display (such as, company code, plant, material number, and costing variant).

6. Choose .

7. You see the dialog box Archive Administration: File Selection to Read, where the archiving runs for the Archiving Object
Material Cost Estimate (CO_COPC) are listed that contain the data searched for.

8. Choose an archiving run and choose .

The material cost estimates are displayed. For more information, see Analysis of Results.

For more information, see Accessing Archived Data.

To Construct or Remove an Index

Choose Index.

The Build/Delete Index dialog box appears.

1. To build an index, choose Build Index . For more information, see Build Index

2. To delete an index, choose Delete Index . For more information, see Delete Index

Manage Archive:

Choose Manage.

You see the screen Archive Administration: Overview of Archiving Runs .

This lists all archiving runs for archiving object CO_COPC.

For more information, see Call Archiving Run Management .

Archiving Actual Costing/Material Ledger Period Data (CO-PC-


ACT)

De nition
The archiving object CO_ML_DAT archives the period data for the Actual Costing/Material Ledger component.

Use
Period data is transaction data that is used in single-level or multilevel material price determination. Data for closed periods
that is no longer needed for reporting purposes can be archived, which deletes the data from the database.

Structure
This is custom documentation. For more information, please visit the SAP Help Portal 22
9/14/2022
Period data consists of the following:

Material ledger period records

CKMLPP

CKMLCR

Period records for activity types

CKMLLACR

Quantity structure (actual/plan/target)

CKMLMV003

CKMLMV004

Summarization records from documents

MLCD

Before archiving, you should make the Customizing settings for the archiving object CO_ML_DAT. This can be done directly from
the application menu Actual Costing/Material Ledger .

Archiving Time Frame and Archiving Criteria (CO-PC-ACT)


Archiving is only useful for the following data:

Data from closed periods of the past

Data which is not used for material price determination or reporting purposes

You can control the selection of archiving data through the de nition of variants.

You can not archive period data that originates from the following:

The current period

The previous period

The period before the previous period

The last period of the previous year

Material ledger period records for price determination control 3 can only be archived if a closing entry has been made for the
material in the period.

Variant for Archiving (CO-PC-ACT)

This is custom documentation. For more information, please visit the SAP Help Portal 23
9/14/2022
Use

The variant contains criteria that the system uses to select the period data. These criteria are:

Posting year / posting period

Valuation area

You can also select more-detailed criteria:

Material

Valuation type

The following detailed criteria are available for use with valuated sales order stocks:

Sales and distribution document

Sales document item

WBS element

The variant also controls whether processing is a test run or whether an archive le is actually generated.

 Note

When you reload period data from the database, you can use the usual reporting functions to analyze it (such as material
price analysis ).

Variant for Reloading (CO-PC-ACT)


Use

The variant controls whether processing is executed as a test run or whether an archive le is actually reloaded.

Dependencies (CO-PC-ACT)
You can archive material ledger data independently of other archiving programs.

When you change over to the euro, data that is already archived is not included. Therefore, once the current database has been
converted to euros, it is no longer possible to reload datasets that were archived before the conversion.

Archiving Material Ledger Documents (CO-PC-ACT)

De nition
The archiving object CO_ML_BEL archives material ledger documents/price change documents for the Actual Costing/Material
Ledger component.

Use

This is custom documentation. For more information, please visit the SAP Help Portal 24
9/14/2022
Material ledger documents are data that is recorded during each business transaction that is relevant to valuation. You can
archive documents for closed periods when they are no longer needed for material price determination or reporting purposes.
Archiving the documents deletes them from the database.

Structure
The following types of material ledger documents are available, differing by transaction type:

CL Material Ledger Closing Entries

UP Material Ledger Update

PC Price Changes

ST Single-Level Price Determination

MS Multilevel Price Determination

RE Material Ledger Data Repairs

The following tables contain data that can appear in the material ledger documents:

MLHD Material Ledger Document: Header

MLITMaterial Ledger Document: Items

MLPP Material Ledger Document: Posting Periods and Quantities

MLPPF Material Ledger Document: Field Groups (Posting Periods and Quantities)

MLCR Material Ledger Document: Currencies and Values

MLCRF Material Ledger Document: Field Groups (Currencies and Values)

MLCRP Material Ledger Document: Price Change (Currencies, Prices)

MLMST Material Ledger Document: Costing Run Header Data

Archiving Time Frame and Archiving Criteria (CO-PC-ACT)


You should determine whether you are legally required to archive particular documents. Since such data is relevant to valuation,
you should contact your accounting department.

Material ledger documents can only be archived when material price determination and the closing entry have been performed
for the corresponding periods. The following items cannot be archived:

The current period

The previous period

You specify the selection conditions for the documents that you want to archive in the de nition of the variant.

 Caution

Note that evaluations on the basis of documents do not include the archived documents. You should archive documents in
accordance with your information requirements.

This is custom documentation. For more information, please visit the SAP Help Portal 25
9/14/2022

Variant for Archiving (CO-PC-ACT)


Use

The variant contains criteria that the system uses to select documents. These criteria are:

Valuation area

Document date

Material ledger transaction type

Document number

Year

The variant also controls whether processing is a test run or whether an archive le is actually generated.

 Note

When you reload documents from the database, you can use the usual reporting functions to analyze them again (such as
material price analysis ).

Variant for Reloading (CO-PC-ACT)


Use

The variant controls whether the program for reloading the documents should be executed as a test run or an update run.

Dependencies (CO-PC-ACT)
Before using archiving object CO_ML_BEL, make sure that the data is no longer needed for the following purposes:

Material price determination

Reporting

Documents can be archived independently of other archiving programs.

When you change over to the euro, data that is already archived is not included. Therefore, once the current database has been
converted to euros, it is no longer possible to reload datasets that were archived before the changeover.

Archiving Material Ledger Indexes (CO-PC-ACT)

De nition
The archiving object CO_ML_IDX archives the material ledger indexes for the Actual Costing/Material Ledger component.

Use
The archiving object contains entries that allow you to analyze the transactions for a material and display documents.

This is custom documentation. For more information, please visit the SAP Help Portal 26
9/14/2022

Structure
The contents of table CKMI1 are archived.

Integration
Material ledger indexes are updated even if you use Materials Management without Actual Costing/Material Ledger .

Archiving Time Frame and Archiving Criteria (CO-PC-ACT)


 Caution

You should archive indexes as little as possible , as they are used for repairs of faulty data in inventory management.

Variant for Archiving (CO-PC-ACT)


Use

The variant contains the following criteria that the system uses to select material ledger indexes:

Posting year

Posting period

All material ledger indexes are archived up to and including the period that you entered. The archiving process includes all
valuation areas in the client.

The variant also controls whether the archiving run is a test run or whether an archive le is actually generated.

 Note

If you reload material ledger indexes from the archive, the normal reporting functions (for example, transaction history for a
material) are available again.

Variant for Reloading (CO-PC-ACT)


Use

The variant controls whether processing is executed as a test run or whether an archive le is actually reloaded.

Dependencies (CO-PC-ACT)
You can archive material ledger indexes (archiving object CO_ML_IDX) independently of other archiving programs.

When you change over to the euro, data that is already archived is not included. Therefore, once you have changed over to the
euro it is no longer possible to reload datasets that were archived before the changeover.

This is custom documentation. For more information, please visit the SAP Help Portal 27
9/14/2022

Archiving Data from Actual Cost Component Splits (CO-PC-ACT)

De nition
The archiving object CO_ML_SPL archives data from actual cost component splits in the Actual Costing/Material Ledger
component.

Use
Data for actual cost component splits include all information on the split:

Prices with cost component split

Information on the material at the level of procurement alternatives or consumption alternatives

Data for closed periods that is no longer needed for material price determination or reporting purposes can be archived.
Archiving the data deletes it from the database.

Structure
Data on actual cost component splits consists of:

Cost component split data for material ledger data

CKMLKEPH

Cost component split data for prices

CKMLPRKEPH

Cost component split data for quantity information

CKMLPRKEKO

Material ledger header data (CKMLHD) and material ledger price data (CKMLPR) are archived when the material master is
reorganized (archiving object MM_MATNR).

Before archiving, you should make the Customizing settings for the archiving object CO_ML_DAT. This can be done directly
from the application menu of the component Actual Costing/Material Ledger .

Archiving Time Frame and Archiving Criteria (CO-PC-ACT)


Archiving is only useful for the following data:

Data from closed periods of the past

Data that is not used for reporting purposes

You can control the selection of archiving data through the de nition of variants.

You can not archive actual cost component split data that originates from the following:

The current period


This is custom documentation. For more information, please visit the SAP Help Portal 28
9/14/2022
The previous period

The period before the previous period

The last period of the previous year

Variant for Archiving (CO-PC-ACT)


Use

The variant contains the following criteria with which the system selects the actual cost component split data.

Posting year / posting period

Valuation area

You can also select the following more speci c criteria:

Material

Valuation type

If you are using valuated special stocks, the following more speci c criteria are also possible:

Sales document item

Item in sales document

WBS element

The variant also controls whether the archiving run is a test run or whether an archive le is actually generated.

If you reload actual cost component split data from the archive, the reporting functions of the actual cost component split
are available.

Variant for Reloading (CO-PC-ACT)


Use

The variant controls whether processing is executed as a test run or whether an archive le is actually reloaded.

Dependencies (CO-PC-ACT)
When you archive material ledger data, you can also archive the actual cost component split. You can archive cost component
split data independently of material ledger data.

When you change over to the euro, data that is already archived is not included. Therefore, once the current database has been
converted to euros, it is no longer possible to reload datasets that were archived before the conversion.

Archiving of CO-PA Transaction Data

This is custom documentation. For more information, please visit the SAP Help Portal 29
9/14/2022

De nition
In Pro tability Analysis (CO-PA), when generating an operating concern, the following archiving objects and their associated
write-, delete- and reload programs (xxxx stands for the technical name of the operating concern) are generated:

For the costing-based pro tability analysis:

COPAA_xxxx

COPAB_xxxx

For account-based pro tability analysis: COPA2_xxxx

For pro tability segments: COPAC_xxxx

Structure
In costing-based pro tability analysis, you can archive the following tables:

Actual line items (table(s) CE1xxxx) with archiving object COPAA_xxxx

Plan line items (table(s) CE2xxxx) with archiving object COPAA_xxxx

Segment level (table(s) CE3xxxx) with archiving object COPAB_xxxx

Transaction-based distribution (table CEALE01) with archiving object COPAA_xxxx

Table CEALE01 is only updated for distributed pro tability analysis (with ALE) during transaction-based distribution. Table
CEALE01 contains the references to the source system for the line items in the target system.

 Note
For background information about tables in costing-based pro tability analysis, see Database Tables for CO-PA
Transaction Data.

In account-based pro tability analysis, you can archive the following (with archiving object COPA2_xxxx):

CO line items (tables concerned: COEP (compatibility view), COEJ, COBK)

Totals records table (table affected: COKA)

For both types of pro tability analysis, you can archive the following (using archiving object COPAC_xxxx):

Pro tability segments (table(s) concerned: CE4xxxx)

Account assignment number (tables concerned: CE4xxxx_ACCT, CE4xxxx_FLAG)

To restrict the data to be archived, you can select different selection parameters in archiving. You can choose from some xed
selection parameters (see Creating Archive Files (CO-PA) ). In addition, in Customizing for Pro tability Analysis under
Tools Utilities Prepare Archiving , you can select characteristics from the pro tability segment characteristics (segment level
characteristics) and de ne them as selection parameters.

Integration
Archive Information System (AS)

Since the archiving objects of the pro tability analysis depend on the operating concern (generated at the customer) and on
the Customizing settings under Tools Utilities Prepare Archiving , the corresponding information structures and the eld

This is custom documentation. For more information, please visit the SAP Help Portal 30
9/14/2022
catalog for the Archive Information System (AS) must also be generated.

The information structure and eld catalog are generated in accordance with the de nition of the data object that you made in
the Prepare Archiving Customizing activity. From a technical viewpoint, all data records in an archive le with the same
combination of parameter values correspond to a data object. A clever data object de nition can substantially improve AS
access time to the data in the archive. For more information, see the documentation for the Prepare Archiving Customizing
activity.

The information structure and eld catalog are likewise generated in the Prepare Archiving Customizing activity. For the
individual archiving objects, the following is generated:

Archiving object COPAA_xxxx: Field catalog and information structure SAP_COPAA_xxxx

Archiving object COPAB_xxxx: Field catalog SAP_COPAB_xxxx

Archiving object COPA2_xxxx: Field catalog and information structure SAP_COPA2_xxxx

So the information structures can be used productively, you must then activate them in AS. For more information about
information structures, see Using the Archive Information System. For information about eld catalogs, see Field Catalogs .

 Recommendation
To display archived data from the object level (table CE3xxxx), you can (and should) use the Information System in
Pro tability Analysis. There, you can de ne pro tability reports that access the archive. When you de ne a pro tability
report (see De ning Pro tability Reports) on the Options tab page, activate the Use Additional Archived Data selection.

To display archived data from line items (tables CE1xxxx, CE2xxxx for costing-based pro tability analysis and COEP
(compatibility view), COEJ, COBK for account-based pro tability analysis), you can and should use transactions KE24, KE25
und KE30 (for line-item-based reports) for displaying line items. You can display data from the archives there when you set
the Archive indicator in the menu under Additions Data Source .

Creating Archive Files (CO-PA)

Use
When an operating concern is generated, archiving objects and the relevant preprocessing, write, delete, and reload programs
are generated.

For information about the archiving objects and the tables that can be archived, see Archiving CO-PA Transaction Data .

Prerequisites
Before archiving, you have updated the reports and the summarization levels that use the data to be archived.

By way of preparation of the archiving of pro tability segments (using archiving object COPAC_xxxx), you have
determined in tables CE4_xxxx, CE4_xxxx_ACCT, and CE4_xxxx_FLAG those pro tability segments that are not used in
any application (including CO-PA). To do so, proceed as follows:

1. In the SAP menu for Pro tability Analysis, choose Tools Archive and select the archiving object COPAC_xxxx.

2. Choose Preprocessing .

3. Select the variant with which the program should be started. If no variants exist, you can create one by choosing
the Maintain pushbutton. For more information about creating variants, see the Help documentation on the
Variant eld .

This is custom documentation. For more information, please visit the SAP Help Portal 31
9/14/2022

 Note
If you want to archive the pro tability segments using the archiving object COPA1_xxxx, use program
RKEREOCE4 to prepare archiving. For more information, see SAP Note 383728.

Procedure
1. Call Archive Administration (either by choosing Tools Archive in the SAP menu for Pro tability Analysis or by using the
general transaction code SARA) and select the archiving object.

2. Choose Write.

3. Select the variant with which the program should be started., or create a variant.

You can enter the following selection parameters for your variant:

Object key (only for archiving objects COPAA_xxxx and COPAB_xxxx)

Controlling area

Company code

Other parameters that you have speci ed in Customizing for Pro tability Analysis under
Tools Utilities Prepare Archiving .

Constraints

Fiscal year

Period

Note: If your operating concern was created in Release 2.2 and has a blocking factor greater than 1, you
can only archive actual line items in time intervals of less than one scal year.

Plan/actual indicator

Version

Record type (only in costing-based CO-PA)

Process

Processing Options

When you select the Production Mode option, the system creates an archive.

When you select the Test Mode , the system only selects the data and then issues a log.

When the deletion program is started automatically (you can make the required settings for this under
Goto Customizing Technical Settings) , you can set the Delete Program in Test Mode indicator.

Only archive line items (only for archiving objects COPA1_xxxx and COPA2_xxxx; this can only be called using
transaction SARA)

If you set the Archive Line Items Only indicator, the segment level (summarization records for the line items) is
not archived.

 Note
It is only useful to archive the segment level for past years, since the segment level may still be updated in the
current scal year.

This is custom documentation. For more information, please visit the SAP Help Portal 32
9/14/2022
Similarly, you should only archive line items for previous periods, since these can still be posted in the current
period.

4. Choose Start Date to de ne when the program should run.

5. Choose Spool Parameters to specify how the archiving log should be managed. If you want the archiving program to
start the delete program automatically, these spool parameters apply for the log for the delete program as well.

For more information about spool management, see Printing in the documentation Introduction to the SAP System .

6. Under Goto Customizing Technical Settings , you can make other settings, such as:

Archive le size

The logical le name

The connection to ArchiveLink

Automatic execution of the delete program

7. Choose Execute to create the job with the settings you have made.

8. By choosing Goto Job Overview , you can display a list of all the jobs that exist for this archiving program.

In the write and delete phases, the system creates messages in the job log and in the status line. For information about
when the different messages are generated and what they mean, see under "Explanations for the messages" in SAP
Note 613707.

For general information on the background jobs, see the documentation on the Computing Center Management System
.

 Note
If the job is interrupted due to a power outage or similar, you can simply restart it.

If you have to interrupt the job for any reason (such as shortage of memory space), you can do this in the archive
administration. For more information, see Interrupting and Continuing Archiving Sessions .

Starting the Delete Program (CO-PA)

Use
If you connect the delete program to the data record archiving program, it is performed automatically (see Creating Archive
Files (CO-PA) ). If, however, you do not connect it in this way, you can instead call the delete program separately.

Procedure
To execute the delete program, proceed as follows:

On the initial screen of the archiving transaction, choose Delete . The screen Archive Management: Execute Deletion Program
appears.

The following variants are delivered for the test and production run:

This is custom documentation. For more information, please visit the SAP Help Portal 33
9/14/2022
Test run: SAP&TEST

Production run: SAP&PROD

You can change this assignment under Goto → Customizing → Archiving-Object-Speci c Customizing → Technical Settings

Parameters of the variants:

Test Mode : Set this indicator for the test run variant.

Production Mode : Set this indicator for the production run variant.

Delete Presummarized Data : (only for archiving object COPAB_xxxx)

Set this indicator so that the data in reports or planning remains correct when a plan version is re-planned in an archived
period, for example, or when a report reads archived data and summarization levels simultaneously.

If you want to run the deletion program in the test mode, set the Test Mode indicator. In this case, the system applies the
variant that you speci ed as the test run variant under Goto → Customizing . In the test mode, no table entries are deleted.

If you do not select Test Run, the system uses the variant that you speci ed in Customizing for archiving as the production run
variant.

Use the Archive Selection pushbutton to specify which data should be deleted.

Use the Start Date pushbutton to specify when the job should run.

Use the Spool Parameters pushbutton to specify how the deletion log should be managed.

For more information about spool management, see Printing in the documentation Introduction to the SAP System .

Choose Execute to create the job with the settings you have made.

By choosing Job Overview , you can display a list of all the jobs that exist for this archiving program.

Reloading Archived Data (CO-PA)

Usage
In general it is possible to reload the contents of an archive le back into the SAP system. However, the system cannot execute
a comprehensive consistency check if you do so.

Therefore ensure that reports can be started directly on archived data without having to reload the data beforehand.

Requirements
You need to make sure no postings have been made since the last archiving transaction in the time interval that you want to
reload. Inconsistencies between the line items and the segment level would otherwise arise as a consequence.

Furthermore, you may not execute the function Reload archive if the current numbers of the number range objects involved
(COPA_IST and COPA_PLAN for costing-based Pro tability Analysis and RK_BELEG for account-based Pro tability Analysis )
have been reset in the meantime.

This is custom documentation. For more information, please visit the SAP Help Portal 34
9/14/2022

Procedure
To reload an archive le, proceed as follows:

1. From the Menu on the initial screen of the archiving transaction, choose Goto Reload . The system displays the Archive
Administration: Reload Archive Sessions screen.

2. Choose Possible entries (F4) to select the variant with which you want to execute the reload program . If no variants
exist, you can create one by choosing Maintain . (Instructions for this procedure are to be found in the eld help (F1 help)
for the eld Variant) .

If you wish to run the program in the test mode, select the Test run eld. This means that no data will be inserted into
the tables.

3. To determine which data should be reloaded, choose Archive selection .

4. To determine when the job should run, choose Start date .

5. To determine how the reload log should be managed, choose Spool parameters .

For further details about spool management, see the section Printing from the SAP System in the documentation
Getting Started .

6. To create the job with the settings you have made, choose Execute .

You can display a list of all the jobs that exist for this archiving program by choosing Goto Job overview . For more information
about background jobs, see the online documentation on Computer Center Management System that you will nd under
Background Processing .

Runtimes (CO-PA)
No application-speci c source code (such as validity checks) is executed when you run the archiving program. Consequently, the
time required to archive the data depends entirely only the workload capacity of the database.

An exception to this is the preprocessing program for archiving pro tability segments. This program checks many application
tables for the usage of a pro tability segment (see the section "Prerequisites" in Creating Archive Files (CO-PA) ). You can limit
this time-intensive check by using the preprocessing program variant to restrict the tables to be processed to just a few
application components.

Data Protection and Privacy - Enabling Data Retrieval in


Pro tability Analysis
As per Art. 15 EU GDPR the data subject has the right to obtain from the controller con rmation as to whether personal data
concerning him or her are being processed. If this is the case, the data subject has the right to access the personal data. For
example, the data subject has the right to obtain information regarding where his or her personal data are stored or to request
from the controller correction or erasure of the personal data.

To ful ll this requirement, Information Lifecycle Management (ILM) objects have to be created for archiving objects, and in
addition Information Retrieval Framework (IRF) models have to be created based on the ILM objects. For pro tability analysis
(CO-PA), the data structure of each operating concern is customer-speci c. Therefore the ILM objects and IRF model for
application component CO-PA must be created individually in the customer system. ILM objects in turn are based on archiving
objects for the respective application components.

Whenever a new operating concern is generated in pro tability analysis, the following archiving objects are generated,
depending on the type of pro tability analysis used (XXXX stands for the name of the operating concern):
This is custom documentation. For more information, please visit the SAP Help Portal 35
9/14/2022
Costing-based Pro tability Analysis: COPAA_XXXX, COPAB_XXXX, COPAC_XXXX

Account-based Pro tability Analysis: COPA2_XXXX, COPAC_XXXX.

Preparation
Before you start, do the following:

Create a transport request in the system

Create a package for customer speci c implementations in the system

Create a list of all active operating concerns

Verify Archiving Objects


Before you start to create the IRF objects and models, you have to ensure that the archiving objects of the operating concerns
exist and that all the relevant database tables are contained in the archiving objects.

You have to check this for all operating concerns in your system.

To check the archiving objects:

1. Choose Tools ALE ALE Administration Services IDoc Archiving .

In the eld Archiving Object enter the name of the archiving object and choose Database Tables.

The system displays the list of tables that are relevant for the archiving object.

Check that the archiving objects for your operating concerns contain the tables mentioned below.

 Note
XXXX denotes the operating concern.

Tables in archiving objects

Archiving object Tables

COPAC_XXXX CE4XXXX

CE4XXXX_ACCT

CE4XXXX_FLAG

CE4XXXX_KENC

COPAB_XXXX CE3XXXX

This is custom documentation. For more information, please visit the SAP Help Portal 36
9/14/2022

Archiving object Tables

COPA2_XXXX CKHS

CKHT

CKIP

CKIS

CKIT

COBK

COBK_INDX

COEJ

COEP

COEPBR

COEPD

COKA

COKP

COKS

COOI

COSPD

COSSD

EBII

STXB

STXH

STXL

Create and Verify Information Lifecycle Management (ILM)


Objects
In order to use SAP Information Lifecycle Management there must be an ILM object for each archiving object in the system. For
pro tability analysis you have to generate ILM objects for all active operating concerns and corresponding types of pro tability
analysis. That means if you have an active operating concern that uses both types, costing-based and account-based, you must
generate an ILM object for costing-based pro tability analysis and one for account-based pro tability analysis.

If you want to choose a different type of pro tability analysis, in the SAP Easy Access menu, choose
Accounting Controlling Pro tability Analysis Environment Set Operating Concern .

To create the ILM objects:

1. In the SAP Reference IMG, choose Controlling Pro tability Analysis Tools Utilities Prepare Archiving .

2. In the menu, choose Table View ILM-Objects Generate . The system displays a dialog box. Con rm by choosing Yes.

The system displays a dialog box.

Enter the transport request you created and con rm it.

This is custom documentation. For more information, please visit the SAP Help Portal 37
9/14/2022
The system generates the corresponding ILM objects.

To verify whether the ILM objects have been created:

1. Choose transaction IRM_CUST.

The system displays the screen Object Categories: Overview.

2. Select the object category OT_FOR_BS and in the dialog structure select ILM Objects.

3. Click on Position In the dialog box, in the eld ILM Object, enter COPA and press Enter.

In the list of ILM objects, the system jumps to those where the name starts with COPA.

4. In the list, check whether there is an ILM object for each archiving object and type of pro tability analysis.

 Note
The ILM objects have the same name as the archiving objects they are based on.

Create the Information Retrieval Framework (IRF) Model


The Information Retrieval Framework allows you to search for and retrieve all personal data of a speci ed data subject.

Once you have created all the required ILM objects, you are ready to create the IRF model for pro tability analysis with
application component CO-PA. The ILM objects act as an input for the creation of the IRF models. The IRF framework creates
the cluster of tables associated with the archiving/ILM objects. The IRF model for the corresponding ILM object is relevant if at
least one of its tables contains personal data elds (Customer, Vendor, User Name, Personal Number etc.). The Information
Retrieval Framework currently supports only two personal data elds: Customer and Vendor.

The following table shows the four ILM objects that are associated with archiving objects of pro tability analysis.

ILM Objects associated with Profitability Analysis

ILM Object Relevant for IRF Relevant Tables Information

COPAA_XXXX Yes CE1XXXX, CE2XXXX These tables contain the


costing-based line items and
reference at least the customer
number in characteristic
KNDNR.

COPAB_XXXX No CE3XXXX This table contains the costing-


based totals and does not
reference any customer-
relevant characteristics.

This is custom documentation. For more information, please visit the SAP Help Portal 38
9/14/2022

ILM Object Relevant for IRF Relevant Tables Information

COPA2_XXXX No COBK, COEJ, COEP These tables contain the


account-based line items.

For actual line items the data is


contained in G/L line item table
ACDOCA but is accessed via
compatibility view COEP.
Therefore for displaying actual
line items, the IRF model for
application component FI-GL-GL
along with ILM object
FI_DOCUMNT can be used (see
below).

In the planning line items in


table COEJ no customer-
relevant characteristics exist.
The read data is joined with
pro tability segment table
CE4XXXX (where XXXX denotes
your operating concern). This
table is handled by ILM object
COPAC_XXXX though.

COPAC_XXXX Yes CE4XXXX, CE4XXXX_ACCT, These tables contain


CE4XXXX_KENC pro tability segment
information.

Besides table ACDOCA there is one more table that is relevant for the IRF, named ACDOCA_KENC. It is linked to ILM object
FI_DOCUMNT.

ILM Object Relevant for IRF Relevant tables Information

FI_DOCUMNT Yes ACDOCA, ACDOCA_KENC ACDOCA contains thee account


based actual line items.

Table ACDOCA_KENC contains


the realignment history for
account-based actual data in
table ACDOCA.

The data of both tables can be


accessed using the IRF model
for application component FI-
GL-GL along with ILM object
FI_DOCUMNT.

Create IFR model for CO-PA


The ILM objects COPAA_XXXX and COPAC_XXXX are relevant for the IRF model of pro tability analysis.

1. To update or create the IRF mode based on an ILM object choose transaction DTINF_ADJUST_MODEL, enter the ILM
object you have created (COPAA_<operating concern>) and choose Create.

The system displays two dialog boxes with warnings that you have to con rm.

2. Enter the transport request you have created before and con rm it.

This is custom documentation. For more information, please visit the SAP Help Portal 39
9/14/2022
3. Update the IRF model with the second relevant ILM object (COPAC_<operating concern>) as described in steps 1 and 2.

4. Con rm the warnings again, enter the transport request, and con rm it.

The system opens the Information Retrieval Framework page.

5. In the Application Component eld, enter CO-PA and click the arrow in the lower right hand corner.

The system displays a picture of the IRF model created for the operating concern. The relevant ILM objects are
COPAC_<operating concern> and COPAA_<operating concern>.

6. Create an IRF model for application component CO-PA for all active operating concerns.

How to Deal with More Than Two Customer-Related


Characteristics
If your operating concern contains more than two customer-related characteristics, for example partner roles like ship-to-party
or bill-to-party, you have carry out additional activities so that the IRF can process these elds.

1. Choose transaction SE18. In the Enhancement spot eld, enter ES_DTINF_C. Choose Display.

The system displays the enhancement spot.

2. In the structure on the right-hand side, place the cursor on BAdI de nition BADI_DTINF_READ_API_EXT_C, right-click
and choose Create BAdI Implementation.

The system displays a dialog box for the enhancement implementation.

3. Enter a name and description for the enhancement implementation, and con rm your entries.

The system displays a dialog box.

4. Enter the package you created earlier and con rm your entry.

The system displays a dialog box for the BAdI implementation.

5. Enter a name, a description and an implementing class for the BAdI implementation.

The system displays a dialog box.

6. Choose Filter Values, then Display <->Change. Then choose Create Filter Combination and double-click on the line under
Combination 1.

7. Copy the table cluster ID of table KNA1 from transaction DTINF_MODELING.

8. In transaction SE18 in the window Change Filter Value, enter the value of the table cluster for table KNA1 in the eld
Value 1 and set the eld Comparator 1 to =. Con rm you entries.

The system displays a dialog box.

9. Con rm, save, and activate the enhancement implementation.

10. In the structure on the left-hand side, double-click on Implementing Class and then on the right-hand side on method
name IF_DTINF_READ_API_EXT_C~GET.

11. If you have, for example, two additional customer-related characteristics, KUNWE for the ship-to-party and KUNRE for the
bill-to-party in your operating concern, you need to add the following pieces of code as implementation of this method:

 Code Syntax

***************************************************************************************
DATA: ls_api_ext TYPE dtinf_s_badi_fm_rfc.

* Start: Add selection for customer (KNDNR)


ls_api_ext-sec_tc_id = '13_2AA581'.
ls_api_ext-function_module = 'ZCOPA_DTINF_READ_API_EXT_C'.
This is custom documentation. For more information, please visit the SAP Help Portal 40
9/14/2022
ls_api_ext-prim_tab = 'KNA1'.
ls_api_ext-prim_field = 'KUNNR'.
ls_api_ext-sec_field = 'KNDNR'.
ls_api_ext-sec_tab = 'CE4FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_ACCT'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_KENC'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tc_id = '1_2AA581'.
ls_api_ext-sec_tab = 'CE1FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE2FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
* End: Add selection for customer (KNDNR)

* Start: Add selection for ship-to-party (KUNWE)


ls_api_ext-sec_tc_id = '13_2AA581'.
ls_api_ext-function_module = 'ZCOPA_DTINF_READ_API_EXT_C'.
ls_api_ext-prim_tab = 'KNA1'.
ls_api_ext-prim_field = 'KUNNR'.
ls_api_ext-sec_field = 'KUNWE'.
ls_api_ext-sec_tab = 'CE4FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_ACCT'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_KENC'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tc_id = '1_2AA581'.
ls_api_ext-sec_tab = 'CE1FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE2FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
* End: Add selection for ship-to-party (KUNWE)

* Start: Add selection for bill-to-party (KUNRE)


ls_api_ext-sec_tc_id = '13_2AA581'.
ls_api_ext-function_module = 'ZCOPA_DTINF_READ_API_EXT_C'.
ls_api_ext-prim_tab = 'KNA1'.
ls_api_ext-prim_field = 'KUNNR'.
ls_api_ext-sec_field = 'KUNRE'.
ls_api_ext-sec_tab = 'CE4FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_ACCT'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE4FZ01_KENC'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tc_id = '1_2AA581'.
ls_api_ext-sec_tab = 'CE1FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
ls_api_ext-sec_tab = 'CE2FZ01'.
APPEND ls_api_ext TO ct_read_api_ext.
* End: Add selection for bill-to-party (KUNRE)

This is custom documentation. For more information, please visit the SAP Help Portal 41
9/14/2022
12. In the piece of code, you have to replace the following values:

Replace FZ01 with the name of your operating concern.

Replace 13_2AA581 with the table cluster ID from transaction DTINF_MODELING which contains tables CE4XXXX,
CE4XXXX_ACCT and CE4XXXX_KENC (XXXX denotes your operating concern).

Replace 1_2AA581 with the table cluster ID which contains tables CE1XXXX and CE2XXXX.

 Note
For each of your customer-related characteristics, paste one of the pieces of code listed above between the lines“*
Start: Add selection for….” and “End: Add selection for….”. This means that if you do not use KUNWE and KUNRE but
have another customer-related characteristic WWPAR, just remove above lines of code for KUNRE and in the one for
KUNWE replace the value of KUNWE by WWPAR. The piece of code for characteristic KNDNR is always necessary and
must not be removed.

13. Activate your changes.

14. Choose transaction SE80.

15. Create a new function group, enter a name, and choose Enter.

16. Enter a short text and save the function group.

The system displays a dialog box.

17. Save the function group in the package you created.

18. Create a new function module in you function group and enter a name and a description.

19. Enter the following importing parameters:

Parameter name Typing Associated Type Optional

I_TAB TYPE TABNAME

I_ADD_TAB TYPE GTB_TAB

I_EVENT TYPE CHAR1

I_SEC_TAB_ID TYPE GSS_DEP_ID X

Enter the following exporting parameters:

Parameter Name Typing Associated Type Optional

E_ACTION TYPE CHAR1

E_ROWS TYPE GSS_COUNT

E_DONE TYPE BOOLEAN

Enter the following changing parameters:

Parameter name Type Associated Type Optional

IT_OR_SELTAB TYPE GTB_T_OR_CLAUSE

ET_TABLES_EXIT TYPE GSS_T_SEARCH_AREA

20. Add the following piece of code to the function module:

 Code Syntax
This is custom documentation. For more information, please visit the SAP Help Portal 42
9/14/2022

***************************************************************************************
• DATA: lv_tabix TYPE sy-tabix,
lv_tabix_orig TYPE sy-tabix,
lv_where TYPE string,
lt_where TYPE STANDARD TABLE OF string,
ls_or_seltab TYPE gtb_s_or_seltab,
lt_or_seltab TYPE gtb_t_or_clause,
lt_or_seltab_orig TYPE gtb_t_or_clause,
lv_pos TYPE gtb_pos.

DATA: lrs_seltab TYPE REF TO gtb_s_seltab,


lrs_or_seltab TYPE REF TO gtb_s_or_seltab.

* Check event
CHECK i_event = 'D'.

* CE* tables
IF i_add_tab CP 'CE*'.

* Copy selection table to local table


CLEAR lt_or_seltab_orig[].
lt_or_seltab_orig[] = it_or_seltab[].

* Initialize selection table


CLEAR it_or_seltab[].

* Loop over selection table


CLEAR lt_where[].
CLEAR lt_or_seltab[].
CLEAR lv_pos.
LOOP AT lt_or_seltab_orig REFERENCE INTO lrs_or_seltab.

* Set table index locally


CLEAR lv_tabix_orig.
lv_tabix_orig = sy-tabix.

* Loop over specific selection table


LOOP AT lrs_or_seltab->seltab REFERENCE INTO lrs_seltab.

* Set table index locally


CLEAR lv_tabix.
lv_tabix = sy-tabix.

* Fill WHERE clause


CLEAR lv_where.
IF lv_tabix < lines( lrs_or_seltab->seltab ) OR
lv_tabix_orig < lines( lt_or_seltab_orig ).
lv_where = lrs_seltab->field && ' = ''' && lrs_seltab->low && ''' OR'.
ELSE.
lv_where = lrs_seltab->field && ' = ''' && lrs_seltab->low && ''''.
ENDIF.
APPEND lv_where TO lt_where.

* Add new entry to selection table


CLEAR ls_or_seltab.
ls_or_seltab-pos = lv_pos.
ADD 1 TO lv_pos.
APPEND lrs_seltab->* TO ls_or_seltab-seltab.
APPEND ls_or_seltab TO lt_or_seltab.

ENDLOOP.

ENDLOOP.

* Return selection table


it_or_seltab[] = lt_or_seltab[].

ENDIF.

* Get number of entries, if necessary


CLEAR e_rows.
IF NOT lt_where[] IS INITIAL.
SELECT COUNT(*) FROM (i_add_tab) INTO e_rows
WHERE (lt_where).

This is custom documentation. For more information, please visit the SAP Help Portal 43
9/14/2022
ENDIF.

* Set exporting parameters


e_action = 'F'.
e_done = abap_true.
***************************************************************************************

 Note
The function module must have the same name as assigned in the implementation of method
IF_DTINF_READ_API_EXT_C~GET to variable LS_API_EXT-FUNCTION_MODULE.

21. Choose transaction DTINF_ADJUST_MODEL, choose tab Add FM BAdI and select the table cluster ID associated to table
KNA1. Then choose Show possible Function Modules, under Customer select your function module and choose Add
Function Module.

The system displays a dialog box.

22. Enter the workbench request and con rm your entry.

The system displays a success message.

Verify the Information Retrieval Framework Model


After you have con gured and saved the data model, you can test it. To get a business-speci c output of search results, you
must assign a purpose to your ILM objects.

1. Choose transaction DTINF_ADJUST_MODEL and assign a purpose to an ILM object.

2. Enter the following data:

The New purpose that you want to assign to your ILM object.

The ILM Object

The Starting table from which the data collection process should be triggered.

The Starting eld of the entered starting table

3. Choose Add/Update.

4. Choose transaction DTINF_TEST_MODEL.

 Note
Before testing make sure that the tables for which you want to test the model contains a few entries. It might happen
that if the entries are not there, the tables will not appear in the output tree.

5. Enter data and execute.

This is custom documentation. For more information, please visit the SAP Help Portal 44

You might also like