We are seeing an issue with using the SAP Business One Solution Packager to package a copy of the database and include the Boyum UDO tables. The issue can also happen after a DB upgrade.
The issue is that you will be unable to create new UDO entries in Universal Functions/Item Placement tool/Function Buttons/other UDO windows as you will get the error "The entry already exists in the following tables". This will happen even if you use codes that do not already exist.
We have received a copy of a customer database with the issue and we are able to replicate the issue but it is an SAP bug.
If you create a default form on the UDO object and it gives the same error.
As this is a UDO object we use SAP functionality for saving/updating it so we cannot give an answer to why it is not working.
Our recommendation is to contact SAP support and say that you have a UDO default form that you cannot update (Attached are screenshots of the default form based on the Universal function table) and ask for a fix.
See this video for more details and examples on how to make the default UDO:
Comments
8 comments
Update:
We have received a workaround from a partner that can be used if you are in a hurry:
"Deleting all object and boy tables will solve the problem. But is a lot of work."
Update 2:
A partner has gotten the following fix from SAP:
Update ONNM Set AutoKey = (select MAX(DocEntry) + 1 from
[@BOY_41_FUNCTIONS]) WHERE ObjectCode
= 'BOY_41_FUNCTIONS'
Please only use this and test databases. For live databases contact SAP support to verify the fix.
Update 3:
A partner has gotten a fix and a SQL that detects the issue from SAP:
/* Detect affected rows */
SELECT A.ObjectCode, A.AutoKey, B.Autokey + 1
FROM ONNM AS A
JOIN (
SELECT 'BOY_BUTTONS_EX' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_BUTTONS_EX] UNION ALL
SELECT 'BOY_40_CONFIG' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_40_CONFIG] UNION ALL
SELECT 'BOY_41_FUNCTIONS' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_41_FUNCTIONS] UNION ALL
SELECT 'BOY_63_SCONFIG' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_63_SCONFIG] UNION ALL
SELECT 'BOY_IPT' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_IPT] UNION ALL
SELECT 'BOY_MANDATORY' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_MANDATORY] UNION ALL
SELECT 'BOY_B1UP_USERGROUP' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_B1UP_USERGROUP]
) AS B ON A.ObjectCode = B.Objectcode AND A.Autokey <> (B.Autokey + 1)
/* Correct affected rows */
UPDATE A
SET A.Autokey = (B.Autokey + 1)
FROM ONNM AS A
JOIN (
SELECT 'BOY_BUTTONS_EX' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_BUTTONS_EX] UNION ALL
SELECT 'BOY_40_CONFIG' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_40_CONFIG] UNION ALL
SELECT 'BOY_41_FUNCTIONS' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_41_FUNCTIONS] UNION ALL
SELECT 'BOY_63_SCONFIG' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_63_SCONFIG] UNION ALL
SELECT 'BOY_IPT' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_IPT] UNION ALL
SELECT 'BOY_MANDATORY' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_MANDATORY] UNION ALL
SELECT 'BOY_B1UP_USERGROUP' AS [ObjectCode], MAX(DOCENTRY) AS [AutoKey] FROM [@BOY_B1UP_USERGROUP]
) AS B ON A.ObjectCode = B.Objectcode AND A.Autokey <> (B.Autokey + 1)
Again please only use this and test databases. For live databases contact SAP support to verify the fix.
I get the following error when attempting update #3:
Hi Greg,
I have updated the SQL to be correct. It had one UNION ALL to many.
I'm getting same error:
This entry already exists in the following tables 'Universal Functions' (@BOY_41_FUNCTIONS) (ODBC -2035) [Message 131-183]
when trying add a Universal Function on a 9.3 HANA system.
Any word on the underlying cause? And a resolution for live systems?
You can try to do a restore numbering file run but if that does not help you need to contact SAP Support. It is SAP them-self that mess up that tables and not our code :-(
NB:
(do the default UDO as instructed above to prove to them it is their issue (else they just blame the add-on)).
Restoring the Numbering file solved this problem for me (in HANA 9.2).
Restoring the numbering (under the advice of SAP Support) also solved my customer's issue.
Please sign in to leave a comment.