0% found this document useful (0 votes)
72 views3 pages

Abap 4 Query

The document provides an overview of ABAP/4 Query tools in SAP for creating simple reports without programming. It describes how to create basic, statistical, and ranked list reports using queries. It also summarizes the Quick Viewer query tool introduced in SAP 4.6x and limitations like its inability to use cluster tables. Additional topics covered include functional areas, user groups, query headers, exporting queries to Excel, and differences between the standard and Quick Viewer queries.

Uploaded by

santhosh945
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views3 pages

Abap 4 Query

The document provides an overview of ABAP/4 Query tools in SAP for creating simple reports without programming. It describes how to create basic, statistical, and ranked list reports using queries. It also summarizes the Quick Viewer query tool introduced in SAP 4.6x and limitations like its inability to use cluster tables. Additional topics covered include functional areas, user groups, query headers, exporting queries to Excel, and differences between the standard and Quick Viewer queries.

Uploaded by

santhosh945
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ABAP/4 Query Hints and Tips

The purpose of the SAP Query are for users with no programming knowledge.  It is also used by
abapers to create simple reports for the users.

You can easily create three types of query reports :

1.  Basic lists (details list)


2.  Statistics (counting etc.)
3.  Ranked lists 

When you start using version 4.6x, you can see a Quick Viewer button in the Query Main screen. It is
suppose to be much simplier that the original Query but it is up to you to decide whether is it true.

To create a report with the QuickViewer, all you need to to do is enter texts such as titles, and select
the fields and options that define the structure of the report. You can assign a specific sequence to the
fields by numbering them.

If necessary, you can edit the lists either through drag and drop in WYSIWYG mode, or by using the
functions in the available toolbars. Data can also be send to external programs such as MS Excel or
MS Word for further processing.

The only problem with QuickViewer is that it cannot read cluster table.

Understanding SAP Query

A functional area is where you group selected tables together to be reported on.

User groups are sections to build queries in.

A query is the report.

For example, lets say you wish to build a report (query) on the material master where you want to see
certain fields from the MARA table and other fields from the MVKE table.

First you would create a functional area that has both the tables MARA and MVKE in it and
appropriately linked.
(Different tables need a valid join to be queried on)

There is no need to create the functional area if of course a functional area already exists with at least
those 2 tables in it.

Also to note is the fact that the functional area determines which fields of the tables can be queried
on.   You can select the desired fields to be either on or off.

Second you would create a user group to put your queries into.

You may have a 'material master' user group which has material master queries in it, then later you
might have a 'bill of materials' user group with BOM queries, etc.
You would also assign various users to the user groups to give them the ability to run the reports
within that user group.

Finally you would create a query within a user group where that query is based on the functional area
and can therefore show selected fields from the tables in the functional area.

ABAP/4 Query
Every business is unique and SAP provides reporting tools for its users.  For simple reports, you can
used the ABAP/4 Query instead of writing reporting programs.  If the reports specifications is not very
complex, using the query will save you a lot of time. In the query, you can create your own calculation
variable, define the sorting criteria, define the field arrangement and define whether you want to have
totals.
Steps to create a query :-
 SQ02 - Create the Functional Areas
 SQ02 - Assign to User groups
 SQ00 - Create the Basic Lists/Statistic/Ranked List
o Basic Lists are details reports.  Every records in the table are printed.
o Statistic are summary reports.  The records with the same keys are group together.
o Ranked list are ranking report.  e.g. The top 10 sales values.
Some ABAP/4 Query header line variable :-
 &%NAME   Name of user executing the query
 &%DATE    Current date when executing the query
 &%TIME     Current time when executing the query
 &%PAGE    Current page number (output 6 characters)
XXL (EXtended Export of Lists)
A tool for displaying and manipulating list objects from R/3 applications.  XXL is based on the
Microsoft Excel spreadsheet program.

e.g. on ABAP/4 Query using SAPGUI 4.0b

 Further processing options - click Spreadsheet


 execute your query and wait for the Export list object to XXL menu box to appear
 click Excel 4 / SAP macros and click continue
 in the Excel click Enable macros if prompted
 the rest is Excel command which you can try on your own

ABAP Quick Viewer

In SAP 4.6x, you can used a simplified ABAP query.  The Quick Viewer ( SQVI )  can be used to
generate simple report without any programming.

You select fields according to your data source that determine the structure of your report. The report
can be executed in basis mode with standard layout or may be edited using drag and drop and other
toolbox functions available in WYSIWYG mode.

However, only transparent table are allow to be use in SQVI.

e.g. Your cannot use BSEG as it is a cluster table, instead use BSIS.

 BKPF - Accounting Document Header


 BSIS - Accounting: Secondary Index for G/L Accounts

You might also like