Symptom
You want to execute a query in your custom code on a standard SAP Business Object, you wish to execute the query by SelectionParameters and SortingParameters. This would require MaximumRows, StartRows. This option does not come up when initiating the query on the extension of a standard SAP Business Object.
You are presented with the following options, as can be seen in the below screenshot:
But you are expecting to see the options, as below:
Environment
-
SAP Cloud Application Studio
-
SAP Business By Design
-
SAP Cloud for Customer
Reproducing the Issue
As a prerequisite you have done the following:
-
You have created a solution in the Cloud Application Studio.
-
You have extended a standard SAP Business Object and created custom scripts to define the execution.
-
You have attempted to initiate a query on your extension of the Business Object (.xbo).
Cause
The sorting parameters feature is only available for use in queries defined on custom Business Objects.
Resolution
As per the Help Documentation, you can also use sort functions offered by collection handling as a workaround for Standard Business Objects and/or Extension of Standard Business Objects.
See Also
SAP Help Documentation - Query Execution for Sorting Parameters
Keywords
CreateSortingParams, Query, xbo, SelectionParameters, SortingParameters, scripts, SortingParams not available for Standard Business Objects, custom scripts , KBA , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem