Symptom
- A custom application calling the SuccessFactors OData API started failing. The API call had been working fine previously.
- The error message encountered was below
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>ServerErrorException</code>
<message lang="en-US">For input string: "2000 "</message>
</error>
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
- Integrations
- OData API
- Integrations
Reproducing the Issue
- An API call is made to SuccessFactors OData API using the following API Call
- https://Endpoint/odata/v2/User?$filter=status eq 't' and userId like 'A' &$top=2000 &$select=lastModifiedWithTZ,userId, email, cellPhone, firstName, lastName
Cause
The issue was caused due to the unspecified space in page size in the API call. By default, the page size is set to 1000. When the Record_Count reached 1000, the page was full and required a next page. When constructing the address for the next page, an error was encountered due to spaces in the $top=2000 parameter.
This query will work if data size is less that 2000 record with Space in Top parameter.
Resolution
- Ensure to specify the page size Space in the API call.
- Remove any spaces in the $top=2000 parameter.
- Test the API call to confirm the resolution of the issue.
See Also
Keywords
SuccessFactors, OData API, API call, error, unspecified page size, Record_Count, $top=2000 parameter, spaces, Unexpected, input, string, ServerErrorException , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem