Setup: A UI5 Application using a OData Model
Target: Limit the data that is fetched for an aggregation binding by specifing the $top parameter
Why?: This solution works with any aggregation binding. Not only when using a control based on the sap.m.ListBase, which provides properties for specifing the number of records that should be returned.
Solution: In the definition of the aggregation binding specify the parameter "length":
Example:
In this example a list of the first three business partners should be rendered. Therefor only the first 3 need to be loaded.
This will then result in the following OData Request:
../BusinessPartnerSet?$skip=0&$top=3
I could not found this feature in the documentation so thats why I'm sharing this with you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 |