Skip to content
✦ Made with Docsie · generated from video

How to Use the Query Generator in SAP Business One

If you want to know how to use the query generator in SAP Business One, the Query Wizard is the tool to use. It gives you easy access to the database and a simple way to build user-defined reports. It guides you step by step through selecting tables and fields, adding a parameter, previewing results, and saving the query. You don't need SQL knowledge.

SAP Business One 15 steps 9 screenshots 1091 words Source video 4:36 Generated cost $1.75

Video: Creating a query in SAP Business One by SAP Business One (2015). All credit for the demonstration goes to the creator; watch the original on YouTube. The written guide below was generated from this video by Docsie. Creator? Request a change or removal.

If you want to know how to use the query generator in SAP Business One, the Query Wizard is the tool to use. It gives you easy access to the database and a simple way to build user-defined reports. It guides you step by step through selecting tables and fields, adding a parameter, previewing results, and saving the query. You don't need SQL knowledge.

This guide builds a Business Partner query, adds a parameter for BP Type, and saves the query so you can run it again later.

Prerequisites

  • You are logged in to SAP Business One as a user, for example Manager.
  • You can reach the Query Wizard from the menu or toolbar.

Steps

1

Open the SAP Business One main screen

Confirm you are on the main screen. A navigation panel on the left lists modules such as Administration, Financials, Sales Opportunities, Sales - A/R, Purchasing - A/P, Business Partners, Banking, Inventory, Production, MRP, Service, Human Resources, and Reports.

A welcome message at the top reads "Welcome, Manager. You are in the home cockpit of OEC Computers." A search bar lets you look up operations, master data, and documents.

SAP Business One main screen with the navigation panel and welcome message
SAP Business One main screen with the navigation panel and welcome message
2

Launch the Query Wizard

Locate the Query Wizard in the menu or toolbar and open it. The introduction screen explains that the wizard enables easy access to the database and an easy way to build user-defined reports. It also says the wizard guides you step by step through the parameters a query requires.

The wizard shows that you are on Step 1 of 5. Click Next > to continue.

Query Wizard introduction screen, Step 1 of 5
Query Wizard introduction screen, Step 1 of 5
3

Search for tables to include in the report

In Step 2 of 5, the wizard prompts you to select tables for your report. Open the "Choose from List" dialog. In the "Find" field, start typing the description of the table you need, for example "business partners". The list filters as you type and shows the matching tables.

4

Choose the Business Partner table

Find the table with the technical name OCRD and the description Business Partner, and select it. Below the list, the wizard displays related tables such as Business Partner Addresses, Bank Accounts, and Control Accounts.

Business Partner table (OCRD) selected in the Choose from List dialog
Business Partner table (OCRD) selected in the Choose from List dialog
6

Select fields for the report columns

In Step 3 of 5, you select the fields to display as column titles. Open the "Choose from List" dialog for the Business Partner table and scroll through the available fields. Hold down the Control key to select several fields at once. This example uses:

  • Balance (Account Balance)
  • CardCode (BP Code)
  • CardName (BP Name)
  • CardType (BP Type)
  • CntctPrsn (Contact Person)
Selecting multiple fields from the Business Partner table
Selecting multiple fields from the Business Partner table
7

Include user-defined fields

To add user-defined fields, type U_ in the "Find" field. The wizard performs a smart lookup and lists all user-defined fields, such as:

  • U_APA (Artwork Proof Agreement)
  • U_APAAGMT (APA Agreement)
  • U_AvailCredit (Available Credit)
  • U_CreditApp (Credit Application Received)
  • U_Cust_Type (Customer Type)
  • U_FavTeam (Favorite Team)
  • U_Fav_Food (Favorite Food)
  • U_Fav_Rest (Favorite Restaurant)

Select the user-defined fields you want in your report.

User-defined fields filtered and displayed for selection
User-defined fields filtered and displayed for selection
9

Preview the query results

After you click Next > and Finish, the "Query Preview" window shows the raw data results. The columns include Accrual, Account Balance, BP Code, BP Name, BP Type, Contact Person, Year End, and Group Name.

The SQL statement the wizard generated appears at the top of the window. Scroll to view all returned records. If needed, click Reverse Table to change the order of the displayed data.

10

Add a parameter to filter the query

To filter results dynamically, for example by Business Partner type, click Back to return to the "Conditions and Relations" step. Then set up the condition:

  • On the "Display Conditions" tab, select the OCRD (Business Partner) table.
  • In the "Field" column, choose CardType (BP Type).
  • Set "Condition" to Equal.
  • In the "Field/Value" column, enter [%0]. This defines a parameter that prompts for input each time the query runs.
11

Review the generated SQL script

Go to the final step of the wizard. The "Query Wizard completed" screen displays the full SQL statement, including the BP Type parameter. Check that all fields and conditions are correct, then click Finish.

Query Wizard completed screen showing the generated SQL statement with the parameter
Query Wizard completed screen showing the generated SQL statement with the parameter
12

Run the query with a parameter

When you finish the wizard, the "Query - Selection Criteria" dialog appears. In the BP Type field, select a value:

  • "C" for Customers
  • "V" for Vendors
  • "S" for Suppliers
  • "L" for Leads

Click OK to run the query with that parameter.

13

View the filtered results and save the query

The "Query Preview" window now shows only the records that match the selected BP Type, for example Customers. Review the filtered results. To keep the query for future use, click Save.

Query Preview window showing filtered results for Customers with the Save button highlighted
Query Preview window showing filtered results for Customers with the Save button highlighted
14

Name and store the query

When prompted, choose the General folder to store the query. Enter a name, such as BP query (Business Partner query). Confirm to save the query.

15

Run the saved query later

To run the saved query again, follow these steps:

  1. Open the Query Manager from the toolbar.
  2. Go to the General folder.
  3. Select the BP query you saved.
  4. When prompted, enter a different BP Type, for example "V" for Vendors, and click OK.

The query runs and displays the data filtered by your parameter selection.

Query Preview window showing results from the saved query run with a different parameter
Query Preview window showing results from the saved query run with a different parameter

Summary

You now know how to use the query generator in SAP Business One. The Query Wizard lets you select tables, standard fields, and user-defined fields, and add related tables. You can preview results, add a parameter to filter dynamically, and save the query in the General folder. You can then run it again from the Query Manager with a different parameter, such as another BP Type, without writing SQL.

Generation details: cost, quality tiers

Docsie billed 2,500 credits ($1.75) to analyze this 5-minute video at standard quality. The rewrite, template fill and Word/PDF exports were included. The same video at each quality tier:

QualityFrames sampledCreditsApprox. cost
Draftevery 16-30 s1,250$0.88
Standard (this guide)every 8-15 s2,500$1.75
Detailedevery 4-7 s5,000$3.50
Ultraevery 1-3 s10,000$7.00

Credits priced at $0.70 per 1,000; plans include a monthly allowance. Enterprise customers on on-premise or bring-your-own-model deployments run this on their own inference and pay no per-video credits.

Generated by Docsie Video-to-Docs on 2026-11-15 from a 4-minute video. Screenshots are frames from the source video and belong to their creator, SAP Business One, whose original is embedded above. If you own this video and want the guide removed or credited differently, contact us and we will act within one business day.

Turn your own training videos into guidesJoin teams that save hours, reduce documentation work and scale training with Docsie.
See Docsie in action. No commitment.

Ready to Transform Your Documentation?

Start creating professional documentation that your users will love