Symptom
Error "Object xxx can't be associated, it requires at least one root key field." occurs, when publishing a custom business object.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
1. Creating a custom business object in app Custom Business Objects.
2. Activating the checkbox "Can Be Associated".
3. Publishing the custom business object.
4. Error message "Object xxx can't be associated, it requires at least one root key field." shows up.
Cause
To enable one custom business object to be associated by another custom business object for reference and for use as value help, it's necessary to define one or several keys in the root node of the custom business object. If a custom business object is marked as Can Be Associated, the key fields can't be of type Association to Business Object.
Resolution
Activate the checkbox Key in the field which is required to base the association on.
See Also
Keywords
Can Be Associated, Custom Business Object, Object xxx can't be associated, key , KBA , BC-SRV-APS-EXT-BO , Custom Tables and Nodes , Problem