cancel
Showing results for 
Search instead for 
Did you mean: 

Query Execution with Maximum Rows

Former Member
0 Kudos

Dear Community,

I have a question regarding Queries in ABSL. I want to use the execute function with the maximum rows and start rows in order to get a better performance while executing queries.

An example to query BusinessPartners:

var query = BusinessPartner.QueryByIdentification;

var selPara = query.CreateSelectionParams();

var contacts = query.Execute(selPara, dummy , maxRowCount, start);

The second Param (dummy) should be the SortingParameters, but there are no sorting Parameters available for the BusinessPartner BO.

Do you have any suggestions to use the maximum row count to execute queries on the BusinessPartner BO?

Kind Regards,

Lukas

Accepted Solutions (0)

Answers (1)

Answers (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Lukas,

As you can read in the documentation the SortingParameter is only supported for Custom BOs.

This is due to the different implementation frameworks of the SAP BOs which are not supporting the sorting in a generic manner.

As consequence the MaximumRows and StartRow is also not supported.

I am afraid that there is no solution to this request.

Sorry,

   Horst

Former Member
0 Kudos

I postet an idea in the ideasplace:

https://ideas.sap.com/D29521

Former Member
0 Kudos

Hello Lukas,

What do you think about the following workarounds:

1) Constructing sets of parameters which produce the desired number of hits.

For some objects with natural integer numeration like Leads it could be the set of parameters each of them "Between min_number max_number";

For the queries like you mentioned in your post it could be the set of patterns for the UUID, in this case you'll have to deal with binomial distribution. You'll get different number of the results for different patterns in the set, but you can achieve the approximately equal number of results.


2) Using queryIn webservices, like described here:

Are there any information on which number of query results is critical, what are the times of execution, which number of results you can simultaniously hold in the memory?


I'm interested in queries on Customer BO, if the number of Customers in the system is approximately 50.000


Best regards,

Leonid.


Former Member
0 Kudos

Hello Lukas,

one another workaround would be to misuse the UI to do the paginating job, becaus UI supports paging. You have to use an UI query then, and bind your nodes to the advanced list pane, set the visibility of this pane to "false", and define the desired number of visible rows, which will be only loaded then. I'm not sure whether only visible rows are loaded or visible rows plus some rows before and after the visible.

Of course this workaround has a very restricted applicability, but it has some nice features like sorting.

Best regards,

Leonid