Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

queries

Former Member
3 REPLIES 3

Former Member
0 Kudos

Hi,

Following link will helps u to get more information.

http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp

Check this link for PDF

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf

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.

-->Creating The Query

· In order to create the query use the menu path Environment => Queries

· Give a name to the query and click on the Create button

· Give the description of the query in the next screen. Specify the output length and select the processing option from the Further Processing Options box. The data can be displayed in various formats such as table, download to a file, and display in Word etc.

· Click on the Next screen icon. Select the functional group screen. All the functional groups created in the functional area are displayed. Select the groups that you desire – fields from only these groups will be displayed in the output. Click on the respective check boxes and click on the Next Screen icon.

· The Select Field screen gets displayed. Select all the fields from the user group that you need to display on the output of the query. If required, specify the short names for the fields using the menu path Edit => Short Names => Switch On/Off or you can also change the selection text contains in the order you want to appear on the selection screen. You can also maintain column headers for the fields by using the menu path Edit => Column Header => Maintain.

· Click on the Next Screen icon to get the Selections Screen. Here you can check against the fields that you require to be shown on the selection screen.

· Now we need to specify the output type for the query as Basic List, Statistics or Ranked List. Choose the option Basic List.

· On the Basic List line structure screen the following things can be done

o Specify the report layout in detail – lines on which the fields will appear.

o Order in which the fields will appear in the output

o Sort order for the fields – this is optional.

o For the numeric fields you can check against the fields for which you require totals in the output.

o Beautify the output according to the options provided.

· Click on the next screen icon, to specify the control levels as mentioned below

o Specify the sort order. The default sort order is ascending and can be changed to descending if required.

o Totals for each field selected for sorting can be displayed

o To display the output of a field in a box click on the check box against box. To display a line after the output of a field, click on the check box against BlnkLn

o To display the output of a field on a new page click on the check box against New Page

· Click on the next screen icon to get the List Line options Screen. Here you can specify the background color for displaying the output.

· Click on the next screen icon to get the Field Output Option screen. In this you can specify the following:

o Change the output length or the display positions of the fields

o Specify the display position of the unit for quantity or currency fields. Click left radio button to display it before the figure, middle radio button to display it after the figure while last radio button to hide the unit altogether.

o Specify color for the column of every field under the Format option.

o Specify the label against the output of sort fields.

· Click on the Next screen option to go to the Basic List Header screen. Here you can specify

o Give page header and page footer for the output

o Include user name and date by specifying &N and &D respectively.

After providing all the above options you can save the query and execute it by clicking the Execute button twice.

Regards,

Kumar

Former Member
0 Kudos

SAP queries are generally used by Functional People to generate Reports . ABAP knowledge is not necessary for that.You just have to mention Database table name, selection critera and fields to be displayed. Your List will be generated automatically.

The transactions used for SAP Query are SQ01, SQ02 and SQ03.