7
AD HOC QUERY: DETAILED STEPS SEPTEMBER 17, 2018 An Ad-Hoc Query is a query that cannot be determined prior to the moment the query is issued. It is created in order to get information when need arises and is dynamic which means the data may change from day to day. There are many transaction codes (TCodes) for Ad Hoc Queries but the best used by HR – Classified is S_PH0_48000510 (all zeros) as it pulls the work area & user group related information from Personnel Administration. Below are the details. Other Tcodes will get you different modules for user groups like Recruitment, Benefits, etc. 1. Create a favorite: click on Favorites in the Menu bar and then select Insert Transaction. Type S_PHØ_48ØØØ51Ø (Ø ALL ZEROS). 2. From the SAP Easy Access screen, click on the Favorite Transaction Code – S_PH0_48000510 Check that the Work Area = Global Area (bottom of the screen) And User Group = HR: Personnel Administration (/SAPQUERY/H2) 3. Select the infoset ZSBCUSD_HR_ADM by clicking on the gray square to the left. 4. Click on the green check mark to “Continue”, the next screen is where you will either a. Select a saved query b. Or Create a new one Select a Saved Query There are many already created (saved) queries to select from. 1. Click on the Create New Session icon. 2. Type SQ01 (numbers) into the Easy Access Command Field. 3. Type a word related to what you are looking for into the blank Query field. 4. Click on the InfoSet Query button.

Ad Hoc Query Training - San Bernardino City Unified School

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

AD HOC QUERY: DETAILED STEPS SEPTEMBER 17, 2018 An Ad-Hoc Query is a query that cannot be determined prior to the moment the query is issued. It is created in

order to get information when need arises and is dynamic which means the data may change from day to day.

There are many transaction codes (TCodes) for Ad Hoc Queries but the best used by HR – Classified is S_PH0_48000510 (all zeros) as it pulls the work area & user group related information from Personnel Administration. Below are the details.

Other Tcodes will get you different modules for user groups like Recruitment, Benefits, etc.

1. Create a favorite: click on Favorites in the Menu bar and then select Insert Transaction.

Type S_PHØ_48ØØØ51Ø (Ø ALL ZEROS).

2. From the SAP Easy Access screen, click on the Favorite Transaction Code – S_PH0_48000510

Check that the Work Area = Global Area (bottom of the screen) And User Group = HR: Personnel Administration (/SAPQUERY/H2)

3. Select the infoset ZSBCUSD_HR_ADM by clicking on the gray square to the left.

4. Click on the green check mark to “Continue”, the next screen is where you will either

a. Select a saved query

b. Or Create a new one

Select a Saved Query There are many already created (saved) queries to select from.

1. Click on the Create New Session icon.

2. Type SQ01 (numbers) into the Easy Access Command Field.

3. Type a word related to what you are looking for into the blank Query field.

4. Click on the InfoSet Query button.

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 2 of 7

This is the infoset Query area.

To see our listings, make sure you are in the InfoSet: HR Personnel Administration.

5. Click on the “Open Query” folder.

6. Select a query which is already saved.

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 3 of 7

7. Click Continue (the green check mark).

8. Click on Hit List to see the count for your output.

9. The count appears. Verify it is correct, and then click on Refresh Data in the output area to see the list.

Once refreshed, the output of the report appears.

Review data using the icon in the upper left corner.

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 4 of 7

SAVE and PRINT by downloading it to Excel. Below is the method to download.

1. Click on the “Local File” icon.

2. Select “Spreadsheet” and then click on Continue (green check mark). The File can be saved: Directory: Change this to where you want it saved using the locator button on the right. File Name: Type YY_your initials and a name for the file, leaving the .xls.

3. Click on Generate to save.

Your report will be downloaded in XLS format at the selected location. DO NOT SAVE

OVER SOMEONE ELSE’S QUERY!!

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 5 of 7

Create a New Query / Report

This is the Infoset Query area

Selection Column

1. Start selecting the Selection Input fields you want employee information from within the database.

For example, if we want all Active Classified Employees, then we have to select the fields shown below. For Active, open the Actions Folder, select the “Employment Status” field as “Selection” (Left Check box) and enter “3” as value on right hand side of the screen. This will pick all employees who are active in the system (Active and on Leave, use Org Assig folder to Employee Group = 3).

Continue in the same way selecting any other “selection” fields needed that will match the criteria and enter the values like Personnel Area, Sub area, payroll area, etc.

If you are not sure of the field choice, select Output next to it and see what shows in the Preview of output (bottom list).

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 6 of 7

Output Column

Output means this selection will show on the listing. If only Selection is check marked, the data will not show

on listing but will be used to query the information.

1. For output, choose the check box of the related Output field. This will then appear in the output area. For example, Employee number is chosen for output, this will show on the list. If you want to display their Name, right click on the header of the output field (3 in the screen), and select “Value and Text”. This will give you the number and name of an employee. Right click on any header and see the options.

Number and name of the employee.

Rt clk column heading

for Text & Value

SAP – Ad Hoc Query Training

SBCUSD – Information Technology Department Page 7 of 7

Date Criteria Date, by default is selected as “Today” on the right – top of the screen

1. To change the date, click on the square shown in the screen above.

2. Select any of the available options.

3. Once done selecting a Date, Selection and the Output fields, click on Hit List and then on Refresh data as shown.

This report can be exported to any format which is already explained.

4. You can save your query using the floppy disc icon.

5. In the Name and Title fields, change the QUE to YY (leave your initials).

6. Give your query a descriptive name so others know exactly what will be queried.

Refresh button