SAP Query

SAP Query is a tool provided by SAP to define and view reports without knowing ABAP programming language. Here the users need to define the Infosets (group of Infotypes with selected fields) and based on those infosets the relevant report can be executed and extracted as per the requirement. The reports can be created in various formats i.e. Basic list, statistics and ranked list.

The transaction codes for creation of ABAP Query are:

  • SQ02 – Infoset creation
  • SQ03 – User group creation
  • SQ01 – ABAP Query

 

It’s a three stepped process:

  • Creation of Infoset
  • Creation of user group
  • Creation of queries

 

Step 1: Creation of Infosets

In this step we need to select all the infotypes from which the data is going to be extracted during the reporting. Here we can also restrict the fields which we require in a particular infotype. The LDB for HR can be used here depending on the requirement.

Go to T. code – SQ02, give a name starts with Z, say CREATE

Below given screen will appear.

InfoSet: Title and database for reference

  • Give the LDB name. Here I have taken PNPCE
  • Radio Button should be on LOGICAL DATABASE with inputs as PNPCE
  • Press ENTER or click on tick mark

 

The below screen appears:

Like the 1st option, go to the drop down & check mark all those Infotypes which are necessary & press ENTER or click tick mark.

Sreenshot of Infotypes for reference

From the field Group/data fields on the right hand panel the un-necessary fields can be excluded.
Now click on GENERATE button or shift+F6.

Sreenshot of create object directory entry  for reference

In the above screen click on Local Object. At the footer of screen a message will appear about the GENERATION of Infoset.

Step 2: Creation of User Group

The user groups are created to assign the users with particular authorization to access those infosets and fields.

SQ03 is the T-code to create the User Group.

User group intial screen

Give a name starts with Z & Infoset should be there & click CREATE & below is the next screen.

User group change or create screen

Give a User Group name & click SAVE or tick mark. Below screen will come.

Create object directory entry screen

On the above screen click LOCAL OBJECT  & on the bottom left-hand corner you will see the message “User Group saved”.

Now in the screen of SQ03, press Assign Users and Infosets & the below screen comes.

User Group Z_Test: Assign Users

Above is the next screen & in the blank fields just enter the USER names to handle the QUERY as given above & click ASSIGN INFOSETS to see the below screen.

User Group Z_Test: Assign InfoSets

Scroll down to Your Infoset then put a check mark & click save. A message appears “User Group saved”.

Step 3: Creation of queries

Queries are created based on the infosets defined.

Come to T.code SQ01 & see the created USER GROUP name along with INFOSET as given below

Query from user group: Initial Screens

Give a name to your Query & say CREATE to get the below screen with your INFOSET.

Restrict Value Range

Select your INFOSET & proceed to below screen.

Create query

Just give a Title Name that starts with ‘Z’ & click BASIC LIST  & see the below screen.

Test layout desig

Fill in with the necessary requirements for the with the help of TICK BOX & click SAVE.

Query intial screen

After clicking on DISPLAY REPORT NAME  the below screen appears.

Get the report name from the above screen so as

to use in T.code SE93.

Go to SE93 for the below screen

Maintain transaction

Give it a small name because it as a T.code for this report & click CREATE , then the below screen appears.

Create transaction

Give it a short text & place your radio button on PROGRAM & SELECTION SCREEN.
After placing your radio button there, then press ENTER & get the below screen.

Just provide the Report Name u got from the above 2 screen & click SAVE & get next screen.

Create object directory screen

Then just press LOCAL OBJECT & this message appears “Transaction code saved” on bottom left.

Thus we are done with the creation of SAP Queries and thus report along with T-code without having written a single line of code in ABAP. When there are certain fields for which the data cannot be extracted directly,  in that case some lines of codes are also to be written while creating the Infosets.

Related Blogs

Every outcome starts with a conversation

Ready to Pursue Opportunity?

Connect Now

right arrow

ready_to_pursue
Ready to Pursue Opportunity?

Every outcome starts with a conversation

Enter your name
Enter your business email
Country*
Enter your phone number
Please complete this required field.
Enter source
Enter other source
Accepted file formats: .xlsx, .xls, .doc, .docx, .pdf, .rtf, .zip, .rar
upload
ODUVX3
RefreshCAPTCHA RefreshCAPTCHA
PlayCAPTCHA PlayCAPTCHA PlayCAPTCHA
Invalid captcha
RefreshCAPTCHA RefreshCAPTCHA
PlayCAPTCHA PlayCAPTCHA PlayCAPTCHA
Please accept the terms to proceed
thank you

Thank you for providing us with your information

A representative should be in touch with you shortly