Skip to Content

Issue while using $ count and $select at a time

Hi All,

I have to use $count and $ select at time and the URI look's like below.


But I am getting an error

System query options '$expand,$format,$skiptoken,$inlinecount,$select' are not allowed in the requested URI



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Apr 12, 2019 at 08:45 AM

    Hi viswateja talupula,

    I am not sure about the error, maybe SAP is not supporting that query based on the error. It makes sense as If you want to see the count using the $count option, why we need to pass the select? as we are not fetching the data.

    So even in the SAP UI5, if you using the request count SAP will send 2 requests, one with count and one with select like below:

    GET Orders/$count
    GET Orders?$skip=0&$top=25&$select=OrderID

    But what if you want to select the data and count in the same request, then you need to use inline count option. like below:$select=CategoryID&$inlinecount=allpages



    Add comment
    10|10000 characters needed characters exceeded