cancel
Showing results for 
Search instead for 
Did you mean: 

Limit Number for Rows in BW Query Result

Former Member
0 Kudos
1,181

Hello Experts,

I am creating a query to be consumed by a web service. Therefore, I want to restrict the number of rows the query can display. Does anyone know a way to limit the result set to display only say FIRST 100 rows of data?

I have looked at 'safety belt' solution, i.e. limiting number of cells to for example, 5000 cells. However, when the limit is exceeded the query just shows an error message not the first 5000 cells.

thanks,

Kartik

Accepted Solutions (1)

Accepted Solutions (1)

former_member182470
Active Contributor
0 Kudos

Hi,

You can do some things like..........

Do not display the data in a detailed level.

Use Always Suppress option in the result set.

Also it depends on your Query definition. If your rows contains Branch wise or Region Wise, then your report will be fit in your first level of output. You need not to drilldown further.

Why do you want to consider only first 1000 rows if you are planning to use it by Web service?

I don't know whether it is feasible or not. I have one more alternative for you. You can try to achieve by APD by the Query. Insert a ABAP routine which should consider first 1000 result rows for your Web service. Just throw a light on this idea..............

Regards,

Suman

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You Can make the use of condition tab in bex designer to li mit the no. of rows in output.

1.For this first go to condition tab.

2.Select a perticular keyfigure and apply condition on that to limit it.

For example you can use

TOP N here if N = 5, then only top 5 record containing the top five values of this key figure will appear and hence you can limit the no. of rows.

Former Member
0 Kudos

Thanks Sven and Ankit. However the result is not a ranked result set. The data is displayed via Hierarchy. TOP 100 records will not yield accurate results. Any other ideas? Even if we have to show an error message and no data!

thanks

Kartik.

sven_mader2
Active Contributor
0 Kudos

Hi,

reduce your query result.

- less chars or key figures

- insert selection: variables.

- create a second detail query.

ask your basis team. you need more space on the portal.

=> then can the portal calculate more cells.

=> you need a 64 bit portal.

=> there is a sap note - you can read there, how many memory a bw report needs per cell.

Sven

sven_mader2
Active Contributor
0 Kudos

Hi,

you can create a condition in your query.

-> Top 100.

for excample: you get 100 customer with the highest sales.

Sven