sap qury presentation final
DESCRIPTION
Build your own Reports Using SAP QueryTRANSCRIPT
![Page 1: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/1.jpg)
SAP Query
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, SAP query is a tool provided by SAP for generating these kinds of reports.
The SAP Query application is used to create reports not already contained in the default. It has been designed for users with little or no knowledge of the SAP programming language ABAP.
SAP Query offers users a broad range of ways to define reports and create different types of reports such as basic lists, statistics, and ranked lists.
These outputs can include lists on screens in table format, ALV grids, downloadable spreadsheets, and downloadable flat files. The internal report generator creates an ABAP program corresponding to the definition of the list.
![Page 2: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/2.jpg)
SAP Query Modes
QUERY MODES?
SAP Query
Quick viewer Query
Quick Viewer is a simplified version of SAP Query and is intended for beginning users. A main difference between the QuickViewer and the SAP Query is that QuickViewerreports are user-dependent, which means only the person who creates them can use them. SAP Queries, on the other hand, are assigned to one or more user groups.
![Page 3: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/3.jpg)
Creation of SAP Query
QUERY AREASQuery AreasA query area contains a set of query objects (queries, InfoSets, and user groups) that are discrete and consistent.There are the following query areas:
Standard area Global area
Global Area1.Cross client2.Query objects are attached to workbench organizer
Advantage:-The global query area is well suited for centrally developing queries meant for use and distribution throughout the system.
Standard Area1.Client specific2.Query objects are not attached to the Workbench Organizer
Advantage :-End users can develop queries (ad-hoc reports) in their own client that are not meant for use in the rest of the system.
![Page 4: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/4.jpg)
Global Area
![Page 5: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/5.jpg)
Standard Area
![Page 6: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/6.jpg)
Creation of SAP Query
CREATE USER GROUP
![Page 7: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/7.jpg)
User Group Components
The User Groups component is used to maintain user groups. The system administrator uses it to set up the work environment for end-users.
Every user assigned to the user group is able to execute the query.
Users are not allowed to modify queries from other user groups, although they may, under certain circumstances, copy and execute
USER GROUP
![Page 8: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/8.jpg)
User Group
CREATE USER GROUP (T-CODE: SQ03)
Name of User Group
Create Button
Group Description
![Page 9: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/9.jpg)
User Group
CREATE USER GROUP (T-CODE: SQ03)
Name of User Group
User
Assig Infoset
![Page 10: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/10.jpg)
Infoset
INFOSET
![Page 11: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/11.jpg)
Infoset Components
INFOSET
InfoSets are special views of data sources.
An InfoSet describes which fields of a data source can be reported on in queries.
InfoSets are assigned to user groups.
End-users are able to work only with those InfoSets that are relevant to their particular area, as designated by the role or user group that they are assigned to.
Eg: Vendor master data can be important in purchasing as well as in accountancy. The relevant InfoSet is assigned to both roles/user groups. This means that queries based on this InfoSet can be copied and executed by both groups.
![Page 12: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/12.jpg)
Infoset Components
SDTABELSKONV Conditions for Transaction Data
KONP Conditions for Items
LIKP Delivery Header Data
LIPS Delivery: Item data
VBAK Sales Document: Header Data
VBAP Sales Document: Item Data
VBBE Sales Requirements: Individual Records
VBEH Schedule line history
VBEP Sales Document: Schedule Line Data
VBFA Sales Document Flow
VBLB Sales document: Release order data
VBLK SD Document: Delivery Note Header
VBPA Sales Document: Partner
VBRK Billing: Header Data
VBRP Billing: Item Data
VBUK Sales Document: Header Status and Administrative Data
VBUP Sales Document: Item Status
VEKP Handling Unit - Header Table
VEPO Packing: Handling Unit Item (Contents)
VEPVG Delivery Due Index
![Page 13: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/13.jpg)
Infoset Components
TABLES & THEIR RELATIONS
![Page 14: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/14.jpg)
Getting Table or Filed Info from Document
Open Required
Document and Press
F1 to get information
of the Required Field
Press Technical
Information Button to
get the technical
information Press Technical
Information Button to
get the technical
information
![Page 15: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/15.jpg)
Creation of Infoset
Name of Infoset
Name of a table listed in the
ABAP/4 Dictionary.
Name of Infoset
Click on
![Page 16: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/16.jpg)
Join Table For Infoset Records
Check link conditionJoin Table
Check link condition
![Page 17: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/17.jpg)
Selection of Recrods
Choose your required field group
![Page 18: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/18.jpg)
Selection of Recrods
Move Selected fields into these
group folders
List of Selected Tables
Press Button to Create infoset
![Page 19: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/19.jpg)
Assign User Group to Infoset Query
User Group
Press Role/User Group
Button For Assignment
![Page 20: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/20.jpg)
CREATE QUERY
![Page 21: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/21.jpg)
Press Create
Button to create the
query report
Name of Query
![Page 22: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/22.jpg)
Selection & Save the Report
Selected Fields for
Infoset into field group
Select Required FieldsName of Infoset Query Description of infoset
Press OK Button
Setting Of Report Output
Type of Output
Saving Query
![Page 23: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/23.jpg)
OUTPUT
![Page 24: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/24.jpg)
![Page 25: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/25.jpg)
Totals
![Page 26: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/26.jpg)
Different Layout and Sub Totals
![Page 27: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/27.jpg)
Different Layout, Sub Totals & Grand Total
![Page 28: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/28.jpg)
List Viewers
![Page 29: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/29.jpg)
Adding field & Group
![Page 30: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/30.jpg)
Adding local field
![Page 31: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/31.jpg)
SAP Query Modes
CREATING T-CODE OF REPORT
![Page 32: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/32.jpg)
Creation of T-code using SE-93
![Page 33: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/33.jpg)
SAP Query Modes
QUICKVIEWER QUERY
![Page 34: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/34.jpg)
QUICK VIEWER (T-CODE: SQVI)SAP Menu Tools ABAP Workbench Utilities SQVI QuickViewer
Title: For Report Title, we should put in a meaningful name that will show on our final report. Comments: Comments to explain the purpose of the report are (optional). Data Source: we need to define where the information we want to process is coming from. There are four options
Table: This is the simplest form and provides you with all fields of a table (for example, VBAK for Sales Document Header data).
•Table join: With the table join, we can link multiple SAP tables together. Note: We cane use transparent tables in the join like VBAK, VBAP but not pool or cluster tables (such as KONV).
•Logical database: SAP provides a hierarchical structure of tables in the form of logical databases (for example, “VAV” for sales document data), which can be used as a data source for a QuickViewer.
•SAP Query InfoSet: we can save our own definition of tables and their respective fields in InfoSets, which can then repeatedly be used as a data source for the Quick Viewer.
![Page 35: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/35.jpg)
QUICK VIEWER (T-CODE: SQVI)SAP Menu Tools ABAP Workbench Utilities SQVI QuickViewer
From this screen we can create, change, or display as well as execute the QuickViewerreport. All QuickViewerreports will be showenunder the user name.
Enter the name for query and click on Create.
CREATING QUERY WITH
SINGLE TABLE
![Page 36: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/36.jpg)
Basis Mode
LAYOUT MODES
Now you can choose two modes to edit the Query.BASIS MODEThis mode lists down the tables and all the fields, in which you can choose the fields you want as selection and the fields you would like to display.
![Page 37: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/37.jpg)
Layout Mode
LAYOUT MODEThis is a much modern and easy approach to creating a report. Here you can select the fields for selection and listing as a check / uncheck and put them in a layout which is more like a WYSWYG.1
LAYOUT MODES
![Page 38: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/38.jpg)
SAP Query
We can see that the “List fld. Select.” Shows two tables. One in which the fields to be listed in the report are shown and the other in the right, which has all the fields available in the table. I have selected three fields, andmoved it from left to right, which means that if I run the query, it would list down all the sales documents with creation date and the person name who has created it.
Click on the button to run the query
![Page 39: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/39.jpg)
Result of Quickviewer Report
As we have not given any selection fields, the only selection option provided to us is the layout. Let proceed running the query using Execute button.As there are no selection options, there may be number of records to process. To optimize this, the system brings up a box to determine the number of records to be processed. Let us leave it as it is and press enter or select .Now the records are displayed and our fields are columns with values filled in from table VBAK.
TILE OF REPORT
![Page 40: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/40.jpg)
SAP Query With Selection Screen
QUICKVIEWER QUERY
WITH SELECTION
![Page 41: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/41.jpg)
SAP Query With Selection Screen
Click on the button to run the query
Now there is a selection screen which looks like this
Output
![Page 42: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/42.jpg)
Query with multiple tables
QUERY WITH MULTIPLE TABLES
![Page 43: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/43.jpg)
Type your required Ist Table Names
Type your required 2nd Table Names
Enter Report Name, Report Title. Type Comments if required
The two tables are displayed with the linking factor or the key linking field. VBELN is the field in these tables which links these two tables
![Page 44: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/44.jpg)
USING SIMPLE SELECTION
SCREEN FOR SELECTION FIELDS
![Page 45: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/45.jpg)
Creating Selection Parameters
Now as there are two tables, let us look at using the Simple selection screen for selecting the fields for listing and selection.
Now run the query by clicking
![Page 46: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/46.jpg)
Output of Report
This is the selection screen and the selection variable as we selected is the “Sales document” number. Enter a sales document number, or just leave it blank for testing. Click on Execute Button.
The number of data which will be fetched will be restricted to 100. We can change this number, but fetching from the table is a very resource consuming process, for testing purposes, keep your number as low as possible.
QUERY EXECUTED - REPORT
The data which we requested was Sales Document number from VBAK (Sales Document – Header) Item Number and Material from VBAP (Sales Document –Item).
![Page 47: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/47.jpg)
SETTING EXECUTION VARIANTS
![Page 48: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/48.jpg)
If we have many fields for selection and would like to fix some standard values for it while execution, we can do that by making Variants.
While executing the query, on the selection screen enter the desired values and click on Save Button instead of clicking execute.
Select a name for your variant and save it
Our variant is now saved. Every time , when we run the query, we will have a new button for variant selection. We can createas many variants as we want.
![Page 49: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/49.jpg)
GENERATING PROGRAM
![Page 50: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/50.jpg)
Generation of Program
All Queries which you have created appear only inside your login, which means that others don’t have access toyour Query database. If you want to share your queries with others, then the only way to do it is to generate a program out of the query which you created..
On the QuickViewer Initial Screen, from the menu Select Additional Functions > Generate Program
![Page 51: SAP Qury Presentation Final](https://reader035.vdocuments.net/reader035/viewer/2022081400/55270fc5497959f60f8b478b/html5/thumbnails/51.jpg)