Sei sulla pagina 1di 178

Enterprise Query for FSCM 9.

0
Created on 2/4/2010 10:04:00 AM
COPYRIGHT & TRADEMARKS
Copyright © 1998, 2009, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names
may be trademarks of their respective owners.

This software and related documentation are provided under a license agreement
containing restrictions on use and disclosure and are protected by intellectual property
laws. Except as expressly permitted in your license agreement or allowed by law, you
may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute,
exhibit, perform, publish or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for
interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted
to be error-free. If you find any errors, please report them to us in writing.

If this software or related documentation is delivered to the U.S. Government or anyone


licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS


Programs, software, databases, and related documentation and technical data delivered to
U.S. Government customers are “commercial computer software” or “commercial
technical data” pursuant to the applicable Federal Acquisition Regulation and agency-
specific supplemental regulations. As such, the use, duplication, disclosure, modification,
and adaptation shall be subject to the restrictions and license terms set forth in the
applicable Government contract, and, to the extent applicable by the terms of the
Government contract, the additional rights set forth in FAR 52.227-19, Commercial
Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway,
Redwood City, CA 94065.

This software is developed for general use in a variety of information management


applications. It is not developed or intended for use in any inherently dangerous
applications, including applications which may create a risk of personal injury. If you use
this software in dangerous applications, then you shall be responsible to take all
appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of
this software. Oracle Corporation and its affiliates disclaim any liability for any damages
caused by use of this software in dangerous applications.
This software and documentation may provide access to or information on content,
products and services from third parties. Oracle Corporation and its affiliates are not
responsible for and expressly disclaim all warranties of any kind with respect to third
party content, products and services. Oracle Corporation and its affiliates will not be
responsible for any loss, costs, or damages incurred due to your access to or use of third
party content, products or services.
Training Guide
Enterprise Query for FSCM 9.0

Table of Contents
Enterprise Query for FSCM 9.0 ...................................................................................1
PeopleSoft Query Basics ....................................................................................................... 1
Running an Existing Query Using Query Viewer .............................................................................. 1
Running an Existing Query Using Query Manager ............................................................................ 6
Creating a Query ............................................................................................................................ 11
Downloading Queries to Excel and CSV Files................................................................................. 26
Submitting Process Requests .......................................................................................................... 36
Making a Query Distinct ................................................................................................................. 45
Renaming Queries .......................................................................................................................... 57
Deleting Queries............................................................................................................................. 62
Defining Query Selection Criteria ...................................................................................... 65
Entering Selection Criteria .............................................................................................................. 66
Specifying Effective Date Criteria................................................................................................... 76
Applying an Aggregate Function .................................................................................................... 93
Creating a Query Using Having Criteria ........................................................................................ 109
Advanced Query Options .................................................................................................. 118
Defining Expressions.................................................................................................................... 119
Creating Record Hierarchy Joins ................................................................................................... 138
Creating Related Record Joins ...................................................................................................... 146
Creating a Query at Runtime......................................................................................................... 158
Glossary ..................................................................................................................... 174

Page iii
Training Guide
Enterprise Query for FSCM 9.0

Enterprise Query for FSCM 9.0


You store business data in a database to manipulate the data, answer questions, and solve
business problems. However, retrieving a particular information from the database can be a
difficult and time-consuming process.

With PeopleSoft Query, you can easily create queries to access data in the PeopleSoft database.
The queries can be simple or complex based on your requirements. In addition, they can be used
one-time or used repeatedly.

The following are some examples of how you can use PeopleSoft Query:
• Preview queries within Query Manager and Query Viewer, displaying the results set in a grid
for review.
• Run queries from Query Manager or Query Viewer as a separate process, and view the results in
a separate browser window.
• Schedule queries so that they run at predefined times or on recurring schedules.
• Download and format query results in a Microsoft Excel spreadsheet.
• Queries are a primary data source for PeopleSoft Cube Manager, which you can use to build
online analytical processing (OLAP) cubes. PeopleSoft nVision also uses queries as a data
source.

Upon completion of this module, you will be able to:


• Perform basic operations on queries.
• Create queries with selection criteria.
• Create queries using advanced options.

PeopleSoft Query Basics


PeopleSoft Query is a reporting tool that enables data to be written directly on screen, enables
the creation of one-time ad-hoc queries, and automatically generates SQL code. PeopleSoft Query
enables you to identify and extract precise information using visual representations of your
PeopleSoft database, without writing SQL statements.

Upon completion of this lesson, you will be able to:


• Run an existing query using Query Viewer.
• Run an existing query using Query Manager.
• Create a query.
• Download a query to Excel and a CSV file.
• Submit a process request.
• Make a query distinct.
• Rename a query.
• Delete a query.

Running an Existing Query Using Query Viewer


You can run existing queries and view the results in a new browser window using Query Viewer.

Query Viewer enables you to:


• Search for a query.
• Preview a query in the active browser window.
• Run a query and display results in a new browser window.

Page 1
Training Guide
Enterprise Query for FSCM 9.0

• Print a query.
• Schedule a query.

In this topic, you want to review all employees' salary information before you can make decisions
about raising the salary for the outstanding employees. You decide to run a query to view
employees' salary information.
Procedure

Step Action
1. Begin by navigating to the Query Viewer search page.

Click the vertical scrollbar.

Page 2
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 3
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Viewer link.

4. Use the Query Viewer search page to define search criteria for the existing query.
Use a keyword to search for the PERSONAL_PAY_DATA query.

Step Action
5. Enter the desired information into the field. Enter "PERSONAL".
6. Click the Search button.

7. Click the HTML link.

Page 4
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. The PERSONAL_DATA_PAY query appears in a new window. You can view
details for all employees by scrolling down this query results page.

Click the vertical scrollbar.

Page 5
Training Guide
Enterprise Query for FSCM 9.0

Step Action
9. Here you can see the pay details of employees.

Click the Close button.

10. You used Query Viewer to search for and view a query. Query Viewer is a read-only
version of Query Manager, which enables security administrators to easily limit user
access to queries.
End of Procedure.

Running an Existing Query Using Query Manager


You can run a predefined query from your browser and view it online using Query Manager.
You use the Run to HTML option on the Query Manager search page to display the results in a
new browser window.

In addition to previewing and running predefined queries, Query Manager enables you to create
and modify queries.

In this topic, your manager has asked you to provide a list of all the assets available for the New
York Operations business unit. You decide to run a query to get the information you need.
Procedure

Page 6
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Query Manager search page.

Click the vertical scrollbar.

Page 7
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 8
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

4. Use the Query Manager search page to define search criteria for an existing query.
Use a keyword to search for the ASSETS_AVAILABLE query.

Step Action
5. Enter the desired information into the field. Enter "ASSET".
6. Click the Search button.

7. The search results display all the queries beginning with the word ASSET. Scroll
down the page to locate the ASSETS_AVAILABLE query.

Click the vertical scrollbar.


8. Open the ASSETS_AVAILABLE query in a new browser window.

Click the HTML link.

Page 9
Training Guide
Enterprise Query for FSCM 9.0

Step Action
9. Specify the business unit for which you are running the query. The business unit
code for New York Operations is US001.

Enter the desired information into the Business Unit field. Enter "US001".
10. Click the View Results button.

Page 10
Training Guide
Enterprise Query for FSCM 9.0

Step Action
11. The search results display the details of the assets available with the New York
Operations business unit. View the details and close the browser window.

Click the Close button.

12. You successfully ran a predefined query by using Query Manager.


End of Procedure.

Creating a Query
Creating your own queries enables you to select the table or tables from which you need to
retrieve data. You can also select the fields within the tables so that the query displays only the
required data.

This topic provides the basic information of how to select tables and fields for creating queries by
using Query Manager. When creating a query, you can specify query attributes and perform
such tasks as modifying column headings and specifying the sort order.

In this topic, your manager has asked you for a report that displays general information about
assets.
Procedure

Page 11
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 12
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 13
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Click the Create New Query link.
5. The Records page enables you to select the records upon which to base the new
query. You can search for existing records by entering appropriate keywords.

Page 14
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. The first step in creating a query is to open an existing record on which you want to
base the query. You need to create a query by using the ASSET record.

Enter the desired information into the Description field. Enter "ASSET".
7. Click the Search button.

8. The search results display all the records beginning with the word ASSET. Use the
ASSET record to create the query.

Click the Add Record link.

9. The Query page appears, displaying several fields. Use this page to add fields to a
query.

Page 15
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Add the following fields to the query: ASSET_ID, DESCR, ASSET_STATUS,
and PROFILE_ID.

Click the Fields option.

11. Click the Fields option.

12. Click the Fields option.

13. Scroll down the page to view the Profile_ID field.

Click the vertical scrollbar.


14. Click the Fields option.

15. Next, you need to edit the selected fields. Navigate to the Fields page.

Click the vertical scrollbar.

Page 16
Training Guide
Enterprise Query for FSCM 9.0

Step Action
16. Click the Fields tab.

17. The Fields page displays the fields that you selected.
18. In the Record.Fieldname column, notice the letter A before each field name. This
letter is an alias that represents the table from which this field has been extracted.

Page 17
Training Guide
Enterprise Query for FSCM 9.0

Step Action
19. You can click the Reorder / Sort button to display the Edit Field Column Order
page.

Click the Reorder / Sort button.

20. Use the Edit Field Column Order to change the column order for multiple fields.

Page 18
Training Guide
Enterprise Query for FSCM 9.0

Step Action
21. You need the PROFILE_ID field to appear before the ASSET_STATUS field in
your report. Currently, the PROFILE_ID field appears at the fourth position.

Click in the New Order By field.

22. Enter the desired information into the New Order By field. Enter "1".
23. Click in the New Order By field.

24. Enter the desired information into the New Order By field. Enter "2".
25. Click in the New Order By field.

26. Enter the desired information into the New Order By field. Enter "4".
27. Click in the New Order By field.

28. Enter the desired information into the New Order By field. Enter "3".
29. Specify that the data in the PROFILE_ID field is to be in descending order.

Click the Descending option.

Page 19
Training Guide
Enterprise Query for FSCM 9.0

Step Action
30. Click the OK button.

31. Notice that PROFILE_ID field now appears before the ASSET_STATUS field.
32. Notice that D appears in the Ord column, which means that the data in the
PROFILE_ID field will be in descending order.

Step Action
33. You need to change the column heading for the DESCR field.

Click the Edit button.

Page 20
Training Guide
Enterprise Query for FSCM 9.0

Step Action
34. Click the Text option.

35. Click in the Heading Text field.

36. Enter the desired information into the Heading Text field. Enter "Asset Name".
37. Click the OK button.

Page 21
Training Guide
Enterprise Query for FSCM 9.0

Step Action
38. You also need to change the column heading for the PROFILE_ID field.

Click the Edit button.

Page 22
Training Guide
Enterprise Query for FSCM 9.0

Step Action
39. Click the Text option.

40. Click in the Heading Text field.

41. Enter the desired information into the Heading Text field. Enter "Asset Profile ID".
42. Click the OK button.

Page 23
Training Guide
Enterprise Query for FSCM 9.0

Step Action
43. Click the Save button.

Page 24
Training Guide
Enterprise Query for FSCM 9.0

Step Action
44. You can specify a name and description for the new query you created.

Enter the desired information into the *Query field. Enter "ASSETS".
45. Click in the Description field.

46. Enter the desired information into the Description field. Enter "General info about
assets".
47. The Query Type field enables you to specify the type of query as User, Process, or
Role. Standard queries are defined as User types, and queries that use workflow are
defined as Process or Role types.

For this example, retain the default query type.


48. You can specify the query as either Private or Public by selecting an entry in the
Owner field. A Private query can be accessed and modified by only the user who
created the query. However, any user who has access to the query records can run,
modify, or delete a Public query.

For this example, retain the default values.


49. Click the OK button.

Page 25
Training Guide
Enterprise Query for FSCM 9.0

Step Action
50. Next, run the query.

Click the Run tab.

51. The Run page enables you to preview the query you have just created.
52. Finally, view the equivalent SQL statement for the query that you created.

Click the View SQL tab.

53. Review the SQL statement equivalent to the query that you created.
54. You successfully created a query by using Query Manager.

Creating your own queries enables you to select the table or tables from which you
want to execute a query and to design the fields within those tables so that only the
data you want displays.
End of Procedure.

Downloading Queries to Excel and CSV Files


When you run a query from Query Manager or Query Viewer, the results display in a new
browser window. From there, you can download Query results to an Excel spreadsheet, or to a
CSV text file. Then, you can use the features of Excel and CSV format files to format,
summarize, and transfer data.

In this topic, you will download query results to an Excel spreadsheet, and then you will save the
results to your desktop as a CSV file.
Procedure

Page 26
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Query Viewer search page.

Click the vertical scrollbar.

Page 27
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 28
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Viewer link.

4. Use the Query Viewer search page to search for an existing query. Use a keyword
to search for the ASSETS query.

Step Action
5. Enter the desired information into the field. Enter "ASSETS".
6. Click the Perform Search button.

7. The search results display all the queries beginning with the word ASSETS. Open
the ASSETS query in a new browser window.

Click the HTML link.

Page 29
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. The ASSETS query results are displayed in a browser window. You have the choice
of downloading query results in an Excel spreadsheet or a CSV text file. Excel 2000
or later is preferred. For Excel 97, select the CSV Text File link for downloading
large result sets.

Click the Excel SpreadSheet link.

Page 30
Training Guide
Enterprise Query for FSCM 9.0

Step Action
9. The results are displayed in an Excel spreadsheet.

Click the Open button.

Page 31
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Click the Close button.

Page 32
Training Guide
Enterprise Query for FSCM 9.0

Step Action
11. Click the HTML link.

Step Action
12. Now, save the results to your desktop as a CSV text file.

Click the CSV Text File link.

Page 33
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. The File Download window provides you the option of opening the file or saving it
to your computer.

For this example, choose the Save option.

Click the Save button.

Page 34
Training Guide
Enterprise Query for FSCM 9.0

Step Action
14. Click the Save button.

Page 35
Training Guide
Enterprise Query for FSCM 9.0

Step Action
15. You are notified that the download is complete. Close the browser window to return
to PeopleSoft.

Click the Close button.

16. You can download query results from the browser window to an Excel spreadsheet
or to a CSV text file.
End of Procedure.

Submitting Process Requests


You may choose to schedule queries so that they run at predefined times or on recurring
schedules. Query Manager interacts with PeopleSoft Process Scheduler to enable you to
schedule queries. To schedule a query, you must submit a process request. The results of
scheduled queries are routed to PeopleSoft Report Manager.

In this topic, you would like to view the list of assets available at the end of the work day. You
will schedule a query to run at 6:00 p.m. today.
Procedure

Page 36
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Schedule Query page.

Click the vertical scrollbar.

Step Action
2. Click the Reporting Tools link.

Page 37
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Schedule Query link.

4. The Schedule Query search page enables you to search for an existing Run Control
ID or add a new one.
5. A Run Control ID is an identifier that, when paired with your User ID, uniquely
identifies the process you are running. The Run Control ID allows for important
parameters to be available for a process when the process runs. This ensures that
when a process runs in the background it does not have to prompt you for any
additional values. All parameters are stored within the system and associated with
Run Control IDs and User IDs.

Page 38
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. Click the Add a New Value tab.

Page 39
Training Guide
Enterprise Query for FSCM 9.0

Step Action
7. Enter the desired information into the Run Control ID field. Enter
"ASSET_DESCR".
8. Click the Add button.

9. Use the Schedule Query page to enter the request parameters. These parameters
will be used to define the processing rules and data to be included when the process
is run.

Step Action
10. For this example, search for the query named ASSETS.

Enter the desired information into the Query Name field. Enter "ASSETS".
11. Click the Search button.

Page 40
Training Guide
Enterprise Query for FSCM 9.0

Step Action
12. All queries that begin with the word ASSETS are displayed. Notice the description
appears to the right of the query name.

Click the Query Name link.

Page 41
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. The Description field is automatically populated after searching on the query name.

Click the Save button.

14. Next, schedule the query to run at a predefined time.

Click the Run button.

15. Use the Process Scheduler Request page to enter or update parameters, such as
server name and process output format.

Page 42
Training Guide
Enterprise Query for FSCM 9.0

Step Action
16. You must select a Server Name to identify the server on which the process will run.
If you use the same Run Control ID for subsequent processes, the server name that
you last used will default in this field.

Click the Server Name list.

17. Specify that the process will be run on the PSNT server.

Click an entry in the list.

18. Click in the Run Time field.

19. You want this process to run at 6:00 p.m. tonight.

Enter the desired information into the Run Time field. Enter "6:00:00PM".
20. Use the Process Type field to select the type of output you want to generate for this
job. Your four choices are File, Printer, Email, or Web.

For this example, use the default value of Web.


21. Use the Format field to define the output format for the report. The values are
dependent upon the Process Type you have selected.

In this example, the default value is TXT. You need to change it to PDF.

Page 43
Training Guide
Enterprise Query for FSCM 9.0

Step Action
22. Click the *Format list.

23. Click an entry in the list.

24. Click the OK button.

25. Notice the Process Instance number appears. This number helps you identify the
process you have run when you check the status.

Step Action
26. Click the Process Monitor link.

27. Use the Process List page to view the status of submitted process requests.
28. The Run Status column displays that the process is queued. You can click the
Refresh button to update the run status, which will change to Success at 6:00 PM.
29. You successfully submitted a process request to schedule a query to run at a
predefined time.
End of Procedure.

Page 44
Training Guide
Enterprise Query for FSCM 9.0

Making a Query Distinct


You can use the Distinct feature of PeopleSoft to avoid duplicity of fields in a report.

In this topic, you need to retrieve the list of all the accounts for whom an entry in the general
ledger has been made. You want each account ID to appear only once. To do this, you will create
a query based on the LEDGER record and make the query distinct.
Procedure

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 45
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 46
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Click the Create New Query link.
5. The Records page enables you to select the records upon which to base the new
query. Select the criteria to use when searching for records. You can search for
existing records by entering appropriate keywords.

Page 47
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. You need to create a query by using the LEDGER record.

Enter the desired information into the Description field. Enter "LEDGER".
7. Click the Search button.

8. Next, select the fields of the record that you want to add to the query.

Click the Add Record link.

9. The Query page appears, displaying several fields. Use this page to add fields to a
query.

Page 48
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Add the ACCOUNT field to the query.

Click the Fields option.

11. The query name appears as New Unsaved Query until you save the query. Scroll
down the page to access the Save button.

Click the vertical scrollbar.


12. Click the Save button.

Page 49
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. Use the Query field to specify a name and description for the new query you
created.

Enter the desired information into the *Query field. Enter


"LEDGER_DISTINCT".
14. Click in the Description field.

15. Enter the desired information into the Description field. Enter "Distinct Ledger
Query".
16. The Query Type field enables you to specify the type of query as User, Process, or
Role. Standard queries are defined as User types, and queries that use workflow are
defined as Process or Role types.

For this exercise, retain the default query type.


17. You can specify the query as either Private or Public by selecting an entry in the
Owner field. A Private query can be accessed and modified by only the user who
created the query. However, any user who has access to the query records can run,
modify, or delete a Public query.

For this exercise, retain the default values.


18. Click the OK button.

Page 50
Training Guide
Enterprise Query for FSCM 9.0

Step Action
19. Return to the top of the page.

Click the vertical scrollbar.

Page 51
Training Guide
Enterprise Query for FSCM 9.0

Step Action
20. Next, run the query.

Click the Run tab.

21. The Run page enables you to preview the query you have just created.

Page 52
Training Guide
Enterprise Query for FSCM 9.0

Step Action
22. Click the View All link.

23. Click the vertical scrollbar.


24. Notice that there are 16078 rows in the query result. This is because the account IDs
are appearing multiple times.
25. Scroll up the page to access the Fields tab.

Click the vertical scrollbar.


26. Click the Fields tab.

27. The Fields page displays the fields that were selected.

Page 53
Training Guide
Enterprise Query for FSCM 9.0

Step Action
28. Navigate to the Query Properties page to change the query properties to make it
distinct.

Click the Properties link.

Page 54
Training Guide
Enterprise Query for FSCM 9.0

Step Action
29. Click the Distinct option.

30. Click the OK button.

Page 55
Training Guide
Enterprise Query for FSCM 9.0

Step Action
31. Click the Save button.

Page 56
Training Guide
Enterprise Query for FSCM 9.0

Step Action
32. Now, run the query.

Click the Run tab.

Step Action
33. Click the View All link.

34. Click the vertical scrollbar.


35. Notice that the page now has only 804 rows. The account IDs that were appearing
more than once have disappeared from the query results.
36. You have successfully made a query distinct.
End of Procedure.

Renaming Queries
There may be instances when you need to rename an existing query. If your security access
allows, you can change the name of a query from the Query Search Results page.

In this topic, you have been asked to change the name of a query.
Procedure

Page 57
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Query Manager search page.

Click the vertical scrollbar.

Page 58
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 59
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Use a keyword to search for the ASSET_COST_BY_DEPARTMENT query.

Enter the desired information into the field. Enter "ASSET_COST".


5. Click the Search button.

6. You can rename a query from the search results page. Select the query to be
renamed.

Click the Select option.

7. Click the *Action list.

Page 60
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. You can select an option to perform the required operation, such as copy, delete,
move, or rename, on the selected query.

In this example, you need to rename the selected query.

Click an entry in the list.

9. Click the Go button.

10. Use the Rename Queries page to specify the new name for the query.

Step Action
11. Enter the desired information into the New Name field. Enter
"ASSET_COST_BY_DIVISION".
12. Click the OK button.

13. Notice that the query name has changed to ASSET_COST_BY_DIVISION.


14. You successfully renamed a query on the Query Manager search page.
End of Procedure.

Page 61
Training Guide
Enterprise Query for FSCM 9.0

Deleting Queries
You can delete outdated and obsolete queries, if necessary, to organize your company's database
better. Note that the ability to delete or rename a query is dependent upon user roles and user
security.

In this topic, you will delete an existing query. A query has become outdated and is now obsolete.
You have been asked to delete it. Use the Query Manager page to find the query and delete it.
Procedure

Step Action
1. Begin by navigating to the Query Manager search page.

Click the vertical scrollbar.

Page 62
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 63
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Enter the desired information into the field. Enter "ASSETS".
5. Click the Search button.

6. Select the ASSETS_RECEIVED query.

Click the Select option.

7. Click the *Action list.

8. You can select an option to perform the required operation, such as copy, delete,
move, or rename, on the selected query.

In this example, you need to delete the selected query.

Click an entry in the list.

Page 64
Training Guide
Enterprise Query for FSCM 9.0

Step Action
9. Click the Go button.

Step Action
10. The Delete Confirmation page enables you to confirm that you want to delete the
query you have identified.

Click the Yes button.

11. Notice that the ASSETS_RECEIVED query has been deleted.


12. You successfully deleted the ASSETS_RECEIVED query on the Query Manager
search page.
End of Procedure.

Defining Query Selection Criteria


PeopleSoft database stores data in tables made up of columns (fields) and rows (records). This
helps you to identify every individual piece of data that you need to specify. When you create a
query, you select the data you want the system to retrieve by specifying from which columns and
rows to retrieve.

Page 65
Training Guide
Enterprise Query for FSCM 9.0

When you run a query after selecting the fields, the system retrieves the data from every row in
the table or tables. If you want the system to retrieve data from selective rows, you add selection
criteria to the query.

The selection criteria serves as a test that the system applies to each row of data in the tables
related to your query. If the row passes the test, the application retrieves it. If the row does not
pass the test, however, the application does not retrieve the required data.

For example, you need the names of all PeopleSoft customers who are not PeopleSoft employees.
You start by creating a query that retrieves the Name and Company fields from the Customer
table. You can then add a selection criterion that tells PeopleSoft Query to scan for rows in which
the company name is not PeopleSoft. In most cases, a selection criterion compares the value in
one of a row's fields to a reference value. In this example, you would compare the value in the
Company field to the constant value of PeopleSoft.

Upon completion of this lesson, you will be able to:


• Enter selection criteria.
• Specify effective date criteria.
• Apply an aggregate function.
• Create a query using Having criteria.

Entering Selection Criteria


Defining selection criteria enables you to selectively retrieve data. Selection criteria refines your
query by specifying conditions that the retrieved data must meet. You can define selection criteria
for a new or an existing query.

In this topic, you will define criteria to retrieve information about invoices.
Procedure

Page 66
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Query Manager search page.

Click the vertical scrollbar.

Page 67
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 68
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Use a keyword to search for the CRITERIA query.

Enter the desired information into the field. Enter "CRITERIA".


5. Click the Search button.

6. Click the Edit link.

7. The Fields page displays the fields in the CRITERIA query.

Page 69
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. Before adding the criteria to the query, run the query to see the data it retrieves.

Click the Run tab.

9. The Run page enables you to preview the query.


10. The Run page displays all the rows in the table. This is because no criterion is
defined for this query currently. However, you only want to see specific records. To
do this, you need to create criteria for specific fields.

Click the Criteria tab.

11. The Criteria page enables you to view any existing criteria for your query and, if
necessary, add or modify selection criteria for the query.

Page 70
Training Guide
Enterprise Query for FSCM 9.0

Step Action
12. In this example, you need to add criteria to the query.

Click the Add Criteria button.

13. The Edit Criteria Properties page enables you to define the selection criteria for
the query. You need to select the expression to be used as a comparison value.
PeopleSoft Query will insert this expression into the SQL for the query.

Page 71
Training Guide
Enterprise Query for FSCM 9.0

Step Action
14. Click the Select Record and Field button.

Page 72
Training Guide
Enterprise Query for FSCM 9.0

Step Action
15. You need to retrieve information about the invoices created by sales persons 001
and 005. Therefore, locate the SALES PERSON - Sales Person record.

Click the vertical scrollbar.


16. Click the Long Description link.

Step Action
17. The Condition Type determines how PeopleSoft Query compares the values of the
first expression to the second expression.

In this example, you want to display data for the sales persons 001 and 005.
Therefore, you will use the in list value.

Click the *Condition Type list.

18. Click an entry in the list.

Page 73
Training Guide
Enterprise Query for FSCM 9.0

Step Action
19. Next, specify the IDs for sales persons.

Click the Select List Members button.

Step Action
20. Enter the desired information into the Value field. Enter "001".
21. Click the Add Value button.

22. Enter the desired information into the Value field. Enter "005".
23. Click the Add Value button.

24. The selected sales persons IDs appear in the List Members grid.

Click the OK button.

Page 74
Training Guide
Enterprise Query for FSCM 9.0

Step Action
25. Click the OK button.

Page 75
Training Guide
Enterprise Query for FSCM 9.0

Step Action
26. Click the Save button.

Step Action
27. Finally, view the results of the query.

Click the Run tab.

28. The results display all invoices that are created by sales persons 001 and 005.
29. You successfully created a query with criteria properties.
End of Procedure.

Specifying Effective Date Criteria


Effective-dated tables have record definitions that include the Effective Date (EFFDT) field. This
field, used throughout PeopleSoft applications, provides a historical perspective, allowing you to
see how the data has changed over time.

When you are using a PeopleSoft application for day-to-day processing, you usually want the
application to give you the currently effective rows of data. Essentially, the application must
return the row in which the effective date is less than or equal to the current date. You do not

Page 76
Training Guide
Enterprise Query for FSCM 9.0

need to see the history rows, which are no longer accurate, nor do you need to see future-dated
rows, which are not yet in effect.

When you are querying an effective-dated table, you may want to view some rows that are not
currently in effect or, you may want to view all the rows, regardless of their effective dates.
Additionally, you may want to view only the rows that were effective as of a specific date.

In this topic, you have been asked to run a query that lists the current crediting options for your
customers. Your manager has requested that the query be run for specific effective dates. The first
query should list the crediting options for customers between two specific dates. The second
query should be for all other dates.
Procedure

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 77
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 78
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Click the Create New Query link.
5. The Records page enables you to select the records upon which to base the new
query.

Page 79
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. In this example, you will use the existing CUST_CREDIT record for the query.

Enter the desired information into the Description field. Enter "CUST_CREDIT".
7. Click the Search button.

8. Click the Add Record link.

Page 80
Training Guide
Enterprise Query for FSCM 9.0

Step Action
9. A dialog box appears that indicates that the effective date criteria has been
automatically added to this effective dated record.

Click the OK button.

10. The Query page lists all the fields for the selected record. You use his page to select
the fields that you want to use in the query.

Page 81
Training Guide
Enterprise Query for FSCM 9.0

Step Action
11. In this example, you want to use the following fields: CUST_ID, EFFDT,
CR_LIMIT, CR_LIMIT_RANGE, CR_LIMIT_CORP, RISK_CODE, and
CREDIT_CLASS.

Click the Fields option.

12. Click the Fields option.

13. Click the Fields option.

14. Click the Fields option.

15. Click the Fields option.

16. Click the Fields option.

17. Click the Fields option.

Page 82
Training Guide
Enterprise Query for FSCM 9.0

Step Action
18. Now, view the fields of the query on the Fields page.

Click the Fields tab.

19. On the Fields page, you can change the field properties by clicking on the
appropriate Edit button. You can also change the sort order of the data by clicking
on the Sort Order button.

Page 83
Training Guide
Enterprise Query for FSCM 9.0

Step Action
20. For this example, specify that the data will be sorted by credit limit first, and then by
corporate credit limit.

Click the Reorder / Sort button.

21. Use the Edit Field Ordering page to change the sort and order the data.

Page 84
Training Guide
Enterprise Query for FSCM 9.0

Step Action
22. Click in the New Order By field.

23. Enter the desired information into the New Order By field. Enter "1".
24. Click in the New Order By field.

25. Enter the desired information into the New Order By field. Enter "2".
26. Click the OK button.

Page 85
Training Guide
Enterprise Query for FSCM 9.0

Step Action
27. You next need to add criteria to the query.

Click the Criteria tab.

28. The Criteria page enables you to view any existing criteria for your query, and if
necessary add or modify selection criteria for the query.

Page 86
Training Guide
Enterprise Query for FSCM 9.0

Step Action
29. When you choose a record that has EFFDT as a key field, Query Manager
automatically creates default criteria. You want to edit this field to define specific
dates.

Click the Edit button.

30. You use the Edit Criteria Properties page to enter or modify selection criteria for
the query.
31. The Condition Type drop-down lists the operators available for the Effective Date
field. The value selected for this field determines how PeopleSoft Query will
compare values for expressions.

Note that the effective date operators always return a single effective-dated row. For
example, Eff Date <= returns the one row whose EFFDT value is most recent.
Whereas, a not greater than operator returns the currently active row and all history
rows.

Page 87
Training Guide
Enterprise Query for FSCM 9.0

Step Action
32. In this example, you have been asked to retrieve the customer credit information
between January 1 and December 31, 2001.

Click the *Condition Type list.

33. Click an entry in the list.

34. If you choose one of the comparison options, choose to compare each row's
effective date against defined dates.

Select a Constant option when you want to see the rows that were effective as of a
specific date.
35. Select a Field option when you want to see the rows that were effective at the same
time as some other record.

For example, if you are reviewing the list of products on a customer order, you will
want to see the products that were effective on the date of the order.
36. Select an Expression option if you want to prompt users for an effective date when
they run the query.

For this example, you will use the default Constant-Constant option.
37. Click in the *Date field.

Page 88
Training Guide
Enterprise Query for FSCM 9.0

Step Action
38. Enter the desired information into the *Date field. Enter "01/01/2001".
39. Click in the *Date 2 field.

40. Enter the desired information into the *Date 2 field. Enter "12/31/2001".
41. Click the OK button.

Step Action
42. Click the Save button.

Page 89
Training Guide
Enterprise Query for FSCM 9.0

Step Action
43. Specify a name for the query.

Enter the desired information into the *Query field. Enter "CREDIT".
44. Click in the Description field.

45. Specify a description for the query.

Enter the desired information into the Description field. Enter "Crediting options
for customers".
46. Use the Query Type field to specify the type of query. Standard queries are
designated as User queries. Workflow queries are either Process or Role queries.

For this example, use the default.


47. Use the Owner field to specify the access to this query. Private indicates that only
the user ID that created the query can open, run, modify, or delete the query. Public
indicates that any user with access to the records used by the query can run, modify,
or delete the query.

For this example, you want to make it a private query.


48. Click the OK button.

Page 90
Training Guide
Enterprise Query for FSCM 9.0

Step Action
49. Next, run the query.

Click the Run tab.

50. The Run page enables you to preview the query. A list of customer whose credit
payment is due between January 1 and December 31, 2001 is displayed.
51. You have created a query that satisfies the effective date criteria. Now, redefine this
query so that it includes customer whose credit payment is due on all other dates.

Click the Criteria tab.

Page 91
Training Guide
Enterprise Query for FSCM 9.0

Step Action
52. Click the Logical list.

53. Click an entry in the list.

Page 92
Training Guide
Enterprise Query for FSCM 9.0

Step Action
54. Click the Run tab.

55. Now, the Run page displays the list of customers whose credit payment is due on all
dates other than the year 2001.
56. In this topic, you learned to create an effective-dated query. This query is used to
retrieve data for a specific period from an effective-dated table.
End of Procedure.

Applying an Aggregate Function


An aggregate function is a special type of operator that returns a single value based on multiple
rows of data. When your query includes one or more aggregate functions, PeopleSoft Query
collects related rows and displays a single row that summarizes their contents.

For example, suppose you create an Order query that includes Customer ID and Amount fields
for each item ordered. You want to find out how much each customer has ordered. Without any
aggregate functions, this query would return one row for every customer and amount
combination. If you apply the aggregate function Sum to the Amount field, the query can be
narrowed down to display one row that summarizes the amount for each customer.

When you apply an aggregate function to a field, you are redefining how PeopleSoft Query uses
the field throughout the query. Essentially, the application replaces the field, wherever it occurs,
with the results of the function. If you select the field as a display column, PeopleSoft Query
displays the aggregate values. However, if you use the field as an order by column, the
application organizes the results in an order that is based on the aggregate values.

Page 93
Training Guide
Enterprise Query for FSCM 9.0

In this topic, you need to create a query to display the total number of invoices in a table. To this
query, you will add the Count aggregate function. The query will return a single row of data
displaying the total number of rows in the table. Then, you will display the invoice count
categorized by the invoice types.
Procedure

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 94
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 95
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Click the Create New Query link.
5. The Records page enables you to select the records upon which to base the new
query. You can search for existing records by entering appropriate keywords.

Page 96
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. You need to create a query based on the Bill Header record. Enter a key word to
search for this record.

Enter the desired information into the Description field. Enter "BI_HDR".
7. Click the Search button.

8. To create a query based on the BI_HDR record, navigate to the Query page for this
record.

Click the Add Record link.

9. The Query page appears, displaying several fields. Use this page to add fields to a
query.

Page 97
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Add the INVOICE field to the query.

Click the Fields option.

Page 98
Training Guide
Enterprise Query for FSCM 9.0

Step Action
11. Next, you need to modify the INVOICE field on the Fields page.

Click the Fields tab.

12. The Fields page enables you to view how fields are selected for output, view the
properties of each field, and change headings, order-by numbers, and aggregate
values.

Page 99
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. Click the Edit button.

Page 100
Training Guide
Enterprise Query for FSCM 9.0

Step Action
14. You want to change the heading text of the INVOICE field to Count Invoice.

Click the Text option.

15. Click in the Heading Text field.

16. Enter the desired information into the Heading Text field. Enter "Count Invoice".
17. Add an aggregate function to the field.

In this example, you want to display the total number of invoices in the BI_HDR
table.

Click the Count option.

18. Click the OK button.

Step Action
19. Click the Save button.

Page 101
Training Guide
Enterprise Query for FSCM 9.0

Step Action
20. Enter the desired information into the *Query field. Enter "INV_NUM".
21. Click in the Description field.

22. Enter the desired information into the Description field. Enter "Invoice Number".
23. Click the OK button.

Page 102
Training Guide
Enterprise Query for FSCM 9.0

Step Action
24. Next, run the query.

Click the Run tab.

25. The Run page enables you to preview the query.

Page 103
Training Guide
Enterprise Query for FSCM 9.0

Step Action
26. Click the horizontal scrollbar.

27. Notice the total count of the invoices in the BI_HDR table, which is 313.

Page 104
Training Guide
Enterprise Query for FSCM 9.0

Step Action
28. Now, display the invoice count categorized by the invoice types.

Click the Query tab.

Page 105
Training Guide
Enterprise Query for FSCM 9.0

Step Action
29. Add the INVOICE_TYPE field to the query.

Click the Fields option.

Page 106
Training Guide
Enterprise Query for FSCM 9.0

Step Action
30. Click the Fields tab.

Page 107
Training Guide
Enterprise Query for FSCM 9.0

Step Action
31. Click the Edit button.

Step Action
32. Click the Short option.

33. Click the OK button.

Page 108
Training Guide
Enterprise Query for FSCM 9.0

Step Action
34. Finally, run the query.

Click the Run tab.

35. Notice that the total number of invoices, which was 313, has been categorized by
invoice types.
36. You successfully added an aggregate function to a query.
End of Procedure.

Creating a Query Using Having Criteria


With SQL, a Having clause is similar to a Where clause for rows of data that have been
aggregated into a single row of output. The system evaluates Where clauses by looking at the
individual table rows before they are grouped by the aggregate function, and then it evaluates
Having clauses after applying the function. Therefore, if you want to check the value returned by
the function, you must define Having criteria.

For example, suppose you need a list of the business units in which the minimum amount due
with customers is greater than $100,000. In this case, you first use the aggregate function to group
the business units based on the amount due. Then, you use the Having clause to obtain the list of
the business units in which the minimum amount due is greater than $100,000.

In this topic, your manager has asked you to selectively define the query results of invoice types.
The results should include only those invoice types whose count of invoices is greater than 6. To
accomplish this task, you will apply Having criteria.

Page 109
Training Guide
Enterprise Query for FSCM 9.0

Procedure

Step Action
1. Begin by navigating to the Fields page.

Click the vertical scrollbar.

Page 110
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 111
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. You need to search for the INV_NUM query.

Enter the desired information into the field. Enter "INV_NUM".


5. Click the Search button.

6. Click the Edit link.

7. The Fields page displays the fields in the INV_NUM query.

Page 112
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. You need to refine the query with a Having clause.

Click the Having tab.

9. Use the Having page to view any existing having criteria for a query or add or
modify having criteria for the query.

Page 113
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. In this example, you need to add Having criteria.

Click the Add Having Criteria button.

11. The Edit Having Criteria Properties page enables you to define the having criteria
for the query. Select the field on which you want to define the criteria.

Page 114
Training Guide
Enterprise Query for FSCM 9.0

Step Action
12. Click the Select Record and Field button.

Page 115
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. Click the Long Description link.

Step Action
14. The condition type determines how Query Manager compares the values of the first
expression to the second expression.

In this example, you want to retrieve the invoice types whose invoice count is
greater than 6.

Click the *Condition Type list.

15. Click an entry in the list.

16. Click in the Constant field.

17. Enter the desired information into the Constant field. Enter "6".
18. Click the OK button.

Page 116
Training Guide
Enterprise Query for FSCM 9.0

Step Action
19. Click the Save button.

Page 117
Training Guide
Enterprise Query for FSCM 9.0

Step Action
20. Now, run the query.

Click the Run tab.

21. The Run page enables you to preview the query.

Step Action
22. Click the horizontal scrollbar.

23. Notice that the invoice types whose count of invoices is greater than 6 are displayed.

In this example, the preferences have been set to automatically update the query
when you click the Run tab. Had the results not been shown you would have had to
click the Rerun Query link.
24. You successfully defined Having criteria for a query.
End of Procedure.

Advanced Query Options


PeopleSoft Query enables you to perform advanced operations, such as expression and joins, on
the data. Expressions are calculations that PeopleSoft Query performs as part of a query. You use

Page 118
Training Guide
Enterprise Query for FSCM 9.0

them when you must calculate a value that PeopleSoft Query does not provide by default. For
example, to add the values from two fields together or to multiply a field value by a constant.

Query Manager also enables you to create queries that include multiple-table joins. Joins retrieve
data from more than one table, presenting the data as if it came from one table. A PeopleSoft
query links the tables, based on common columns, and links the rows in two tables by common
values in the shared columns.

Upon completion of this lesson, you will be able to:


• Define expressions for a query.
• Create a record hierarchy join.
• Create a related record join.
• Create a query at runtime.

Defining Expressions
Expressions are calculations that PeopleSoft Query performs as part of a query. Use them when
you must calculate a value that PeopleSoft Query does not provide by default (for example, to
add the values from two fields together or to multiply a field value by a constant). An expression
can be treated as a field query. When selected for output, you can change its column heading or
sort it.

In this topic, you are going to create a query that displays the asset value and calculates the total
depreciation based on the depreciation rate and the number of years for each asset. You will first
retrieve the assets whose year of transaction is 2000. Then, you will create an expression to
determine how much the value of an asset has depreciated in three years. The expression
multiplies the asset cost by rate of depreciation and the number of years, which is 3 in this case.
Create a query, then modify it by defining its expressions and preview the report.
Procedure

Page 119
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 120
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 121
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Click the Create New Query link.
5. You use the Records page to create a query. By default, the query name is New
Unsaved Query until you change it on the Properties page, which you will do later
in this example.

Page 122
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. You need to use the ADV_DEPR_AMT_VW record to create the query.

Enter the desired information into the Description field. Enter "ADV_DEPR".
7. Click the Search button.

8. The ADV_DEPR_AMT_VW record appears in the search result. Use this record to
create the query.

Click the Add Record link.

9. In Query Manager, you can use expressions in two ways:


• As comparison values in selection criteria.
• As columns in the query output.

The Query page displays the fields in the ADV_DEPR_AMT_VW record. Use this
page to select the fields you want to add to a query output, or to deselect fields to
remove them from a query output.

Page 123
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Add the fields BUSINESS_UNIT, ASSET_ID, TRANS_DT, and COST to the
query.

Click the Fields option.

11. Click the Fields option.

12. Click the Fields option.

13. Click the vertical scrollbar.


14. Click the Fields option.

15. After you define the fields for the new query, you can edit the fields on the Fields
page.

Click the vertical scrollbar.

Page 124
Training Guide
Enterprise Query for FSCM 9.0

Step Action
16. Click the Fields tab.

17. The Fields page enables you to view how fields are selected for output, view the
properties of each field, and change headings, order-by numbers, and aggregate
values.
18. Before creating the expression, you need to retrieve the list of assets whose
transaction year is 2001. Use a criterion to retrieve such records.

Click the Criteria tab.

19. The Criteria page enables you to view any existing criteria for a query and, if
necessary, add or modify selection criteria for a query.

Page 125
Training Guide
Enterprise Query for FSCM 9.0

Step Action
20. Click the Add Criteria button.

Page 126
Training Guide
Enterprise Query for FSCM 9.0

Step Action
21. Select the field for which you want to specify the criteria.

Click the Select Record and Field button.

Step Action
22. You need to use the TRANS_DT field to define the criteria.

Click the A.TRANS DT - Transaction Date link.

Page 127
Training Guide
Enterprise Query for FSCM 9.0

Step Action
23. The Condition Type field enables you to specify how Query Manager compares the
values of the first expression to the second expression.

Click the *Condition Type list.

24. Click the vertical scrollbar.

25. Click an entry in the list.

26. Use the Expression 2 region to specify the beginning and end dates of the period.

Click in the *Date field.

27. Enter the desired information into the *Date field. Enter "01/01/2000".
28. Click in the *Date 2 field.

29. Specify the end date of the period.

Enter the desired information into the *Date 2 field. Enter "12/31/2000".

Page 128
Training Guide
Enterprise Query for FSCM 9.0

Step Action
30. Click the OK button.

31. The criterion indicates the transaction dates of the assets.

Step Action
32. Next, create an expression to calculate the depreciation of assets.

Click the Expressions tab.

33. The Expressions page enables you to add or delete expressions that you are using as
part of a query.

Page 129
Training Guide
Enterprise Query for FSCM 9.0

Step Action
34. In this example, you are adding an expression to determine how much each asset has
depreciated. Open the Edit Expression Properties page, where you can select
expression types.

Click the Add Expression button.

Page 130
Training Guide
Enterprise Query for FSCM 9.0

Step Action
35. Select the type of the value that this expression returns from the drop-down list.

In this example, select Number.

Click the *Expression Type list.

36. Click an entry in the list.

37. Click in the Length field.

38. Enter the maximum length of the string. Be sure the number is big enough because it
will truncate the number if you do not reserve enough spaces.

Enter the desired information into the Length field. Enter "10".
39. If you are entering an aggregate function, such as SUM, AVG, or COUNT, select
the Aggregate Function option.

Click the Aggregate Function option.

40. Click in the Decimals field.

Page 131
Training Guide
Enterprise Query for FSCM 9.0

Step Action
41. If you entered Number or Signed Number as the expression type, enter the number
of digits to the right of the decimal.

Enter the desired information into the Decimals field. Enter "2".
42. Click in the Expression Text field.
43. If you know the field name, you can enter it in the Expression Text field. If you
mistype the field, you will receive an error message. Alternatively, you can click the
Add Field link to add a field to this expression.

Remember to precede the field name with an alias.

Enter the desired information into the Expression Text field. Enter "A.cost*3*0.1".
44. Click the OK button.

45. You maintain expressions on the Expressions page. You can:


• View all expressions.
• Modify expressions by clicking the Edit button.
• Delete expressions by clicking the Delete Button.

Page 132
Training Guide
Enterprise Query for FSCM 9.0

Step Action
46. To display the result of the calculation in the query's output, select the expression for
output and change the heading.

Click the Use as Field link.

Step Action
47. Edit the heading text for the A.cost*3*0.1 field.

Click the Edit button.

Page 133
Training Guide
Enterprise Query for FSCM 9.0

Step Action
48. Click in the Heading Text field.

49. It is important that the heading text for the new field is descriptive and defines what
data is displayed in that column of the table.

Enter the desired information into the Heading Text field. Enter "Depreciation".
50. Click the OK button.

Page 134
Training Guide
Enterprise Query for FSCM 9.0

Step Action
51. Notice the heading text for A.cost*3*0.1 has been updated.

Click the Properties link.

Page 135
Training Guide
Enterprise Query for FSCM 9.0

Step Action
52. PeopleSoft populates the Query Name field based on the name entered on the
Query Properties page.

Enter the desired information into the *Query field. Enter "ASSET_DEPR".
53. Click in the Description field.

54. PeopleSoft populates the Description field based on the description entered on the
Query Properties page.

Enter the desired information into the Description field. Enter "Asset
Depreciation".
55. Use the Query Type field to specify the type of query. Standard queries are
designated as User queries. Workflow queries are either Process or Role queries.

For this example, use the default.


56. Use the Owner field to specify the access to this query. Private indicates that only
the user ID that created the query can open, run, modify, or delete the query. Public
indicates that any user with access to the records used by the query can run, modify,
or delete the query.

For this example, you want to make it a private query.


57. Click the OK button.

Page 136
Training Guide
Enterprise Query for FSCM 9.0

Step Action
58. Click the Save button.

Page 137
Training Guide
Enterprise Query for FSCM 9.0

Step Action
59. Run the query.

Click the Run tab.

60. The Run page enables you to preview the query.


61. Notice the expression you just created is now a field on the table.

In this example, the preferences have been set to automatically update the query
when you click the Run tab. Had the results not been shown you would have had to
click the Rerun Query link.
62. In this topic, you learned to define expressions for your query.
End of Procedure.

Creating Record Hierarchy Joins


A record hierarchy joins a Parent table to a Child table. A Child table is a table that uses all the
same key fields as its parent, plus one or more additional keys.

Your company is going to buy a new building and it needs some financing options from all banks.
You are asked to create a report of available banks that are doing business with your company. In
the report, list all the basic information about these banks such as names, types, codes, statuses,
and branch names.

Page 138
Training Guide
Enterprise Query for FSCM 9.0

In this topic, you will create a query using the record hierarchy join to retrieve specific bank
account information. Remember to change the heading text and order of the columns to make
your report look neat.
Procedure

Step Action
1. A query created by using the BANK_CD_TBL table is displayed for you. Run the
query by clicking the Run tab.

Click the Run tab.

2. The Run page enables you to preview the query.


3. Notice that the query displays information about the banks. In addition, you want to
see the status of bank accounts and the location of branches. To retrieve this
information, you need to go to the Query page and join the tables
BANK_ACCT_TBL and BANK_CD_TBL.

Click the Query tab.

4. The Query page appears. Use this page to add fields to a query.

Page 139
Training Guide
Enterprise Query for FSCM 9.0

Step Action
5. Click the Show Fields button.

6. To join tables that share a common high-level key, use the Hierarchy Join link.

You need to join the BANK_CD_TBL and BANK_ACCT_TBL tables.

Click the Hierarchy Join link.

Page 140
Training Guide
Enterprise Query for FSCM 9.0

Step Action
7. Click the BANK_ACCT_TBL - Bank Accounts link.

Page 141
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. Now, select the fields that you want to include in the query.

Click the Fields option.

9. Click the Fields option.

Step Action
10. Click the Fields tab.

11. On the Fields page, you can edit, delete, or add criteria to each field.

Page 142
Training Guide
Enterprise Query for FSCM 9.0

Step Action
12. Edit the properties of the B.ACCT_STATUS - Account Status field.

Click the Edit button.

Page 143
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. Specify the translate value of the account status as short.

Click the Short option.

14. Click the OK button.

Page 144
Training Guide
Enterprise Query for FSCM 9.0

Step Action
15. Notice that S appears in the XLAT column. This indicates that a short translate
value of the ACCT_STATUS field will appear on the report.

Click the Save button.

Page 145
Training Guide
Enterprise Query for FSCM 9.0

Step Action
16. Click the Run tab.

17. Notice that the query results now show the status of bank accounts and the location
of branches.
18. You learned to join data from two tables by using the Record Hierarchy Join.
End of Procedure.

Creating Related Record Joins


Joins retrieve data from more than one table, presenting the data as if it came from one table. In a
related record join, you can automatically join two records based on a relationship that has been
predefined in the record designer. For example, if a field has a prompt table defined for it, then
PeopleSoft Query Manager displays a join link to the right of the shared field.

Consider this scenario: After finishing the Bank CD Join report, you realized that the data on the
Branch column does not give you enough information you need to recognize in which country the
banks are located. Your goal is to use the Related Record Join feature to retrieve the information
that tells you the country where the banks are located. To do this, you will have to join two
related records.
Procedure

Page 146
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. Begin by navigating to the Records page.

Click the vertical scrollbar.

Page 147
Training Guide
Enterprise Query for FSCM 9.0

Step Action
2. Click the Reporting Tools link.

Page 148
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Query Manager link.

Step Action
4. Locate the first record to be joined.

Enter the desired information into the field. Enter "BNK_JOIN".


5. Click the Search button.

6. Click the Edit link.

7. The Fields page displays the fields of the BNK_JOIN query.

Page 149
Training Guide
Enterprise Query for FSCM 9.0

Step Action
8. Display the Query page that lists the fields associated with the record.

Click the Query tab.

9. The Query page enables you to add fields to your query.

Page 150
Training Guide
Enterprise Query for FSCM 9.0

Step Action
10. Click the Show Fields button.

11. The fields BANK_CD, DESCR, BANK_TYPE are selected. You can add more
fields if you want to include them in the BANK_CD_TBL record.

Click the vertical scrollbar.


12. Click the Join COUNTRY TBL-Countries link.

Page 151
Training Guide
Enterprise Query for FSCM 9.0

Step Action
13. You are prompted to select a join type. For this example, use the default Standard
Join.

Click the OK button.

Page 152
Training Guide
Enterprise Query for FSCM 9.0

Step Action
14. Select the fields of the COUNTRY_TBL record that you want to include in the join.

Click the Fields option.

Page 153
Training Guide
Enterprise Query for FSCM 9.0

Step Action
15. Next, edit the DESCR - Description field on the Fields page.

Click the Fields tab.

16. On the Fields page, you can edit, delete, or add criteria to each field.

Page 154
Training Guide
Enterprise Query for FSCM 9.0

Step Action
17. Edit the properties for the DESCR - Description field.

Click the Edit button.

Page 155
Training Guide
Enterprise Query for FSCM 9.0

Step Action
18. Change the heading text of the DESCR - Description field.

Click the Text option.

19. Click in the Heading Text field.

20. Enter the desired information into the Heading Text field. Enter "Country".
21. Click the OK button.

Page 156
Training Guide
Enterprise Query for FSCM 9.0

Step Action
22. Click the Save button.

Page 157
Training Guide
Enterprise Query for FSCM 9.0

Step Action
23. Next, run the query you created.

Click the Run tab.

24. The Run page enables you to preview the query. Notice that the Country
information is displayed for every field.
25. In a related record join, you can automatically join two records based on a
relationship that has been predefined by the record designer.
End of Procedure.

Creating a Query at Runtime


Adding a runtime prompt to a query enables you to specify search criteria when you run the
query. A runtime prompt requires the user to specify a value for a specific field when the query is
executed. The query then displays only those rows of information that contain the value specified
at the prompt. Therefore, runtime prompts enable end users to control the results of a predefined
query.

When you run a query with a prompt, a dialog box appears for you to specify the required value.
Enter the value into the text box. The query uses the value that you enter as the comparison value
for the criterion that included the prompt.

If the field for which you are prompting has an associated prompt table (even if it is the Translate
table), the Edit Table drop-down list box shows its name.

In this topic, you will create a report containing vendor address information that prompts for a
specific country and address sequence at runtime.
Procedure

Page 158
Training Guide
Enterprise Query for FSCM 9.0

Step Action
1. This example begins with a new query already selected. Begin by navigating to the
Criteria page.

Click the Criteria tab.

2. The Criteria page enables you to view any existing criteria for your query, and if
necessary, add or modify selection criteria for the query.

Page 159
Training Guide
Enterprise Query for FSCM 9.0

Step Action
3. Click the Add Criteria button.

4. When you want to use the prompt at runtime, you use the Edit Criteria Properties
page and set up a row of criteria using the prompt.

Page 160
Training Guide
Enterprise Query for FSCM 9.0

Step Action
5. Add the prompt criteria for the COUNTRY field.

Click the Select Record and Field button.

Page 161
Training Guide
Enterprise Query for FSCM 9.0

Step Action
6. Click the COUNTRY -Country link.

Page 162
Training Guide
Enterprise Query for FSCM 9.0

Step Action
7. Click the Prompt option.

8. If you click New Prompt, you are taken to the Edit Prompt Properties page, on
which you can create the prompt.

Click the New Prompt link.

9. Use the Edit Prompt Properties page to verify or select the parameters for the
Runtime prompt.
10. You can click the magnifying glass to select a prompt field. When accessing this
page from the Edit Criteria Properties page, the field is already populated based
on the field selected on that page.

After you select a field, it shows the name of the field. Query looks to the record
definition for information about this field and fills out the rest of the dialog box
based on its properties.

Page 163
Training Guide
Enterprise Query for FSCM 9.0

Step Action
11. You can modify the heading type is desired:
• Rft Long: The long field name from the record definition.
• Rft Short: The short field name from the record definition.
• Text: User defined.

For this example, choose Rft Long.

Click the *Heading Type list.

12. Click an entry in the list.

13. Use the Edit Type field to define the type of field edit for the specified field.
PeopleSoft recommends that you use the same Edit Type that is used in the field's
record definition so that the edit type is consistent throughout PeopleTools.
14. If the Edit Type is Prompt Table, the value in the list box specifies the prompt
table to use. If the Edit Type is Translate Table, the value in the Field list box
determines the values used. Query assumes that the specified field has Translate
Table values associated with it, and that the field is identified as a Translate Table
field in its record definition.
15. Click the OK button.

Page 164
Training Guide
Enterprise Query for FSCM 9.0

Step Action
16. The prompt is now represented on the Edit Criteria Properties page as a bind
variable, :1.

Click the OK button.

Step Action
17. Add the prompt criteria for the Address Sequence Number field.

Click the Add Criteria button.

Page 165
Training Guide
Enterprise Query for FSCM 9.0

Step Action
18. Click the Select Record and Field button.

Page 166
Training Guide
Enterprise Query for FSCM 9.0

Step Action
19. Click the Address Sequence Number link.

Step Action
20. Click the Prompt option.

21. Click the New Prompt link.

Page 167
Training Guide
Enterprise Query for FSCM 9.0

Step Action
22. Click the *Heading Type list.

23. Click an entry in the list.

24. Click the OK button.

Page 168
Training Guide
Enterprise Query for FSCM 9.0

Step Action
25. The prompt is now represented on the Edit Criteria Properties page as a bind
variable, :2.

Click the OK button.

Page 169
Training Guide
Enterprise Query for FSCM 9.0

Step Action
26. Click the Save button.

Page 170
Training Guide
Enterprise Query for FSCM 9.0

Step Action
27. Enter the desired information into the *Query field. Enter "Address".
28. Click in the Description field.

29. Enter the desired information into the Description field. Enter "Address per
country/sequence".
30. Use the Query Type field to specify the type of query. Standard queries are
designated as User queries. Workflow queries are either Process or Role queries.

For this example, use the default.


31. Use the Owner field to specify the access to this query. Private indicates that only
the user ID that created the query can open, run, modify, or delete the query. Public
indicates that any user with access to the records used by the query can run, modify,
or delete the query.

For this example, you want to make it a private query.


32. Click the OK button.

Page 171
Training Guide
Enterprise Query for FSCM 9.0

Step Action
33. Finally, view the results of the query.

Click the Run tab.

Step Action
34. Notice that you are prompted to enter values before the query is run.

For this example, run the query for Country USA and Address Sequence Number 1.

Enter the desired information into the Country field. Enter "USA".
35. Click in the Address Sequence Number field.

36. Enter the desired information into the Address Sequence Number field. Enter "1".
37. Click the OK button.

38. The Run page enables you to preview the query. Notice that only vendors in the
USA that have an Address Sequence Number equal to 1 are displayed.

Page 172
Training Guide
Enterprise Query for FSCM 9.0

Step Action
39. If you ever need to modify the prompt criteria, you can use the Prompts page to do
that.

Click the Prompts tab.

40. Use the Prompts page to add, edit, and delete prompt criteria.
41. You have successfully created a query with runtime prompts.
End of Procedure.

Page 173
Training Guide
Enterprise Query for FSCM 9.0

Glossary
CSV CSV is an acronym for Comma-separated Values format. Data is stored in
text form, with data items separated by commas. CSV format files are
generally used for exchanging data with spreadsheets and relational
databases.
Expression User-defined calculations that PeopleSoft Query performs as part of a query.
SQL A query language created for accessing and manipulating data in databases.
Query Manager generates SQL (Structured Query Language) based on your
query definition. You don't have to know SQL to create a query in
PeopleSoft.

Page 174

Potrebbero piacerti anche