SAP Knowledge Base Article - Public

2710959 - CostcenterManager in FOCostCenter object definition and metadata not matching

Symptom

  • You have a field where the "Nav" field is required=true, and the regular String field is required=false, and you wish to understand why.
  • You have a MDF field similar as "cost center holder" under cost center object which is marked as mandatory. However, when we search for the same field under "ODATA API Dictionary", this is not being shown as mandatory.
  • costcenterManager in FOCostCenter is marked as sap:required=false where as in the object definition it is marked required=true

Environment

  • SuccessFactors HCM Suite
  • OData API

Cause

Expected Behavior

Resolution

In MDF entities there will be two properties exposed for a User/GO field. One string property like 'costCenterManager' and one navigation property like 'costCenterManagerNav'.

For normal MDF entities(non FOxxxxx ones) if the field is defined as required in field definition, the corresponding values in odata metadata will be:

  • the string property('costcenterManager') will be sap:required=false
  • the navigation property('costcenterManagerNav') will be sap:required=true

Why is costcenterManager not required in the metadata? The reason behind this is that initially we only expose the 'xxxNav' property in the entity so this 'xxxNav' entity follows the field definition and will be sap:required:true if the definition says so. The 'xxx' string property was added in some later release. For such new property we were not able to make them required:true due to backward compatibility concern, otherwise it would break customer's integration. Thus we had to expose them as always required:false.

In EC2MDF entities like FOxxxx it's a different story. It doesn't follow the generic rule described above. The behavior for EC2MDF entities is:

  • the string property('costcenterManager') will be sap:required=false - same reason as above
  • the navigation property('costcenterManagerNav') will be sap:required=false - this value is set by EC2MDF code to keep backward compatibility for EC2MDF entities because before EC2MDF migration, the 'xxxNav' property was not editable, so EC team had to make it not required in the metadata to avoid backward incompatibility.

However even with sap:required=false in the metadata, the system will anyway validate if a value is provided for this field. If not system will return error for an edit request.

Keywords

ECT-107927, required, not required, navigation, sap:required=false, required=true, metadata and object definition not matching, CostcenterManager object definition and metadata different, association, cust, MDF object. , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Core all versions