2173555 - Query operation to Odata API Entity fails with an error message:ProcessException: [EXCEPTION] ODATA Execution Error Code: 500

SAP Knowledge Base Article - Public

2173555 - Query operation to Odata API Entity fails with an error message:ProcessException: [EXCEPTION] ODATA Execution Error Code: 500

Symptom

  • Query operation to Odata API Entity fails with an error message:ProcessException: [EXCEPTION] ODATA Execution Error Code: 500

Example :

 [EXCEPTION] ODATA Execution Error Code: 500 OK https://api4.successfactors.com/odata/v2/EmpJob?$format=json&$select=customString7,employeeType,startDate,customString17,regularTemp,customString29,location,eventReason,department,customString47,endDate,seqNumber,employmentType,payGrade,userId,emplStatus,employmentNav,standardHours&$expand=employmentNav/compInfoNav&fromDate=1900-01-01&toDate>=9999-12-31&$top=200&$skip=105800; Caused by: [EXCEPTION] ODATA Execution Error Code: 500 OKhttps://api4.successfactors.com/odata/v2/EmpJob?$format=json&$select=customString7,employeeType,startDate,customString17,regularTemp,customString29,location,eventReason,department,customString47,endDate,seqNumber,employmentType,payGrade,userId,emplStatus,employmentNav,standardHours&$expand=employmentNav/compInfoNav&fromDate=1900-01-01&toDate>=9999-12-31&$top=200&$skip=105800

 

Note: Error code: 500 is a generic exception and there could be several other reasons as well.

Cause

  • The Odata API query request is not formed properly.
  • It has "&amp" instead of "&" and "&gt" instead of ">".

Resolution

  • Below is the Odata API query was sent:

https://api4.successfactors.com/odata/v2/EmpJob?$format=json&$select=customString7,employeeType,startDate,customString17,regularTemp,customString29,location,eventReason,department,customString47,endDate,seqNumber,employmentType,payGrade,userId,emplStatus,employmentNav,standardHours&$expand=employmentNav/compInfoNav&fromDate=1900-01-01&toDate>=9999-12-31&$top=200&$skip=105800

  • As these characters are not supported by Odata, replace the "&amp" to "&" and  "&gt" to ">".
  • The new Odata API query that can be used is as shown below:

https://api4.successfactors.com/odata/v2/EmpJob?$format=json&$select=customString7,employeeType,startDate,customString17,regularTemp,customString29,location,eventReason,department,customString47,endDate,seqNumber,employmentType,payGrade,userId,emplStatus,employmentNav,standardHours&$expand=employmentNav/compInfoNav&fromDate=1900-01-01&toDate>=9999-12-31&$top=200&$skip=105800

Keywords

KBA , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , Problem

Product

SAP SuccessFactors HCM Suite all versions