Hi Venkat,
Please try this note:
============================================================
Summary
Symptom
You want to delete a field (characteristic, value field or quantity field) from an operating concern, but this operating concern already contains data.
Additional key words
CO-PA: KE02, KEA0, Maintain characteristics/value fields, Maintain operating concern
IS-B: JBG0
Cause and prerequisites
You added the field when you created the operating concern, but no longer need it.
Solution
This note tells you which steps are necessary for you to delete a field from an operating concern. As of Release 4.6 there will be a standard functin for deleting a field from an operating concern. As of Release 4.6, read the documentation in the Implementation Guide (IMG) on the topic maintaining operating concern.
This note is intended for experienced consultants only. In order to understand it, you need to have a knowledge of CO-PA and experience in working with the development environment.
The deletion of a field cannot be transported. If you want to delete field in a test and a production system, the deletion has to be carried out in each system! The reason for this is that the automatic transport recording is not possible with many objects in CO-PA. The function for transporting an operating concern can only be used to transport existing objects. No entries for objects, which no longer exist, are placed in the transport request.
Prerequisites
- Before you delete the fields it must be possible to generate the operating concern without any errors.
- After you have deleted the fields, you need to convert the operating concern tables. To do this, you need to have enough hard disk space available to store the largest table (CE1xxxx, xxxx = operating concern) twice in the database temporarily.
- The operating concern cannot be in use while you are carrying out the following steps. Therefore make sure that no postings are made to Profitability Analysis during this time. Do not forget the interfaces with SD, FI, and so on.
Actions
In the following, xxxx represents the name of your operating concern and zzzzz represents the name of the fields you want to delete.
1. Create a backup of the entire system! It is not sufficient to simply save the contents of the CE* tables, because changes need to be made to the ABAP Dictionary.
2. Delete all the objects which refer to the fields you want to delete. These can include reports, row/column structures, key figure schemes, valuation, field assignments for the interfaces, derivation, summarization levels, realignments ... .
Pay special attention to the condition tables, derivation structures, the field assignments for the interfaces and the summarization levels. Irrespective of which field is to be deleted, all summarization levels must be deleted.
If you do not delete all the references, this can lead to terminations, especially in the interfaces. In the debugger, you will usually find a variable which refers to the deleted field near the place where the program terminated. You can usually solve the problem by subsequently deleting that object.
3. When you delete a characteristic, you must delete all lines in table TKEZU which contain the characteristic zzzzz. This table can be maintained via Transaction SM30 with the View V_TKEZU.
4. As of Release 3.0: When you delete a characteristic, delete the table entries which refer to the characteristic to be deleted (fields: MERKMAL, KEY1 to KEY5) in the "derivation tables" (table TKEAN).
5. Edit Include MKGALT8T (using Transaction SE38) and delete the TABLES definition for Table CE7xxxx.
6. Delete the lock objects EKC5xxxx and EKC6xxxx (if they exist) from the ABAP/4 Dictionary (Transaction SE11).
7. Delete the structures CE5xxxx, CE6xxxx (if it exists), CE7xxxx and CE8xxxx from the Dictionary. You can ignore the error message telling you that the structures are still being used in programs, because the structures and programs will be regenerated later.
8. Delete the desired fields from the tables listed below in the ABAP Dictionary, and then save the table definition. Depending on the type of field, you can delete the zzzzz as follows:
- Characteristic
Delete the field zzzzz from Tables CE0xxxx, CE1xxxx, CE2xxxx and CE4xxxx; as of Release 4.0 also from Table CE4xxxx_KENC; as of Release 4.5 also from Table CE1xxxx_ACCT.
- Value field
Delete the field zzzzz from Tables CE0xxxx and CE1xxxx, and the fields zzzzznnn from Tables CE2xxxx and CE3xxxx (nnn = 001 to the period block). In Release 2.2E and later, the period block no longer exists (nnn is always 001).
- Quantity field
For quantity field zzzzz, a unit field zzzzz_ME also exists in the structures. Process the quantity field zzzzz the same way as the value fields and the unit field zzzzz_ME the same way as the characteristic.
9. Use the database utilities (Transaction SE14), to convert Tables CE1xxxx, CE2xxxx, CE3xxxx, CE4xxxx, CE4xxxx_KENC und CE4xxxx_ACCT. The Tables CE4* must be converted last. After that the tables will be active again.
10. Only for Release 2.2: Delete the following in client 000:
- for a characteristic, the entry xxxx zzzzz from Table TKEIG and
- for a value or quantity field, the entry xxxx zzzzz from Table TKEWP.
11. As of Release 3.0: Execute report RKEREOFC. Activate the checkbox "all operating concerns".
12. Regenerate the operating concern. Up to including Release 2.2 this is done in Transaction KE02. As of Release 3.0, use Transaction KEA0 to activate the data structures, and then generate the environment. Customers who work with IS-B (Profitability Analysis for Banking) have to use Transaction JBG0.
13. As of Release 4.0: After you have generated the environment of the operating concern, the generation of the client-specific part is completed when calling up the first transaction. To do so, call up Transaction KE21. If the call terminates with a dump MESSAGE_TYPE_X K/590, proceed as per Note 114407.
14. Up to and including Release 2.2E: If you have deleted a characteristic, execute the function module RKD_SHORT_TEXT_GENERATE in the test environment (Transaction SE37) using the parameters APPLCLASS=KE and MODE=N.
15. Once you have completed the above steps, you can use the operating concern again.
Cleaning up of leftover objects
The actions described above only deleted the fields from the operating concern tables. The following tells you how to delete the corresponding data elements, domains, and so on. Once the actions have been performed, the deleted field can be recreated again.
These actions are optional. You can also perform them at a later point in time. However, you can only do them for fields which are not being used in another operating concern.
CAUTION: Fields from interface structures have yet to be deleted in the following. While the structures are being activated, postings should not be made in the system, because the program may terminate (FI, CO, SD, ...).
A value or quantity field has been deleted and is not used in any other operating concern:
a) As of Release 3.1G: Delete the value or quantity field from structure COPAVAL.
b) As of Release 4.0: Delete the value or quantity field from structure COPAFIELDS.
c) Up to and including Release 3.1I: Delete the corresponding data element RKE2_zzzzz.
You do not have to worry about the unit field zzzzz_ME here, since no objects were generated for it in the ABAP Dictionary.
d) As of Release 4.0A: Delete the value or quantity field via function "Edit Value Fields" (Transaktion KEA6)
If you deleted a characteristic copied from the master data table :
a) You do not need to do anything here.
If you deleted a characteristic which you defined yourself:
a) Check whether or not the corresponding data element is being used in other operating concerns. To do this, use the where-used list for domains in tables. Only the following tables should appear in the list: KOM*, T25xx, H_T25xx, COPACRIT, BBSEG, COPABBSEG, COPAFIELDS, ACCTSD, ACCIT_PA and K9*. If any other tables are listed, do NOT carry out the following steps.
b) Delete the entry "A KE 001 zzzzz" from table T681F, if it still exists.
c) Delete the field zzzzz from table KOMPAKE in the ABAP/4 Dictionary, and activate the table. This table is used as an INCLUDE in the other KOM* tables. Consequently, all the KOM* tables in the where-used list will also be activated.
CAUTION: The KOM* tables are central interface structures in SD. No one should be working in the system when you activate them. Otherwise terminations may occur (FI, CO, SD, ...).
d) As of Release 3.0D: Delete the RKE_zzzzz field from the COPABBSEG structure in the Dictionary, and activate the structure. This structure is used as an INCLUDE in the structures BBSEG and ACCIT_PA.
CAUTION: The change to the COPABBSEG structure also implicitly changes the BBSEG structure for transferring external data into FI. Adjust your external program for creating external data files in FI, if necessary. Start the generation program RFBIBLG0 to adjust the program RFBIBL00 to the changed BBSEG structure.
e) As of Release 3.0E, delete the field zzzzz from the structure COPACRIT in the Dictionary, then activate the structure.
f) As of Release 4.0A, delete the field zzzzz from the structure COPAFIELDS. This structure is used as an INCLUDE in the structure ACCTSD.
g) As of Release 4.0A, if the characteristic to be deleted was used in a derivation structure in Release 3.0: Delete all tables K9xxx (xxx consisting of 3 digits) that contain the field. (Explanation: The derivation has been newly implemented in Release 4.0A. During the upgrade the derivation structures were automatically converted to the new data structures. However, the old data structures are not deleted.)
h) As of Release 4.0A, if the characteristic to be deleted occurs in a new derivation table K9R*, delete the corresponding derivation step via characteristics derivation maintenance (Transaction KEDR).
i) Up to and including Release 2.2: Delete the view H_T25xx.
Now the where-used list "Tables for domain" RKEG_zzzzz only contains two tables T25xx. These are the check table for characteristic zzzzz and the corresponding text table.
j) As of Release 4.0A, you can delete domain, data element and check table using "Edit Characteristics" (Transaction KEA5). To do this, use the menu option "Characteristics -> Delete". Up to and including Release 3.1I, the objects have to be deleted manually:
- Delete the entry for the check table in the domain, and then activate the domain.
- Delete the Tables T25xx mentioned in the above where-used list.
- Delete the data element RKEG_zzzzz.
- Delete the domain RKEG_zzzzz.
- Execute Program RKEAGENV. This will regenerate the view maintenance modules for the user-defined characteristics which still remain.
Header Data
| |
Release Status: | Released for Customer |
Released on: | 03.12.2001 23:00:00 |
Master Language: | German |
Priority: | Recommendations/additional info |
Category: | Workaround for missing functionality |
Primary Component: | CO-PA-ST Structures |
Secondary Components: | CO-PA Profitability Analysis |
Affected Releases
|
SAP_APPL | 22 | 22A | 22J | X | SAP_APPL | 30 | 300 | 31I | X | SAP_APPL | 40 | 40A | 40B | X | SAP_APPL | 45 | 45A | 45B | X |
|
============================================================
Julie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.