自定义表主键已更改
我在 SE11 中创建了一个自定义表作为数据字典对象。我有以下字段:
- ID (KEY Field)
- NAME (KEY Field)
- DEP (KEY Field)
- DESIGNATION
我已激活该表并生成了表维护生成器,但一段时间后,我认为字段 DEP 不需要作为关键字段所以我取消选中它作为关键字段,然后再次尝试激活我的表,但出现此错误:
I have created a custom table as a data dictionary object in SE11. I have the following fields :
- ID (KEY Field )
- NAME (KEY Field )
- DEP (KEY Field )
- DESIGNATION
I have activated the table and also generated a table maintenance generator but after some time, I think Field DEP is not required as a key field so I unchecked it as a key field and then again I try to activate my table I am getting this error :
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
表中已有条目,如果将关键字段设置为非关键字段,则表中的数据可能不再一致。
在这种情况下,很可能有多个条目具有相同的 ID 和 NAME,但 DEP 不同。将 DEP 设置为非关键字段后,这将不再可能。必须清理表条目,因此只有一个条目具有相同的 ID 和 NAME。之后就可以将 DEP 设置为非关键字段。 (之后不要忘记重新生成维护视图。)
There are entries already in the table and if you set a key field as not a key field, the data in the table might not be consistent anymore.
In this case most likely there are several entries with the same ID and NAME, but different DEP. After setting DEP as not a key field, this would not be possible anymore. The table entries have to be cleaned up, so there is only one entry for the same ID and NAME. After that it will be possible to set DEP as not key field. (After that don't forget to regenrate the maintenence view as well.)
还有另一个表,其外键引用 Z_EMP_2410。
在这种情况下,您将无法更改主键。
首先从 Z 表中删除这个或多个外键。
然后再次尝试重新激活 Z_emp_2410。一旦 Z_emp_2410 被激活,
您可以在表 z_ 中重新添加外键吗?指向 Z_EMP_2410(如果仍然合适)。
There another table with a foreign key reference to Z_EMP_2410.
When this is the case, you are prevented from changing a primary key.
Remove this foreign key or keys from Z Tables first.
Then try re-Activate the Z_emp_2410 again. Once Z_emp_2410 is activated,
you can re-add the foreign key/s in Table z_? pointing to Z_EMP_2410 if it is still appropriate.