Convert the table using the Database Utility (SE14)
Recently I tried to add MANDT field as primary key to an ABAP database table with data already exist in it. Unfortunately I got an error message which prevents me activate database table structure which is updated. The ABAP data dictionary error is "structure change at field level" and offers to "convert the table using the Database Utility (SE14)" for providing a solution.
Here is my ABAP database transparent table. I add table field MANDT as primary key and save the changes.
But activation failed before I convert database table using SAP SE14 Database Utility transaction and adjust database.
Here is the error message I experienced during table activation.
Structure change at field level (convert table Z_TR_PFORM_I)
Message no. DT064
Diagnosis
The structure of the table changed at field level. This change requires a conversion of the table. This situation can occur for example if the data type or field length of the domain upon which the field is based was changed. A conversion is also generally necessary if the key of the table changed.
System Response
Procedure
Convert the table using the Database Utility (SE14).
To solve this ABAP error and activate the change on database table, first execute SAP transaction SE14 Database Utility.
When the SAP se14 transaction screen is displayed, enter the name of the transparent table name in Object Name input box. Be sure that Tables option is selected in Dictionary objects selection for the transparent database table.
Then press Edit button for the next screen.
When ABAP Dictionary: Utility for Database Tables screen is displayed for the target ABAP table make sure that "Save data" option is selected.
Press the Activate and adjust database button when Save data option is selected.
When the approval for the action is requested continue processing with pressing Yes.
This task will add the MANDT field on the table structure for a database table where there are already rows in it. It will activate the table and its updated new structure. Since MANDT field is primary key the field for existing records should be populated somehow. And Save data option with adjust database button fills missing data on new MANDT field for providing table consistency.