SAP Knowledge Base Article - Public

3581303 - Error Encountered in OData API Call Due to Unspecified Space in Page Size.

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

Reproducing the Issue

  1. An API call is made to SuccessFactors OData API using the following API Call
  2. 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

  1. Ensure to specify the page size Space in the API call.
  2. Remove any spaces in the $top=2000 parameter.
  3. 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

Product

SAP SuccessFactors HCM Core all versions ; SAP SuccessFactors HCM Suite all versions