Using Infoset Query, SAP Query and Quick Viewer

Applies to:
SAP BI NetWeaver 7.0. For more information, visit the Business Intelligence homepage.

Summary
This tutorial will give you a brief understanding of how to deal with SAP Query; info set query and quick viewer while using ABAP for BI. Author: Abhinav Saxena

Company: Deloitte Created on: 9th July 2009

Author Bio
Abhinav Saxena is a NetWeaver 7.0 Certified Consultant with 2.5 years of experience in SAP BW/BI.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 1

Using Infoset Query, SAP Query and Quick Viewer

Table of Contents
SAP Query .......................................................................................................................................................... 3  Purpose: .......................................................................................................................................................... 3  Creating User Group ....................................................................................................................................... 3 
Steps to create new user group: .................................................................................................................................. 3 

Creation of SAP queries: ................................................................................................................................ 5  Creating an InfoSet ........................................................................................................................................... 14  Steps: ............................................................................................................................................................ 15  Infoset Query: ................................................................................................................................................... 20  Now we will discuss about steps to create InfoSet Query: ........................................................................... 20 
Steps: ......................................................................................................................................................................... 20 

Creating a Quick View ...................................................................................................................................... 25  Related Content ................................................................................................................................................ 31  Disclaimer and Liability Notice .......................................................................................................................... 32 

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 2

Using Infoset Query, SAP Query and Quick Viewer

SAP Query
SAP Query is SAP’s tool to define and execute once own reports without knowing ABAP programming language. Purpose: • • • 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 offer users a broad range of ways to define reports and create different types of reports such as basic list, statistics and ranked lists. These outputs can include lists on screens in table format, ALV grids, downloadable spreadsheets, and downloadable flat files.

The whole process comprises of three steps. 1. Creation of user group 2. Creation of infoset 3. Creation of queries The transaction codes associated with ABAP Query are • • • SQ01 - ABAP Query SQ02 - Infoset SQ03 - User group

Creating User Group • • • The technical definition of “User Groups” is a collection of SAP users who are grouped together. A user’s assignment to a user group determines which queries he or she can execute or maintain. Additionally, it designates which InfoSets the user can access. Basically, Query Groups permit users to create, modify, and execute reports in a certain area within R/3.

Steps to create new user group: • • Navigate to the User Group Initial screen using transaction code SQ03. Type the user group name that you will be creating, ZUSER, and select the create button.

SAP COMMUNITY NETWORK © 2009 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com 3

sap. Type the name of the user group zuser.boc. Test for user group and click save button.sdn.com | BPX .Using Infoset Query.sap.com 4 .sap. SAP Query and Quick Viewer 3.com | BOC . SAP COMMUNITY NETWORK © 2009 SAP AG SDN .bpx.

Select the Assign Users and InfoSets button.bpx.com | BPX .com 5 .sap.com | BOC .sap.Using Infoset Query.sdn. Creation of SAP queries: 1. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap. SAP Query and Quick Viewer 4. Type the SAP user IDs of any users whom you want to include in your test group. Navigate to the Queries Initial screen using transaction code SQ01.boc. Give ZTEST_QUERY as Query Name and Click on Create button.

com | BPX . A hit list opens assigned to the user group (ZUSER).bpx. notes and specify the number of lines to be displayed in a page. SAP Query and Quick Viewer 2.boc. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sdn.sap.com 6 .sap.sap.Using Infoset Query. 3. Select ZMYINFOSET and click Ok. This moves to the first screen of creation of query. Type the title (mandatory).com | BOC .

SAP Query and Quick Viewer 4.sdn.boc.sap.Using Infoset Query. select the next screen (white navigational arrow) button from the application toolbar. Next Screen button SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.bpx.sap. After entering a title.com | BOC . To navigate to the next screen in the SAP query-creation process.com | BPX . select the Save button on the standard toolbar. Select the field groups that are to be used in our query.com 7 .

Click on Next screen to select the list of fields required in the query.com | BPX .com 8 .sap.Using Infoset Query.sap.boc. Click on Next screen to determine which of these fields are to be used in the selection screen and specify the sequence in which selection to appear in selection screen.sdn. 6. SAP Query and Quick Viewer 5. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .bpx. (Fields include both Selection Screen and Output fields).sap.

you can specify the Line and Sequence number as you want them to appear on your report.Using Infoset Query.boc.sap. Select the Basic List button from the application toolbar.com 9 .bpx.com | BPX .sap. SAP Query and Quick Viewer 7. For each field.com | BOC . The Basic List screen shows you a list of the selected fields that you want to include for your report.sap.sdn. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .

sdn. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . Click on Next Screen to check the sequence specifications.boc. SAP Query and Quick Viewer 8.Using Infoset Query.com 10 .sap.bpx.sap.sap.com | BPX .com | BOC .

position & color formats of the fields on output screen can be changed.bpx.sap.com 11 .sap. SAP Query and Quick Viewer 9.sdn.com | BPX .sap.com | BOC .Using Infoset Query. Click on Next screen to specify field output options.boc. Length. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .

SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.sap. SAP Query and Quick Viewer 10.com | BPX .com 12 .boc. Click on Next Screen to determine the graphics for Output. Click on Next screen to specify report header and footer 11.com | BOC .sap.Using Infoset Query.bpx.sdn.

sdn. SAP Query and Quick Viewer 12.boc.sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 13 . A pop-up is displayed giving the option to set the number of database records to be read.Using Infoset Query.sap.com | BOC .com | BPX .bpx.sap. Click Ok to get the selection-screen displayed. 13.

com 14 .com | BPX .sap.com | BOC . SAP Query and Quick Viewer 14. Give input to it as per the requirement to get the list of records. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sdn.boc. Creating an InfoSet • • An InfoSet describes which fields of a data source can be reported on in queries.sap.Using Infoset Query.sap. InfoSets are assigned to user groups.bpx.

2. give the table name to be inserted and select OK button.sap.sap. Navigate to the Infoset Initial screen using transaction code SQ02. A popup will appear.sap.com 15 .sdn. and select the Create button. You will be provided with a screen as shown below. SAP Query and Quick Viewer Steps: 1.Using Infoset Query. Select insert table icon in application tool bar. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . Choose the data source and press ok button.bpx. Type the InfoSet name that you will be creating. 3. ZMYINFOTEST.com | BPX .com | BOC . Type the name of the infoset. TEST FOR INFOSET.boc.

Select the OK button in the POP-UP and you will be provided with the screen as shown below.bpx.sap.sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com | BOC .com 16 . SAP Query and Quick Viewer Insert Table Button 4.com | BPX .sdn.boc.sap.Using Infoset Query.

com | BPX .com | BOC .sdn.sap. For maintaining the infoset.boc. SAP Query and Quick Viewer 5.sap.bpx. A popup opens asking what fields should be there in field groups.com 17 .sap.Using Infoset Query. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . click on Infoset button. Select radio button Create empty field groups and press Ok.

com 18 .bpx. In the left pane. Two empty field groups got created.Using Infoset Query.sap.com | BPX . SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sdn.com | BOC .sap. we find the list of fields in both the tables LFA1 and LFB1. SAP Query and Quick Viewer 6. 7.sap. Drag and drop the fields from the left pane on to the field groups.boc.

SAP Query and Quick Viewer 8.Using Infoset Query.boc.sap.com | BOC .sap.sdn.sap. Generate Button SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 19 . you need to generate the InfoSet by selecting the Generate button (the red beach ball) from the application toolbar.bpx. Next.com | BPX . A message appears in the status bar saying that the InfoSet ZMYINFOSET generated.

boc.sap.sap.Using Infoset Query.bpx. Infoset Query: • • The InfoSet Query is designed for basic users to retrieve simple single-use lists of data from your R/3 database.sdn. Navigate to the Queries Initial screen using transaction code SQ01 SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap. SAP Query and Quick Viewer 9. Go back to the main screen of SQ02 by clicking Back Button on standard tool bar. Unlike the SAP Query all query information—including the selection criteria for Info Set Query reporting—is available on a single screen. Click on Role/User Group Assignment button to assign the infoset to a specific user group.com 20 . Now we will discuss about steps to create InfoSet Query: Steps: 1.com | BPX .com | BOC .

SAP COMMUNITY NETWORK © 2009 SAP AG SDN .boc.bpx.com 21 . You are prompted to select your InfoSet (data source) from a dialog box. Give ZINFO_QUERY as Query Name and Click on InfoSet Query button. SAP Query and Quick Viewer 2.Using Infoset Query.com | BOC .sdn.sap.com | BPX .sap.sap.

and the Selection screen values. the sample report display.sap.com | BPX . SAP Query and Quick Viewer 3. The main screen contains three areas: The actual InfoSet from which you select and choose your fields.com 22 .sdn.sap. The main screen of the InfoSet Query appears.bpx.sap. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .boc.com | BOC .Using Infoset Query.

boc.sap. For creating your report. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.sap.bpx. SAP Query and Quick Viewer 4. check the Output box next to each field.com 23 .com | BOC .sdn.com | BPX .Using Infoset Query.

SAP Query and Quick Viewer 5.Using Infoset Query.sap.boc.sap.com | BOC . and click the output button to execute the report. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .com 24 . Choose fields for the Selection screen by marking Selection check box.sap.bpx.com | BPX .sdn.

Creating a Quick View 1.Using Infoset Query.sdn.sap.boc.com | BPX . The output will be displayed as shown below.bpx. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . Navigate to the Queries Initial screen using transaction code SQ01 and click Quick Viewer button.sap.com | BOC .sap.com 25 . SAP Query and Quick Viewer 6.

com | BPX .Using Infoset Query.com 26 .bpx.sap. Enter the required table in the pop-up as shown below and select the OK button.sap. A Quick Viewer initial screen appears. give title and select a data source.sdn.com | BOC .sap.boc. 3. A pop-up appears. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . SAP Query and Quick Viewer 2. 4. Type ZQUICK_VIEW and press create button.

Select insert table icon in application tool bar.com 27 . SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap. You will be provided with a screen as shown below.com | BPX . give the table name to be inserted and select OK button.Using Infoset Query.com | BOC .sap.sdn.bpx. 6. SAP Query and Quick Viewer 5. There are three main tabs that allow us to specify QuickView. Come back to initial screen.sap. A pop-up will appear.boc.

SAP COMMUNITY NETWORK © 2009 SAP AG SDN .Using Infoset Query.com | BPX .bpx.boc. The first tab is to list the output fields. The second tab enables to dictate the sort sequence for selected fields.sap.com | BOC . The third tab enables to indicate selection fields for specifying final output.sap. Select fields listed in the Available Fields column and select the arrow keys to move them to the output column. SAP Query and Quick Viewer 7.com 28 .sap.sdn.

sap.com | BPX . In the middle of the screen different Export options for Quick View is available.com | BOC .sap. SAP Query and Quick Viewer 8.Using Infoset Query.sdn.sap.com 29 . Select one from the drop-down box and then select the Execute button to see the Reports Selection screen. SAP COMMUNITY NETWORK © 2009 SAP AG SDN .boc.bpx.

com 30 .bpx.sap.sdn.Using Infoset Query.sap.boc. Specify the selections and select the Execute button to see completed Quick View.sap.com | BOC . SAP Query and Quick Viewer 9.com | BPX . SAP COMMUNITY NETWORK © 2009 SAP AG SDN .

bpx. SAP Query and Quick Viewer Related Content Creating a SAP Query & Ad-Hoc Query Quick Viewer Creating User Groups For more information.boc.sap.com | BPX .Using Infoset Query.sap.com | BOC .sdn.com 31 . visit the Business Intelligence homepage SAP COMMUNITY NETWORK © 2009 SAP AG SDN .sap.

SAP will not be held liable for any damages caused by using or misusing the information.com | BPX .sdn.Using Infoset Query. SAP COMMUNITY NETWORK © 2009 SAP AG SDN . Changes made based on this information are not supported and can be overwritten during an upgrade. code or methods suggested in this document.boc.com | BOC .sap. or seek to hold. SAP Query and Quick Viewer Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample.sap. including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP.bpx. SAP responsible or liable with respect to the content of this document. You agree that you will not hold.com 32 .sap.

Sign up to vote on this title
UsefulNot useful