During an S4HANA upgrade (for example with table PRCD_ELEMENTS) or during normal development work, you might end up in database and ABAP dictionary inconsistencies.
Questions that will be answered in this blog are:
- How to detect database and ABAP dictionary inconsistencies?
- How to repair database and ABAP dictionary inconsistencies?
Detection of database inconsistencies
In transaction DB02 you can get an overview of the missing database objects and inconsistencies:
Solving database and ABAP dictionary inconsistencies
The main procedure is explained in OSS note 1248769 – Inconsistency between database and ABAP Dictionary.
Start with transaction SE14 (database utility):
In the main screen click the Check button:
Result:
Pending on the check results, you need to Activate and Adjust the database.
Table reconstruction with DDIC user
Worst case you need to reconstruct the table. Be very sure this is needed before you execute it! Procedure for reconstruct: log on with user DDIC. Start transaction SE14. Select the menu option Table/Reconstruct (this option is only available for user DDIC).
Never use the database utilities in Shadow phase of an upgrade. In case of issues there: raise support message to SAP and only execute after instructions of SAP.
Table conversion issues
SE14 table conversion issues can happen. To roll back the changes, follow the instructions in OSS note 1925322 – How to roll back table conversion?.
In general a key field change that is increasing the length should go ok. Shortening key will can go dramatically wrong in the conversion due to duplicate entries.
Oss note 2465903 – Error DT064 “Structure change at field level (convert table …)” is suggesting to run program RUTATCHK before actual execution.
And read the FAQ note on table conversions: 2428810 – Frequently asked questions about table conversion.