当READ ODATA时,可以带一些参数进行查询数据,常见的查询选项如下:
Operation | Query Option |
Filtering and projecting | $filter and $select |
Sorting | $orderby |
Client-side paging | $top, $skip and $inlinecount |
Counting | $count |
lnlining | $expand |
Formatting | $format |
OData specifies a simple yet powerful query language that allows a client
to request arbitrary filtering, sorting, and paging. Via query string
parameters, a client is able to express the amount and order of the data
that an OData service returns.
Query options are essential to reducing or influencing the result set provided
by the SAP Gateway server. In many cases, you don’t wanil: a huge
collection to be returned as is (e.g., the list of all products in the backend
system) if the result set isn’t already filtered based on the user assignment;
for example in an SAP Customer Relationship Management
(CRM) scenario, the service implementation probably only returns the
business partners that are assigned to your user, not all existing business
partners in the entire SAP CRM system.