You are on page 1of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

INCLUSION OF INFOTYPES IN SAP ADHOC - QUERY


There lies a paramount importance for the organizations to have the reports
at the tips. A glance into the reports lets the organizations to strategically
plan for the next courses of business and activities. Reporting can become
very challenging when the differing needs of many decision-makers are met.
An easiest approach for accessing the data in different forms is through the
Queries - Reporting Functionality.
SAP HR offers a variety of access methods in this regard for its users. Of
which, one of the most prominent is the functionality of Ad-hoc Query. HR Ad
Hoc Query enables users to create company-specific reports that respond to
their ever-changing needs for information about employees and the
organization.
The R/3 System contains hundreds of thousands fields in logical databases.
Since the users cannot be presented with thousands of fields to choose from
even from one particular logical database, to create a report, functional
areas/Infosets are created. When creating a functional area, first a logical
database is selected, such as PNP which contains all the relevant tables for a
particular module or sub-module. When selecting PNP which is relevant to HR
master data, the administrator needs to pick which infotypes should be
included in that particular functional area from the total number of infotypes
attached to the logical database.
For the purpose of creating a query, we firstly create user groups, which are
then assigned with the functional areas. A functional area can also be
assigned to the existing user group. A functional area determines which fields
of a logical database can be evaluated in queries. The administrator can
create the user group and the functional area using transaction codes SQ03
and SQ02 respectively.

Page 1 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

PART 1
Step 1: Create User Group SQ03
Follow the menu path SAP Menu -> Tools -> ABAP Workbench -> Utilities ->
SAP Query -> User Groups

Page 2 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

In the User Groups: Initial Screen - Enter User Group (ZUSGRNEW in this case)
- Click on Create

In the User Group (ZUSGRNEW) : Create or Change pop-up window - Enter the User Group Description
- Click on Save

Page 3 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

In the Create Object Directory Entry pop-up window - Click on Local Object button

- The User Group Created is saved

Page 4 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Step 2: Create Infoset SQ02


Follow the menu path SAP Menu > Tools > ABAP Workbench > Utilities >
SAP Query > Infosets
* In the Infoset: Initial screen - Enter Infoset Code (ZINFSNEW)
- Click on Create button

* In the Infoset: Title & Database Screen - Enter Description of Infoset in the Name field
- In the Data Source selection: Select Logical Database PNPCE
Source the data can either be multiple tables or single table. There are 4
options for the user to select from Data Source.
1. Table join using basis table
2. Direct read of table
3. Logical data base

Page 5 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

4. Data retrieval by program

- Click on Continue (Enter)


- Selected Table gets displayed in the Infoset: Initial Screen

Page 6 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

*In the Infoset : Initial Screen - Expand the Folders and select the necessary Infotypes to be added.

- After transferring Data Fields to Field Groups click on Generate


button
* In the Create Object Directory Entry Screen - Click on Local Object button to generate the infoset

Page 7 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Page 8 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Step 3: Assigning User Group to Infoset SQ03


Follow the menu path SAP Menu -> Tools -> ABAP Workbench -> Utilities ->
SAP Query -> User Groups
*In the User Groups: Initial screen - Enter the User Group for which Infoset is to be assigned
- Click on Assign Users & Infosets button
* In the next screen, select the Infoset, which needs to be attached to
the User Group selected

Page 9 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

* In the User Group: Assign Users Screen - Click on Assign Infosets button

Page 10 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

* Select the Infoset that is created for Infogroup ZUSGRNEW

Page 11 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Step 4: Creating the ad-hoc query SQ01


* Create a query (ZQRYNEW in this case)

* Click on Infoset Query

Page 12 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

* Select the correct User Group & Infoset name.

Page 13 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Step 5: Accessing the Adhoc Query


The so created query is ready to be accessed. The menu path for the same is
SAP Easy Access Human Resources Personnel Management
Administration Info System Ad Hoc Query
Alternatively the same can be directly accessed by using the following
transaction code.
TC:- S_PH0_48000510

Page 14 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

Page 15 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

In this info set all the infotypes are displayed. Select the Selection field and
tick mark. Select the output fields and tick mark. In the right side the input
selection field will appear. In that give the required value. If we want to know
the total persons in the available report just click the Hit list button on the
screen. The number of persons will be displayed.
For the complete report click output button in the tool bar. The output of the
related information will be generated.

The data will be displayed.

Page 16 of 17

Inclusion of infotypes in SAP-Adhoc query

Dr. Hari K Vollala

The Query can be saved as below

The Transaction PAAH can be invoked to access the ad-hoc query.

Page 17 of 17

You might also like