sap abap query
DESCRIPTION
Sap Abap QueryTRANSCRIPT
April 19, 2023
For Internal use Only2
Whenever a Developer or a Functional Consultant need to generate report without any coding using ABAP , we can make use of ABAP Queries .
The whole process of creating a report using ABAP Queries comprises of the following steps
1) Creation of user group
2) Creation of infoset
3) Creation of queries
Introduction
April 19, 2023
For Internal use Only3
• SQ01 ABAP Query
• SQ02 Infoset
• SQ03 User Group
Transaction Codes used
April 19, 2023
For Internal use Only4
Creation Of UsergroupTransaction used for creation of user group is SQ03. For extracting data from infoset , the infoset must be assigned to one user group before the data source can be generated.
Click the create button , give the description of user group and save it
April 19, 2023
For Internal use Only5
Creation Of Infoset
The transaction associated with creation of infoset is SQ02
By clicking on the Create button , a popup opens . Give a description at the name field and specify the basis table to join as VBRK and press OK
April 19, 2023
For Internal use Only6
In next screen , a new table can also be inserted by clicking on the Insert table button on the application tool bar. Give VBRP as input in the Add table pop up . By default join conditions are displayed or else they can be determined by clicking the joining condition button.
April 19, 2023
For Internal use Only7
For maintaining the infoset , click on the infoset button . A pop up opens asking for what fields should be there in the field groups . Select radio button Create empty field group and press ok.
April 19, 2023
For Internal use Only8
Two empty field group got created . In the left hand pane we can find the list of fields in both the tables VBRK and VBRP. Drag and drop the fields from the left hand pane to the fields groups. Click on the Generate button to generate the infoset.
April 19, 2023
For Internal use Only9
Go back to the main screen of the transaction SQ02 by clicking the Back Button on the standard tool bar. Click on Role / User Group Assignment to assign the infoset to a specific group.
Check the check box beside the user group and Save to assign infoset to them. In our case ZSDN_ISET is assigned to ZSDN_UGRP.
April 19, 2023
For Internal use Only10
Creation Of ABAP Query
Transaction for creating the ABAP query is SQ01. Give ZSDN_QUERY as Query Name and click on Create button. A hit list opens with all the list of infosets assigned to the user group (ZSDN_UGRP). Select ZSDN_ISET and click ok.
April 19, 2023
For Internal use Only11
Click on the Next Screen to select the field groups that are to be used in our query.
Click on the Next Screen to select the list of fields required in the query.
April 19, 2023
For Internal use Only12
Click on Next screen to determine which of these fields are to be select options and parameters
April 19, 2023
For Internal use Only13
Determine the order in which fields are displayed on the screen.
April 19, 2023
For Internal use Only14
Give the input as specified in the below screen shot.
Click on the Next Screen to check the sequence specification.
April 19, 2023
For Internal use Only15
Click on the Next Screen to specify the field output options.Length , position and color format of the fields on the output screen can be changed.Unit can be displayed before the value or after the value or the unit need not displayed at all
April 19, 2023
For Internal use Only16
Click on the Next screen to specify the report header and footer.
April 19, 2023
For Internal use Only17
Give some text sample Report For ABAP Query as header and &%DATE gives the current date in footer.Click on the Next screen to determine the graphics.
April 19, 2023
For Internal use Only18
The ABAP query will automatically generate a report program , The name of the report program can be taken from the menu bar option as shown below. Create the transaction code for this automatically generated report in the normal way.
April 19, 2023
For Internal use Only19
Click Ok to get the selection-screen displayed.Give the input to it as per our requirement.