Writing ABAP Queries
Content
Introduction
Creating Functional Areas using a Logical DB
Creating Functional Areas Without a Logical DB
Creating the User Group
Creating The Query
Ranked List and Statistics
Data Retrieval Using Program
Authorizations
  Writing ABAP Queries
-Introduction-
 
Page 1 Of 8
 

Why ABAP/4 Queries?

Many times a need arises for SAP Users and Functional Consultants to generate quick reports without getting any ABAP coding done – time taken to complete the coding in development, transport and test it in QA system and then transport to production – is sometimes too long. In such cases, ABAP/4 query is a tool provided by SAP for generating these kind of reports.

This document aims at explaining the concept of ABAP/4 query in a simple and straight forward manner. The reader of this document should have a moderate knowledge of ABAP concepts and authorizations for understanding the concept of ABAP query.

Type of Report Desired

Before starting to write an ABAP query, its advisable to decide the type of report that the user wants. ABAP query provides the following type of reports:

  • Basic List        Simple report

  • Statistics         Report containing statistical functions like Average &Percentage

  • Ranked List     Report written for analytical purpose

Read This Nugget
The output is always seen in the order of Basic List, then Statistics and then Ranked List if any. One ABAP query can have one basic list, maximum of 9 statistics and maximum of 9 ranked lists.

In a nutshell, an ABAP/4 query can be designed in four steps

  1. Creation of a user group

  2. Creation of functional area

  3. Assignment of user group to functional area

  4. Creation of the query based on functional area

The various objects that form an ABAP query can be created in the following 2 ways:

Tools => ABAP/4 Workbench => Utilities => ABAP/4 Query

OR

By executing the transaction codes mentioned below

  • SQ01   ABAP/4 Query

  • SQ02   Functional Area

  • SQ03   User group

Step I       Create Functional Area

In the functional area section, the user indicates from which part of the SAP database the data is going to be retrieved and how the data is to be retrieved by the query. One functional area can be assigned to many user groups. A functional area can be created with or without a logical database.

To create a functional area with a logical database, one has to mention the name of the database and then select the fields from the tables that form the logical database.

 
Stats Box
Vendor Listings (9)
Jobs (3)
Resumes (3)
Tutorials (18)
Articles (22)
Code Snippets (1)
CBTs (17)
Books (4)
Online Training (15)
Latest 5 Tutorial
SAPscript
SAP Mobile Engine
Integrating XML into SAP Business Connector
Lotus Notes Integration
SAP Data Archiving
 
Copyright © 2007 SapDox.com. All rights Reserved.