Write an Adhoc Report (PQAH)
Purpose
Use this procedure to Create a new Ad Hoc Report from scratch for a reporting User Group.

Any Ad Hoc report created within a reporting User Group will be available to
all users in that group.
Trigger
Perform this procedure when you want to create a report on Master Data, which is stored against employees in the system.
Prerequisites
Your Master Data must already exist within the system.
Your user must be assigned to a User Group - this is carried out by your systems administrator.
Navigation Path
Use the following navigation path(s) to begin this transaction:
Select to go to the HR Adhoc Query screen.
Select to go to the HR Adhoc Query screen.
Helpful Hints

Adhoc Query can also be executed from within the Manager's Desktop and from
within the Human Resources Information system.
Example
In this example you will write an Ad Hoc Report using the following reporting functional groups and fields therein.
Key fields
Personal Data
Organisational Assignment
Basic Pay
You will use selections for Basic Pay
Salaries from £20,000 to £40,000 inclusive.
You will execute the Adhoc Report
You will save the Adhoc Report to run on another date.
Field Description Tables
The R/O/C column of each Field Description table indicates whether the field usage is:
R - Required in SAP.
O - Optional in SAP.
C - Conditional in SAP.
Procedure
1. Start the transaction using the navigation path.
2. Double click
Adhoc Report Writer to take you to the
HR Adhoc Query screen.

The screens, or infotypes, listed on the left side of the screen are dependent
on your user settings; for example if you are an HR User you will see different
information to a Payroll User.

It is not Mandatory to create all reports from scratch; the system comes supplied
with a number of standard reports which can be selected using
rather than using create. Such reports can have print fields and selection
fields added or removed as required. When saving these reports to ensure the
template report is not overwritten, select instead of normal

save.
3.1
Click
to go to the
Create New Query -
Functional Area Selection screen.
3.2 Complete the following fields:

According to your access on the system you may be assigned to one or more of
the following reporting User Groups. You should select the one you require.
HRUSERGRP for all HR Fields.
HRNOPAY for all HR except fields which contain Pay Information.
HGHRREC for Recruitment fields.
PYADM for Payroll fields.
3.3
Click

to the left of the Functional
Area in which you wish to create your Ad Hoc Report.

When creating new Ad Hoc Reports you should use only the following Functional
Areas.
HRUSERGRP_FA for all HR Fields.
HRNOPAY_FA for all HR except fields which contain Pay Information.
HGHRREC_FA for Recruitment fields.
PYADM_FA for Payroll fields.
3.4
Click
to confirm your entry. This will ensure that the correct Functional
Groups appear for selection.
4. Select Fields to print.
4.1
Expand the Functional Group that contains the Field you wish to print. Do this
by scrolling the window until you find the correct Functional Group and clicking

to the left of it.

You are presented with 3 columns of

check boxes.
Column One represents Selection or Only If Fields.
Column Two represents fields to print.
Column Three represents text descriptions.of Coded fields to print.
4.2
Click

In column Two for the Field
You wish to Print. In this case
First Name.

Note the field is now checked and example output is beginning to build in the
bottom window on the screen.
4.3 Repeat from
Step 4 for all the fields you wish to print in the report.
Example:

You can change the Column Order in the bottom window by selecting a column and
then dragging and dropping it in the position you require. You can also sort
a column by right clicking it and following the on screen selections. Report
details can also be sorted and manipulated after report execution.
5.
Select selection fields
5.1
Expand the functional Group that contains the field you wish to use as a selection
field. Do this by scrolling the window until you find the correct Functional
Group and clicking

to the left
of it.

Note the Annual Salary is already selected for display.

You are presented with 3 columns of

check boxes.
Column One represents Selection or Only If Fields.
Column Two represents fields to print.
Column Three represents text descriptions.of Coded fields to print.
5.2
Click

In column One for the Field
you wish to select against. (In this example,
Annual
salary.)

Note the Annual Salary is now presented as a selection field in the window on
the right of the screen.

In this example, you require a report on employees with salaries from £20,000
to £40,000 inclusive.

You can select single operations by clicking

in the Opt (Option) column. If this were sufficient, you could use the following
operators:- equals; greater than or equal to; greater than; less than or equal
to; less than and not equal to.
In this example, you will select employees within a salary range.
5.3
Click

to go to the
Multiple
Selection for Annual Salary screen.
5.4
On the
Multiple Selection for Annual
Salary screen there are 4 tabs; click

.

The tabs can be used as follows:-
Tab
|
Description
|
|
Use Operators for single values. Any entries here will be included in the report output.
Example: Greater than 20000
|
|
Use limits for values. Any selections here will be included in the report.
Example: 20000 to 40000
|
|
Use Operators for single values. Any entries here will be excluded from the report output.
Example: Less than or equal to 20000
|
|
Use limits for values. Any selections here will be excluded from the report.
Example: 20000 to 40000
|
5.5
Enter 20000 in the left
Value field
(from) and 40000 in the right
Value
field (To). Click

to confirm your
entry.

You are now selecting only Employees who have Annual salary over 20000 and less
than 40000 inclusive
5.6
Click

to confirm your entries.

Note the icon to the right of the Value field

now has a green bar on it to indicate that there are additional selections behind
it.
5.7 Select Today in the Reporting period panel.

You can select any period for your Ad Hoc report data selection.
5.8
Click

to determine how many records
meet your selection criteria.

In this example there are 14 employees who, as at today's date, have a basic
pay between £20,000 and £40,000 inclusive.
5.9 Repeat
Step 5 for any further selection criteria you require.
6.
Click

to run your report.

Note the name of the Query, and consequently the heading, has been automatically
generated. Once a report has been saved and re-opened it displays the
Title
as it's heading. See
Step 9
7.
Click

to return
to the
HR Ad Hoc Query screen.
8.
Click

to go to
the Save Query screen to save your Ad Hoc Report.
9. Complete the following fields:

The
Title field will be used as the
heading for the report once the report is saved and re-opened at a later date.
10.
Click

to confirm your entries.

The system displays the message, "Query RJP_SALARY_1 was saved in user group
HRUSERGRP".
11.
Click

to return
to the
SAP Easy Access Main Menu
screen.
12. You have completed this transaction.
Result
You have written, saved and executed an Ad Hoc report.