Search on this Website

Thursday, May 22, 2008

How to Generate Query Report ?Example

First construct the logical database and generation of query report is as follows.

The transaction codes used in Query reports are:

1. SQ01 – For creating Query.

2. SQ02 – For creating Infoset.

3. SQ03 – For creating User.

First u need to create the USER and generate the INFOSET, in turn can produce the
Query report.



INFOSET
An SAP InfoSet (formerly known as a Functional Area) is crucial for ABAP query usage (in SAP versions 4.6A - onward).

The reason for InfoSets being important is because many R/3 clients find themselves faced with how to develop useful reports from an application using 20k+ tables. In addition, many clients desire to use third-party reporting tools; i.e., Crystal Reports. In this article, we will look at what an R/3 InfoSet and how they relate to Crystal Reports.

• Knowledge learned in this article can be put to use when:

• Users require an understanding of how InfoSets are used within SAP R/3

• Users require an understanding of the various methods of developing InfoSets .

• Users require an understanding of how InfoSets are used in concert with Crystal Reports.

Report developers cannot be expected to cull through the thousands of tables and fields R/3 presents - even from a single logical database. Therefore, some form of technical shortcut is beneficial. InfoSets, when used with ABAP queries are an example of an available shortcut.
At its simplest definition, an InfoSet determines which tables and/or fields within a table, queries may reference. To accomplish this, InfoSets are typically based upon table joins or logical databases (LDBs). Therefore, an InfoSet is, for lack of a better term, a form of Ubber View (Super View).
Here are just some of the several key items to be considered before developing an InfoSet:

Which logical database (LDB) should be selected?
Within HR, an example would be PNP, which contains all the relevant tables for a particular module or sub-module. After selecting the LDB (i.e., PNP which is relevant to HR master data), which infotypes should be included from the total number of infotypes attached to the LDB? An InfoSet will determine which fields of an LDB can be evaluated in by your queries.

Are any auxiliary (additional) fields required?
In some instances, the information a logical database supplies will be insufficient. Both additional tables and additional fields can be added to an InfoSet. Any table can be added as an additional table, provided they are defined within the ABAP Dictionary. When adding a field, the ABAP code must be specified and the field assigned to a functional group.

By creating InfoSets and assigning them to user groups, the system administrator determines the range of reports end-users and report developers can access.

Since InfoSets are used with later versions of SAP - versions that are more User Role dependant -- ABAP queries are also similarly affected. The tool for maintaining queries within the SAP query is called the InfoSet Query - a tool suitable for developing general queries and for ad-hoc reporting.

The InfoSet Query is suitable for reporting in all areas of the SAP R/3 system. A special feature is its Human Resources (HR) module component. When the InfoSet Query is used within HR for ad-hoc reporting, the name Ad-Hoc Query is used instead of InfoSet Query. InfoSet Queries use the SAP List Viewer (aka ALV - ABAP List Viewer) as its standard output medium. This means after executing a query, the output list is displayed within the ALV.

No comments: