What is SAP Query or ABAP Query?

What is SAP Query or ABAP Query?

ABAP Query (also known as an SAP Query or Query) is a powerful tool used to generate simple reports without any coding. Typically, an ABAP query is created first by defining a User Group and a Functional Group. The functional group can either be created with reference to a logical table or a database table. Once the functional group is defined, the user group is assigned to the functional group. The last step is to create the query on the functional group that is generated.

ABAP Query executed using transcation SQ01 and SQ02 can be used to create the following three types of reports:

  • Basic Lists: Reports with basic formatting without any calculated fields.
  • Statistics: Reports with statistical functions such as average, percentages, etc.
  • Ranked Lists: Ranked lists are used for analytical purposes.

Quick Viewer (SQVI)

Quick Viewer is a comprehensive tool for defining reports in different forms such as basic lists, statistics, or ranked lists. The Quick viewer is basically used for generating basic lists and is very useful for beginners who was to analyze data between two or more different tables.

In this tutorial we will write an SQVI to find out role assigned to users with full name of the users. You can get role assigned to users from AGR_USER table and users full name from USER_ADDR. We will join both these table to get the result.

Execute transaction SQVI & Create a SQVI (z_user_role) and Click 

Initial Screen

Put a title and comments. Make sure that you select Table join from Data source

Click to insert tables. Insert AGR_USERS and USER_ADDR tables.

Select the correct join. Here we will join BNAME

Hit the back button

Here you will select Role name and user name from AGR_USERS table and Full name from USER_ADDR, and also make user name as the selection field. So when you run the query it will ask me to list the users.

 

Leave a Reply

Your email address will not be published. Required fields are marked *