Symptom
- An error occurs when attempting to update pay component record from the 'EmpCompensation' entity using a PATCH method.
- The error message received is: "HTTP 405 Method Not Allowed".
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 HCM Suite
- OData API Framework
Reproducing the Issue
- Perform a PATCH API call to the following endpoint: https://<api_url>/odata/v2/EmpCompensation
- Observe the error message "HTTP 405 Method Not Allowed" in the response
Cause
The PATCH method is not a supported operation for the 'EmpCompensation' entity in the OData API framework.
Resolution
Use only the supported operations for the 'EmpCompensation' entity, which are Query (GET) and Upsert (POST).
Refer to the OData API Data Dictionary in your SF instance or the official guide - EmpCompensation | SAP SuccessFactors API Reference Guide (OData V2) to confirm supported operations for the 'EmpCompensation' entity.
If the requirement is to update compensation information and pay component, please try with upsert (POST) to EmpCompensation & inline upsert to EmpPayCompRecurring via empPayCompRecurringNav.
See Also
Keywords
HTTP 405 Method Not Allowed, PATCH operation, EmpCompensation, OData API, unsupported method , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , How To
SAP Knowledge Base Article - Public