ABAP Query Tutorial
ABAP Query Tutorial
Abstract
This white paper gives a brief introduction on advanced ABAP concepts and detailed steps to create ABAP Query.
ABAP Query
Table of Contents
1. INTRODUCTION...........................................................................................................................3 2. ABAP QUERY................................................................................................................................4 3. CONCLUSION..............................................................................................................................10
Page 2
ABAP Query
1. Introduction
1.1 Basics of ABAP
SAP (System Application & Products) is one of the best ERP Applications in the market. The application has been assembled in such a versatile way that it handles the entire functional department within an organization. Today major companies including Microsoft and IBM are using SAP to run their own businesses. A very high level programming language created by SAP is ABAP (Advanced Business Application Programming) which is used to develop applications for SAP R/3 system, a widelyinstalled business application subsystem. ABAP is thus not only a mature language that has proven itself in the practical field, but on the basis of its evolutionary strategy it continues to be suited to the requirements of business programming. With the quality of its application programs, it has made SAP a world leader in the development of business software.
Page 3
ABAP Query
2. ABAP Query
2.1 Definition
ABAP Query is a functional tool used to develop simple report by writing queries instead of writing ABAP report program i.e. without ABAP coding. All you need is to join the table and drag and drop field that you wish to occur in the report. Following are the types of reports developed by ABAP Query Tool, Basic List: - This is a Simple report. Statistics: - Report containing statistical functions like Average & Percentage Ranked List: - Report written for analytical purpose.
Page 4
All the above information is stored in the base tables EKKO (Purchasing Document Header) and EKPO (Purchasing Document Item).
Once the user Group is created, users have to be assigned to this group. The users in the group are only eligible to run the query. The below screen shows DEV01 and DEV02 users are added to this user Group.
Infoset holds the information about the query i.e. the tables used, fields needed, join condition etc. Navigate to SQ02. Give the name and click on Create. Provide the Title and the table information in the fields provided as given in the below screen.
Till now EKKO table is only added in the infoset, now EKPO table has to be added by clicking on Insert Table button in the below screen. Once both the tables are added, the pictorial representation of the tables are represented as, Insert Table
Select Fields: - This is achieved by clicking on Infoset Button on previous screen. Fields are selected by simply dragging and dropping from left to right. Here we have selected only 6 fields from EKKO table and 5 fields from EKPO table.
Generate the Infoset by clicking on Generate Button. Once the infoset is generated it will be displayed in the list with its status marked as Green.
Among the selected fields in the infoset, select the fields for outputting in the report as well as selection condition can also be given for each and every field before the report is generated. This is shown in the below screen,
Final report is generated by clicking on Output Button in the previous screen. This is the sample report for Basic list similarly Statistical and Ranking list can be generated by selecting the option from the dropdown provided in the previous screen.
3. Conclusion
This document gives brief introduction on ABAP concepts and stepwise approach to create ABAP Query. It is basically a tool to test SQL query. It clearly depicts that, report program is not needed to test the single SQL Query.