Anda di halaman 1dari 10

Queries and Reporting

Content

SAP AG 2003

Query Wizard

Query Generator

Queries: Topic Objectives

At the conclusion of this topic, you will be able to:

SAP AG 2003

Create queries using the Query Wizard or the


Query Generator

Queries: Business Scenario

SAP AG 2003

The managing director wants to use the various


options available with SAP Business One to create a
comprehensive information system for himself and
his company. The information system should also be
able to create ad-hoc reports.

Tools for Creating Queries

Query
Generator

SAP AG 2003

Query Wizard

Elements of a Query
Select tables and their relations
Select fields
Table

fields (adjust headings, if necessary)


Calculation fields (select heading and formula) (optional)

Define sorting (optional)


Direction

(ascending order, descending order)


Sequence (first sort field, second sort field, and so on)

Define grouping (optional)


Fields

according to which rows are grouped


Grouping type (total records, total distinct records,
amount, average, minimum, maximum)

Define conditions (optional)


Fixed

conditions

Variables

SAP AG 2003

Information about Fields and Tables

View
System Information
Business Partner Master Data

Code

Table name

Field name

[... ... ... OCRD,

CardCode]

SAP AG 2003

Status
StatusBar
Bar

Query Wizard
Query Wizard

Introduction

Query Wizard

Select
tables

Query Wizard

Query
Execution

SAP AG 2003

Query Wizard
Completed

Query Wizard

Select Fields &


Sort Orders

Query Wizard

Conditions and
Relations

Query Generator
Select fields

Type of grouping
(enter manually)

Select tables and


their relations

Table fields by Drag&Drop


Manual computation fields

Query Generator
Name
DocNum
Doctype
Canceled
Handwritten
Printed
DocStatus
Invnt.Status
Transfered
ObjType
DocDate
DocDueDate
CardCode
CardName
Address
NumAtCard
VatPercent
VatSum
VatSumFC

Execute

Define
sorting

SAP AG 2003

Description
Document Number
Document Type
Canceled
Manual Numbering
Printed
Document Status
WH Status
Transfer Year
Object Type
Posting Date
Value Date
Customer/Vendor Code
Customer/Vendor Name
Bill To
Customer/Vendor Ref. No.
Tax Percentage
Tax Total
Tax sum (FC)

Conditions

Select

Variables

Equal
Greater Than
Smaller than
Greater or Equal
Smaller or Equal
Not equal
Contains
Does not contain
Starts with
Ends with
IS NULL
IS NOT NULL

From

Where

Sort by

Group by

Close

Conditions

Fields to be used
for grouping

Define conditions using the


display frame to the right

Executing and Managing Queries


Show/hide
SQL
statement

Change
SQL
statement

Queries

CardCode

SAP AG 2003

GroupCode

C00001

Neumann Matratzen GmbH

C00002

Heinz Mayer

C00003

Thomas Maurer

C00006

Mbel & Mehr

Execute

Execute query
again

CardName

Cancel

Display query as
a graph

Reverse Table

Total

Save

Save in
categories

Open

Open other query

Queries: Topic Summary

You are now able to:

SAP AG 2003

Create queries using the Query Wizard or the


Query Interface

Anda mungkin juga menyukai