Skip to Content
author's profile photo Former Member
Former Member

Logical Database Query SQ02


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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 05, 2013 at 10:50 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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?

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.