cancel
Showing results for 
Search instead for 
Did you mean: 

SQ01 restricting the number of database accesses

Former Member
0 Kudos

Hi,

I created a report using SAP Query (SQ01). When I run the query a dialog box appears asking the maximum number of database accesses.

The value entered here directly affects the result of the report. The user has to change the value manually in order to see the complete set of results, set it 999999 for example.

I want to get rid of that dialog box. Is it possible?

If not can I change the default value '100' to anything I want?

Thanks...

Accepted Solutions (0)

Answers (1)

Answers (1)

LeonardoAraujo
Active Contributor
0 Kudos

How did you structure your query?

More than 100 database accesses could mean you are just not running it the most efficient way possible.

A simple table join for example should perform one database access. Are you doing some additional field coding? are you doing selection on line processing?

Check your query, you might be able to solve it by restricting the database accesses instead.

Cheers,

Leonardo De Araujo

Former Member
0 Kudos

That is true, it is a bit loaded report. It includes additional fields, selections and another select statement for each record. I tried to keep it as simple as possible but that is the only way that I could think of.

The joins are:

VBAK - VBAP

VBAP - VBUP

VBAP - MARD

VBAP - MARA

The report basicly brings the stock amounts of open sales order items. In addition the total consignment level for that item is also requested, so I wrote a select statement in record processing which finds the total consignment level from the MKOL table for that item. I could not simply add MKOL to my join list because it than divides each item to the number of vendors that exists in the MKOL table. The user is not interested in the amount for each vendor, only the total amount.

The performance is not that bad, but as I said before the result of the report is different for different limits of database accesses.

Is there a way to omit the limit?

LeonardoAraujo
Active Contributor
0 Kudos

Not that I am aware of.

When reports get this complicated, it is better to handle them in ABAP for a performance point of view.

Still in ABAP Query, what I think you could do is to remove the logic you put on the line (additional selection on the line) to include a more performance oriented FOR ALL ENTRIES (6) in the END_OF_SELECTION code part. This way your logic would run once for all the report.

I think it would be more efficient.

Try that and let me know.

Leonardo De Araujo

Message was edited by: Leonardo De Araujo

Former Member
0 Kudos

Thanks for your advice Leonardo.

Any other suggestions?

LeonardoAraujo
Active Contributor
0 Kudos

No. I really think that if you change your selection to put the code into the AFTER SELECTION event, you should solve the problem.

About particularly removing that number of entries validation, I don't know. I would dubbug it to see if it access a system parameter that you can change...

Leonardo De Araujo

Former Member
0 Kudos

I can not put it in the AFTER SELECTION part since I have to run a query for every record in the first query. May be I can but anyway the number of database accesses does not change.

By the way after I assigned the report to a transaction, the dialog box does not appear unless I do not enter something in the selection screen. Interesting... That was not the case when I tried to run it from SQ01. It only asks the maximum number when the selection screen is empty.

Anyway it seems the problem is solved, but I don't know how I did it. Actually the performance is fine enough, almost as good as VA05

Thanks for your help Leonardo.