Skip to Content

Steps :

Following Steps are involved in creating an HR query:

1. Set Query Area

2. Creating a user group

3. Creating info set

4. Creating Query  and Executing

Set Query Area

There are two query areas, Standard area which is client dependant and Global area which is client independent.

For our exercise and development we would be using “Global area” because of following reasons:

  • It requires transport request to create any object in Global area, means no separate process for transport request required.
  • If any change is required in any component in future, it can only be done in development client and then moved along the landscape.
  • It ensures that all queries under the info set created in global area will also have to be created in global area.

To set query area go to transaction SQ01, Environment and Query Areas: Select Global area and click choose

ScreenHunter_79 Jan. 24 18.07.jpg

Now go to tcode SQ03 to create a user group as follows with a meaningful name like ZHRPA for users in HR and using Personnel Administration Module and click on create tab….as shown below

ScreenHunter_80 Jan. 24 18.08.jpg

Now that the user group is created, assign user id to this user group. In other words, it is nothing but assigning users to this user group by clicking on Assign users and infosets…

ScreenHunter_81 Jan. 24 18.10.jpg

ScreenHunter_82 Jan. 24 18.10.jpg

Creating Info set

Next step is to create infoset, an infoset defines the data that needs to be used for building reports such as name of employee, position, salary, education etc.

For HR, Logical databases are used, which makes it fairly simple to have a query with a lot of data without much effort. Infoset is created based on Logical database and all the data related to that logical database can be used in queries.

Go to transaction SQ02 for creating infoset, even now you are still in the global area, which will not change unless you change it from step 1, however do ensure that it shows query area as Global.

Give a meaningful name in infoset area in our exercise we will be using ZHRPA_INFOSET, click on create in SQ02 as follows:

ScreenHunter_84 Jan. 24 18.12.jpg

Now give a meaningful name to the infoset, and assign logical database as PNPCE, it’s the logical data base for personnel administration and uses all info types mentioned in personnel administration. Now click OK

ScreenHunter_85 Jan. 24 18.13.jpg

It will take you to the infotype selection area, select the ones required, in our case we will select Organizational Assignment and Personal Data. Click Ok Icon

ScreenHunter_86 Jan. 24 18.14.jpg

The screen will have two areas, one that shows complete set of fields and one on the right that shows fields that can be used in queries. Fields can be moved from Left to right side if not already available

ScreenHunter_87 Jan. 24 18.16.jpg

Save the infoset at this stage and provide with the same transport request used previously. Generate the infoset

Go back to first screen of transaction SQ02 and this time enter the info set already created and click on Role/User Group Assignment. Select the user group that was create previously ZHRPA from the list click it and click save

ScreenHunter_88 Jan. 24 18.17.jpg

Now go to ADHOC Query by Menu Path as follows: SAP Easy Access Menu—HR—Info systems—Reporting tools—Adhoc query

and give the info set and select the user group as follows:

ScreenHunter_90 Jan. 24 18.19.jpg

Now Select the company code field to list the employees under SAM8 as follows

ScreenHunter_91 Jan. 24 18.21.jpg

To the right hand side of the screen, give SAM8 (or any company code) as follows

ScreenHunter_92 Jan. 24 18.22.jpg

Now select the first name and last name as follows as the output fields:

ScreenHunter_94 Jan. 24 18.23.jpg

And click on Output as below:

ScreenHunter_95 Jan. 24 18.25.jpg

To see the report as follows :

ScreenHunter_96 Jan. 24 18.26.jpg

Regards,

Santoshini

To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

    1. santoshini vuppala Post author

      Hi, Krish,

       

      Thank you very much for appreciating my work…

       

      Please click on like to fetch me points in recognition of my work…

       

      Regards,

       

      Santoshini.

      (0) 
      1. Aruna Kumari Chitipotu

        Hai Santoshini,

        This is Aruna new joinee in the Community.  SAP HR Functional Consultant Trained.  Yours is a nice presentation of Adhoc query.  the same way can you please present for BDC.  And also i wanted to know how frequently we have to use BDC in real time.

        Regards,

        Aruna Kumari Chitipotu

        (0) 
  1. Katsia Barshchynskaya

    Hi Santoshini, thanks a lot for your clear and concise guide.

    Do I understand correctly that a query made in Standard Area can be set up directly on production client?

    Kind regards, Katsia

    (0) 

Leave a Reply