SAP Business One SDK Support

SAP Note Search

Display any SAP Note Immediately via Note Number

Display any SAP Note Immediately via Note Number!
Note Number :

Display/Search

Please note : User need S-User details to display the above note.

[Solved/Solution] Upgrade / Setup Wizard Precheck: User-Defined Table Unique Index Error

1343077 - Upgrade / Setup Wizard Precheck: User-Defined Table Unique Index

When you run the SAP Business One Upgrade / Setup Wizard, the following error message may appear in the pretest step: Duplicate records found for unique indexes in user-defined table.

Solution 

This check detects if a company database has user-defined tables (UDTs) that are inconsistent with the SAP Business One default structure, as follows:
User table of type:
  • No object - the Code and Name values should both be unique.
  • Master data - the Code and DocEntry values should both be unique.
  • Master data rows - the combination of Code and docEntry should be unique.
  • Document - the DocEntry value should be unique.
  • Document rows - the combination of DocEntry and Line ID should be unique.
A table that is not consistent with the SAP Business One UDF default structure can be located in the log file.

Example log:
Table '@BCENOTE' contains 3 duplicate records for field 'Code', duplicate field value is '00000002'.
Table '@BCENOTE' contains 2 duplicate records for field 'Code', duplicate field value is '0000000C'.
Table '@SI_QPLDET' contains 2 duplicate records for combination of fields 'Code' and 'LineId', duplicate field value is '(1, 1)'
Table '@SI_QPLDET' contains 2 duplicate records for combination of fields 'Code' and 'LineId', duplicate field value is '(11, 2)'

According to the SAP Business One UDT default structure, the Code field in table @BCENOTE should be unique, but the example log means that:
  • There are 3 records containing the value '00000002'.
  • There are 2 records containing the value '0000000C'.
According to the SAP Business One UDT default structure, the combination of the Code field and the LineId field in table @SI_QPLDET should be unique, but the example log means that:
  • There are 2 records containing the same combined value of: the value of 'Code' is 1, the value of 'LineId' is 1.
  • There are 2 records containing the same combined value of: the value of 'Code' is 11, the value of 'LineId' is 2.
You must get the customer's approval to update the duplicated field values and clear the duplications. We recommend generating a database backup before updating any object from the company database.
If you have inconsistent UDTs/UDFs, then please also refer to SAP Note 1076082 on how to fix them.
No duplicates scenario:
The following section describes a scenario where there are no actual duplicates.
This pre-upgrade check may also fail when there are no actual duplicates in a UDT, but the table structure is inconsistent with the SAP Business One default structure. In such a case the message in the log file would be:
Test result: Not completed due to SBOErr -2020 in function CDagCheckUTBRecordInconsistence::DoCheck(), error text: Open user defined table @SOME-TABLE failed. 
As such, you'll need to check if the mentioned table contains columns that are not allowed by SAP Business One.
For example, a user table of type No object should contain the columns Code, Name, and some U_xxxx columns, as described in table CUFD. If the user table contains any more columns, the pre-upgrade check would fail and return the above error. In such a case, please remove the excessive columns from the user table and retry the upgrade.  

Please check actual details in SAP portal with customer S-User Id.