Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logical Database Query SQ02

Former Member
0 Likes
2,163

Hi,

I've created a SAP Query report which shows all the accounting documents relating to purchase orders. It's a direct read of BSEG with BKPF added as an additional table. In the selection screen i filter by PO number on BSEG as well as document number ranges on both tables. It does provide the information required but is a bit slow.

Many people have mentioned that logical database queries run much quicker. I've created another query based on logical database SDF and selected the same fields as before from BSEG and BKPF. When I run the query based on the same criteria it doesn't run in time so eventually i get a runtime error. I've tried just selecting a small range of document numbers to see what it returns but the same happens. I'm also forced to enter a selection for 'Open items at key date' so just enter today's date.

Does anyone know if I'm doing something wrong here?

Many thanks

Dave

1 ACCEPTED SOLUTION
Read only

0 Likes
1,386

your query search all document in GL.

Use BRM Logical data base, this LDB is just for documents related to PO.

use in selection screen field from EKKO, EKKO-EBELN not from bseg, this field is indexed.

it will be much much faster.

2 REPLIES 2
Read only

0 Likes
1,387

your query search all document in GL.

Use BRM Logical data base, this LDB is just for documents related to PO.

use in selection screen field from EKKO, EKKO-EBELN not from bseg, this field is indexed.

it will be much much faster.

Read only

0 Likes
1,386

Thanks Krali. I've created a query with BRM using EKKO-EBELN to select one PO and a few fields listed from from BKPF and BSEG. I'm still not getting anything back when i run the report, eventually get run time error. Is there another step that needs to be done when creating a LDB query?