Incremental conversion of tables or properly called as ICNV is actually helpful to reduce the conversion of long tables that have higher amount of data . IN this format the tables are converted before hand the downtime starts and the system will have less business down hours . The purpose of this wiki is to tell people what actually happens during the internal conversion of the table here .
States of an incremental conversion:
The prerequisites for the data transfer are prepared. The table can not be used during this phase.
- Data transfer
The data are moved (and converted) from the table with the old structure into the table with the new structure.
- Switch to the new structure
The new table definition is activated. The table can not be used during this phase.
Initialization : Start
- The table TAB was modified in the ABAP Dictionary. The length of last field of this table was changed from 60 to 30. Thus a conversion is necessary.
- The table has two indexes which exists on the database.
- The table was marked for incremental conversion.
Initialization: Create QCM-Table
- In the first step of the initialization a table QCMTAB with the revised structure (where field 3 has length 30) is created.
- The two indexes are also created on the database under different names (suffix X).
- The table QCMTAB is empty.
Initialization: Rename old DB-Table
- The table TAB (old structure) is now renamed on the database to QCM1TAB.
- A field (Indicator field) is added to this table. This is possible by executing a database statement (ALTER TABLE ... ADD FIELD)
Initialization: Create Triggers
A update trigger and a delete trigger are created on QCM1TAB.
Initialization: Create DB-View
The initialization is now finished. The table TAB was replaced during this phase by a view TAB with the same structure. Application programs can access the data now by this view! Thus, the changes made during initialization are not visible to application programs using the table TAB. They simply work in the same way as before!
Data Transfer: Start
Each record which was copied to QCMTAB is marked with the value C in the indicator field
Working on the tables during data transfer
Data Transfer: Updating records
Data Transfer: Deleting records
Data transfer: Inserting records
Switch to new structure: Start
Switch to new structure: Last data transfer
Switch to new structure: Activation
Switch to new structure: Renamed table
The table QCMTAB is renamed to TAB
Switch to new structure: Deletion
The table QCM1TAB is not longer necessary and thus deleted on the database