Symptom
You query an MDF object (for example BenefitEnrollment) and you don't see any field that would show what is the status (active or inactive) of that record.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HXM Suite
- OData API
Cause
The effectiveStatus field is not visible in OData API.
Resolution
Follow these steps to make the effectiveStatus visible in OData:
- Go to "Configure Object Definitions"
- Search for the API entity you are querying (BenefitEnrollment for example) and open it
- Click on "Take Action > Make Correction" button at the top-right
- Search for "effectiveStatus" field and click on Details
- Change the Visibility value to Read-only or Editable and save:
- Perform an OData API Metadata Refresh
After that, the status of the records will be returned through effectiveStatus field, for example:
{
"__metadata": {
"uri": "https://<api_url>/odata/v2/BenefitEnrollment(effectiveStartDate=datetime'2020-01-01T00:00:00',id='415814')",
"type": "SFOData.BenefitEnrollment"
},
"effectiveStartDate": "/Date(1577836800000)/",
"id": "415814",
"workerId": "100115",
"effectiveStatus": "I"
}
The value "I" represents inactive, and "A" represents active.
See Also
Keywords
status, entity, object, a, i, field, filter, missing, not, able, return, retrieve, fetch, mdf, visibility, available , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , Problem