SAP Knowledge Base Article - Public

2977366 - How to use the queryMore request to query all the results (pages) of a Compound Employee API request when the results exceed the max number of rows - SAP SuccessFactors HXM Suite


  • You're performing a Compound Employee API request and getting a limited amount of records;
  • There are missing employees in the response payload.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.


  • SAP SuccessFactors HXM Suite
    • CompoundEmployee API


In this KBA, we'll go through CompoundEmployee API's 'queryMore' request, as mentioned in Employee Central Compound Employee API - Query and QueryMore, and defined in SFAPI's WSDL file (you may refer to 2320264 - How to make an SFAPI call to test the functionality).

If the amount of employees selected by a query exceed the maximum configured page size (which is by default 200, and configurable from 1 to 800 using the maxRows parameter), you must use the queryMore request to fetch subsequent pages of records.

For instance, let's suppose the following CompoundEmployee request is requested:

<Envelope xmlns="">
        <query xmlns="">
                SELECT person, personal_information, employment_information, job_information
          FROM CompoundEmployee

Since I haven't defined a WHERE clause, this query will select all available employees in the SF instance. Naturally, the results will exceed the default response limit of 200 records, and that is verifiable by referring to the <hasMore> tag at the end of the response payload:

If the tag contains 'true', it means there are more records to be queried. In order to do so, you must copy the querySessionId and send it in the following request:

<Envelope xmlns="">
        <queryMore xmlns="">

This request will return the second page of results, and if it contains hasMore equals true again, another queryMore request should be sent. This should be repeated until a page is received with hasMore equals false, indicating the last set of results.


missing, results, records, information, data, not, returned, returning, response, employees, users, more, subsequent, request, call, query, queryMore, remaining, more, page, set, next, fetch, retrieve, compoundemployee, ce , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , How To


SAP SuccessFactors HCM suite all versions