SAP Knowledge Base Article - Public

2437595 - Query on PerPerson entity returns the error "personIdExternal is not viewable" - OData API

Symptom

You are trying to fetch data via OData API on PerPerson entity and it returns the error "PerPerson/personIdExternal is not viewable".

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.



         

Environment

  • SuccessFactors
  • OData API

Reproducing the Issue

  1. Perform an OData query on PerPerson entity selecting the personIdExternal field;
    Example: /odata/v2/PerPerson?$format=json&$select=lastModifiedDateTime,personIdExternal&$top=50
  2. The response returns with the error message "[COE0003]Bad property expression: PerPerson/personIdExternal; PerPerson/personIdExternal is not viewable".

Cause

This occurs due to the configuration overridden from the succession Data Model.

Data Model shows:

<hris-field max-length="32" id="person-id-external" visibility="none">

personidexternal_3.jpg

Odata API Data Dictionary will show the field with the value false under sap:visible column, which means it can't be selected in a query.

personidexternal_2.jpg

Resolution

The field person-id-external is a business key and can't be configured as not visible.

The person-id-external property must have its visibility value set as "both" in the instance's Data Model:

<hris-field max-length="32" id="person-id-external" visibility="both"> 

personidexternal_1.jpg

An OData Metadata Refresh may be needed after this in order to fully update the instace's metadata cache, so the changes can take effect.

Keywords

personIdExternal is not viewable, filterable, searchable, query, odata, api, successfactors, success, factors, person-Id-External, person, id, external, perperson, visibility, both, none, false, true, sap:visible, data model, datamodel, metadata, meta, data, extract, field, not pulled, COE0003 , KBA , LOD-SF-INT-API , API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core all versions