Skip to Content

Count Element in SAP Cloud Platform SDK for Service Development


I have been following these tutorials for Cloud Service Development(link), but I been struggling with this one issue, and really hope someone can help me out.

Issue: Service response does not contain a Count element?



My Code for Service Class:

//Getting Data
ODataQueryResult result = ODataQueryBuilder
  .withEntity("/sap/opu/odata/IWBEP/GWSAMPLE_BASIC", "ProductSet")
  .select("ProductID", "Name", "Description", "Category", "Price")

count = result.getInlineCount();

//Returning Data
final List<ProductEntity> v2ProductList = result.asList(ProductEntity.class);
queryResponse = QueryResponse.setSuccess().setData(v2ProductList).response();
return queryResponse;

Any help or hints would me much appreciated.
Thank you,

nocount.jpg (34.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers