SAP Knowledge Base Article - Public

2439435 - How to use Paging in the Query Using SOAP UI

Symptom

When you query the data by default request operation returns all the requested items. To get a limited set of items, you can use the limit parameters in request query string.

Resolution

To get the desired result maintain the paging indicator <PagingActiveIndicator>true</PagingActiveIndicator> inside main body of the query by elements. 
An example is mentioned as below while querying customers:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a02="http://sap.com/xi/AP/CustomerExtension/BYD/A020J">
<soapenv:Header/>
<soapenv:Body>
<glob:CustomerByElementsQuery_sync>
<CustomerSelectionByElements>
        <SelectionByLifeCycleStatusCode>
                <InclusionExclusionCode>E</InclusionExclusionCode>
                 <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
                 <LowerBoundaryLifeCycleStatusCode>4 </LowerBoundaryLifeCycleStatusCode>
                 <UpperBoundaryLifeCycleStatusCode> </UpperBoundaryLifeCycleStatusCode>
        </SelectionByLifeCycleStatusCode>
        <PagingActiveIndicator>true</PagingActiveIndicator>
        <a02:Z_FastbillID_EA8AE8AUBVHCSXVYS0FJ1R3ON>
       <SelectionByText>
                 <InclusionExclusionCode>E</InclusionExclusionCode>
                 <IntervalBoundaryTypeCode>1</IntervalBoundaryTypeCode>
                 <LowerBoundaryName></LowerBoundaryName>
                 <UpperBoundaryName></UpperBoundaryName>
        </SelectionByText>
        </a02:Z_FastbillID_EA8AE8AUBVHCSXVYS0FJ1R3ON>
 </CustomerSelectionByElements>
 <ProcessingConditions>
        <QueryHitsMaximumNumberValue>X</QueryHitsMaximumNumberValue>
        <QueryHitsUnlimitedIndicator>false</QueryHitsUnlimitedIndicator>
        <LastReturnedObjectID></LastReturnedObjectID>
</ProcessingConditions>
</glob:CustomerByElementsQuery_sync>
</soapenv:Body>
</soapenv:Envelope>


Note: You can give the number of records you want as a result instead of 'X' inside the tag <QueryHitsMaximumNumberValue>X</QueryHitsMaximumNumberValue>. To fetch the records on next page use the tag <LastReturnedObjectID></LastReturnedObjectID>.

 

Keywords

KBA , LOD-CRM-EMP , Employee , How To

Product

SAP Hybris Cloud for Customer add-ins 1611 ; SAP Hybris Cloud for Customer add-ins 1702 ; SAP Hybris Cloud for Customer add-ins 1705 ; SAP Hybris Cloud for Customer add-ins 1708 ; SAP Hybris Cloud for Customer add-ins 1711