Data Archiving in Controlling (CO)
Data Archiving in Controlling (CO)
Data Archiving in Controlling (CO)
PUBLIC
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.
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:
Transaction data for costing-based pro tability analysis COPAA_xxxs, COPAB_xxxx, COPA1_xxxx (obsolete)
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.
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:
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).
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.
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.
Transaction Description
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:
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
.
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.
KVBI CO_ITEM
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).
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)
Log (CO)
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.
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.
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.
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.
The table analysis of table COEP helps you to select a suitable archiving object. For more information, see Table COEP .
Selection criteria
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) .
This is custom documentation. For more information, please visit the SAP Help Portal 8
9/14/2022
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:
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.
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
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
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
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.
You can archive funds commitment with archiving objectFM_FUNRES. In the internal order menu, choose
Environment Archiving Funds Commitment.
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
This is custom documentation. For more information, please visit the SAP Help Portal 10
9/14/2022
It meets the selection criteria
04 CO Production order
06 QM orders
For more information about deletion indicators and residence times, see Checks for Internal Orders (CO-OM-OPA) .
Recommendation
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).
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:
Orders: Actual/Plan/Variance
This is custom documentation. For more information, please visit the SAP Help Portal 11
9/14/2022
List: Orders
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.
1,000 total orders in the AUFK, CDHDR, CDPOS, COBRA, COBRB, COSP, COSPD, COSS, COEP, COBK tables were archived in a
test..
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.
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..
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.
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.
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 .
K_AUFK_ART Activity = *
To access the archive evaluation, you also need the authorizations for displaying the master data and, where appropriate, for
the information system.
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:
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.
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.
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 .
De nition
Archiving object CO_PROCESS is used to archive and delete data (transaction data with the corresponding master 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) 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
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.
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
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).
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.
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
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
Application area: CO
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:
Job Overview Display a list of all the archiving jobs, and from here:
See also:
This is custom documentation. For more information, please visit the SAP Help Portal 18
9/14/2022
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):
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.
See also:
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 .
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 )
Set the indicator only for background processing if the variant should only be allowed for background processing.
or should only be executed once another job has nished or only when a particular event should be executed
For more information, see Maintain Start Date and the Spool Parameter and Maintain Start Date .
2. For more information, see Maintain Start Date and the Spool Parameter and Maintain Spool Parameter .
3. Choose .
This is custom documentation. For more information, please visit the SAP Help Portal 20
9/14/2022
ARCHIVE_CO_COPC_WRI (write to archive)
To Delete an Archive
1. Choose Delete .
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 .
You use the variant to select the cost estimates that you want to reload.
3. You can also restrict selection to just the cost estimates that you want to reload by entering the necessary criteria.
4. Choose .
To Reload an Archive
This is custom documentation. For more information, please visit the SAP Help Portal 21
9/14/2022
1. Choose Evaluate .
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.
The material cost estimates are displayed. For more information, see Analysis of Results.
Choose Index.
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.
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:
CKMLPP
CKMLCR
CKMLLACR
CKMLMV003
CKMLMV004
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 .
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:
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.
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:
Valuation area
Material
Valuation type
The following detailed criteria are available for use with valuated sales order stocks:
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 ).
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.
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:
PC Price Changes
The following tables contain data that can appear in the material ledger documents:
MLPPF Material Ledger Document: Field Groups (Posting Periods and Quantities)
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:
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
The variant contains criteria that the system uses to select documents. These criteria are:
Valuation area
Document date
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 ).
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:
Reporting
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.
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 .
You should archive indexes as little as possible , as they are used for repairs of faulty data in inventory management.
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.
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
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:
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:
CKMLKEPH
CKMLPRKEPH
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 .
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 variant contains the following criteria with which the system selects the actual cost component split data.
Valuation area
Material
Valuation type
If you are using valuated special stocks, the following more speci c criteria are also possible:
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.
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.
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:
COPAA_xxxx
COPAB_xxxx
Structure
In costing-based pro tability analysis, you can archive the following tables:
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):
For both types of pro tability analysis, you can archive the following (using archiving object COPAC_xxxx):
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:
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 .
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:
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
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.
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
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 .
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
You can change this assignment under Goto → Customizing → Archiving-Object-Speci c Customizing → Technical Settings
Test Mode : Set this indicator for the test run variant.
Production Mode : Set this indicator for the production run variant.
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.
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.
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.
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
Preparation
Before you start, do the following:
You have to check this for all operating concerns in your system.
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.
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
COPA2_XXXX CKHS
CKHT
CKIP
CKIS
CKIT
COBK
COBK_INDX
COEJ
COEP
COEPBR
COEPD
COKA
COKP
COKS
COOI
COSPD
COSSD
EBII
STXB
STXH
STXL
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 .
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.
This is custom documentation. For more information, please visit the SAP Help Portal 37
9/14/2022
The system generates the corresponding ILM objects.
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.
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.
This is custom documentation. For more information, please visit the SAP Help Portal 38
9/14/2022
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.
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.
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.
1. Choose transaction SE18. In the Enhancement spot eld, enter ES_DTINF_C. Choose Display.
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.
3. Enter a name and description for the enhancement implementation, and con rm your entries.
4. Enter the package you created earlier and con rm your entry.
5. Enter a name, a description and an implementing class for the BAdI implementation.
6. Choose Filter Values, then Display <->Change. Then choose Create Filter Combination and double-click on the line under
Combination 1.
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.
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.
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 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.
15. Create a new function group, enter a name, and choose Enter.
18. Create a new function module in you function group and enter a name and a description.
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.
* Check event
CHECK i_event = 'D'.
* CE* tables
IF i_add_tab CP 'CE*'.
ENDLOOP.
ENDLOOP.
ENDIF.
This is custom documentation. For more information, please visit the SAP Help Portal 43
9/14/2022
ENDIF.
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 New purpose that you want to assign to your ILM object.
The Starting table from which the data collection process should be triggered.
3. Choose Add/Update.
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.
This is custom documentation. For more information, please visit the SAP Help Portal 44