Sie sind auf Seite 1von 31

WHITE PAPER Using Oracle Discoverer in HRMS Payroll Balance Examples

Author: Creation Date: Last Updated: Version: Kevin Hicks 8th September 1999 3rd November 1999 4.0

Using Oracle Discoverer in HRMS - Payroll Balance Examples Copyright Oracle Corporation 1999 All rights reserved. Printed in the U.S.A. Primary Author: Kevin Hicks Contributors: Bill Dray, Bill Kerr, Andrew Mcghee

This software was not developed for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It is the customer's responsibility to take all appropriate measures to ensure the safe use of such applications if the programs are used for such purposes. This software/documentation contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software is prohibited. If this software/documentation is delivered to a U.S. Government Agency of the Department of Defense, then it is delivered with Restricted Rights and the following legend is applicable: Restricted Rights Legend Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013, Rights in Technical Data and Computer Software (October 1988). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. If this software/documentation is delivered to a U.S. Government Agency not within the Department of Defense, then it is delivered with Restricted Rights", as defined in FAR 52.227-14, Rights in Data - General, including Alternate III (June 1987). The information in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error free. No part of this document may be reproduced or transmitted in any form or by any means electronic or mechanical, for any purpose without the express written permission of Oracle Corporation.
Oracle Human Resources, Oracle Discoverer, Discoverer, End User Layer and PL/SQL are trademarks of Oracle Corporation.

All other products or company names are used for identification purposes only, and may be trademarks of their respective owners.

Contents

Introduction.............................................................................................................................................4 Uses of Discoverer within HRMS ...........................................................................................................6 What is Discoverer? ..............................................................................................................................6 How to Enable Drilling in Discoverer....................................................................................................6 Administrator Edition.............................................................................................................................8 Discoverer Data Folders ........................................................................................................................8 Database Folders ............................................................................................................................10 Custom SQL Folders........................................................................................................................11 Custom Complex Folders.................................................................................................................13 Discoverer Drill Hierarchies................................................................................................................14 Drill Down Hierarchies ...................................................................................................................14 Drill to Detail Hierarchies ..............................................................................................................15 Drill Hierarchy Example .................................................................................................................15 Creating a New Hierarchy...............................................................................................................17 User Edition...........................................................................................................................................19 Creating a Drilled Workbook ..............................................................................................................19 Using a Drilled Workbook...................................................................................................................21 Fundamentals of Drilling ....................................................................................................................26 Multiple Hierarchy Drills. ...................................................................................................................27 Conclusion .............................................................................................................................................31

Introduction
Balances are calculated within Oracle HRMS as an integral part of the payroll process. Discoverer provides a way of extracting these balances from Oracle HRMS in a structured, but user friendly and intuitive manner. The purpose of this document is to: Describe the features and benefits of Oracle Discoverer, and how it can be used in Oracle HRMS. Describe the use of Discoverer Administrator Edition in creating the structure by which Discoverer users can access Balances. The issues that will be consider are: Creating and managing data folders; Discoverer hierarchy types and their uses; and Creating a drill to detail hierarchy. Introduce the ways in which users can view payroll balances using Oracle Discoverer User Edition. The issues that will be consider are: Creating and using a drilled workbook; The fundamental concepts of drilling; and Why multiple drill hierarchies should be used.

The scope of the concepts covered in this document are as follows: They are intended for use with Oracle HRMS but they can also be adapted to other Oracle Applications. They primarily show how the drilling capabilities of Discoverer can be used. The examples use the GB Balance User Exit to access payroll balances. It should be noted that this functionality is UK

specific. In other regions please check to see if similar functionality exists. Note that this document is not a detailed guide in the use Oracle Discoverer. Refer to the Oracle Discoverer Administration Guide 3.1 and Oracle Discoverer Release 3.1 User Guide for further help. For further information on the use of the GB Balance User Exit refer to Oracle HRMS Implementation Guide - Technical Essays. The following releases of software were used for the production of the examples given in this document. Oracle Discoverer Version 3.1.25, Oracle End User Layer 3.1.13.0.0.0, Oracle8 Enterprise Edition Release 8.0.4.2.2 and Oracle Applications 11.0.28.

Uses of Discoverer within HRMS


Oracle Discoverer is a reporting, analysis and web publishing tool that enables business users at all levels of the organization to gain immediate access to information from relational databases. This document provides examples of using this functionality to extract information from Oracle HRMS.

What is Discoverer?
Discoverer unique architecture, designed to simplify enterprises wide deployment, includes a number of components: The Administration Edition provides an easy-to-use interface for the setup and maintenance of the powerful, server-based meta layer the End User Layer (EUL). The EUL is created from any relational meta data repository and hides the complexity of data structures and drill relationships from end users, allowing them to focus on solving business problems, not data access issues. The User Edition provides an initiative data driven interface, integration with other desktop products and powerful data exploration via drill-anywhere capabilities. This is done through the creation of Workbooks, which hold the layout and formatting of the reports and analyses that the users wishes to perform. The Viewer Edition allows users to view and navigate through pre-defined Workbooks with any standard Web browser. This document will focus on using the Administrator Edition to create drill hierarchies. These hierarchies will then be utilised in the User Edition. Thus providing an intuitive way for users to access payroll balances.

How to Enable Drilling in Discoverer


There are two areas to be configured within Discoverer in order to enable drill capabilities. 1. Discoverer Administrator Edition is used to create the EUL. This enables the provision of an intuitive interface to the data for users. The EUL achieves this is two ways:

By providing a way of presenting the data which concentrates the user on their task. Removing the need for the user to understand the details of underlying database structure. Moreover it permits the creation of drill hierarchies, further simplifying a user ability to explore data within their own s workbooks. 2. Discoverer User Edition allows a user to connect to an EUL. They are then able to create their own workbooks, to report and analyse the data from the simplified view. By utilizing the drilling hierarchies created by the administrator they are able to build reports with little knowledge of the underlying structures.

Administrator Edition
It is the role of the administrator to create a Business Area using Discoverer Administrator Edition. The Business Area defines the structure around which users will view and access data through Discoverer User Edition. The Business Area can contain three types of data folders, Database Folders, Custom SQL Folders, and Custom Complex Folders. These folders define the data that the user will have access to. Discoverer Administrator Edition then allows drill hierarchies to be created based on items within these folders.

Discoverer Data Folders


The Discoverer Administrator Edition data tab is shown in Figure 1. It allows data folders to be created in a Business Area, this enables the administrator to group together related database items. Each business area allows a simplified view of the database to be created. Users can then be given access to the business area(s) which provide the information that they need.

Figure 1 - Administrator Edition Data Tab. The example Business Area in Figure 1 contains eleven folders. The first six are database folders, the next is a custom SQL folder and the last four are custom complex folders. The six database folders are based on the following database tables and views. hrv_organization_units pay_all_payrolls_f per_all_assignments_f per_all_people_f per_time_periods per_jobs The Balance View folder, is based on a SQL query that has been created within Discoverer. It uses the functionality of GB Balance User Exit to obtain payroll balances.

The last four are Discoverer custom complex folders. These allow the administrator to group together related database items. Each folder will then appear to the user as one entity. These items can come from any database or custom SQL folders that is contain within the business area. A key consideration is the access users are given to certain folders. In Figure 1 the first seven folders are greyed out. This is because they have been hidden from the user. It is a good idea to do this because it simplifies users choices when building a report. By only allowing users to see the four custom complex folders they do not need to be concerned with actual database tables. These folders have informative names and only contain the database items that the administrator wants the users to see. Database Folders A database folder contains all of the columns of the source table or view. When a database folder node is expanded it is possible to view the column names that it contains (Figure 2).

Figure 2 - An expanded database folder. In Figure 2 all but the last item are data items. These are based on the columns of the source view that the folder

10

hrv_organization_units is based on. The last item in the folder is a join item. The icon indicates the join type and the name indicates which other folder it is joined to. In the example in Figure 2 it is possible to see that a one to many join exist between HRV_ORGANIZATION_UNITS and PER_ALL_PEOPLE_F. There are three options in Discoverer for creating joins: 1. They can be automatically created by Discoverer based on the primary and foreign key rules that exist in the database; or 2. They can be automatically generated by Discoverer based on matching column names; or 3. They can be defined manually by the administrator using the Insert menu, Join option. Custom SQL Folders Creating a custom SQL folder in Discoverer Administrator Edition allows for the creation of more complex data items without having to create a view in the database. In these examples it allows for the GB Balance User Exit functionality to be utilised directly within Discoverer. In Figure 3 the expanded Balance View folder can be seen.

Figure 3 - An expanded custom SQL folder.

11

Figure 3 shows the items that the folder contains, as determined by Discoverer based on the SQL specified. The folder also contains the list of joins imposed on this folder. These joins need to be created manually to whichever folders we wish to relate this SQL folder. The query that this folder is built from is:
SELECT PAF.ROWID ROW_ID , PAF.ASSIGNMENT_ID, PBT.BALANCE_TYPE_ID, PBT.BALANCE_NAME, PDB.DEFINED_BALANCE_ID, PBD.DATABASE_ITEM_SUFFIX, PTP.END_DATE, PTP.TIME_PERIOD_ID, hr_gbbal.calc_all_balances(PTP.END_DATE, PAF.ASSIGNMENT_ID, PDB.DEFINED_BALANCE_ID) VALUE FROM PAY_BALANCE_TYPES PBT, PER_TIME_PERIODS PTP, PER_ASSIGNMENTS_F PAF, PAY_DEFINED_BALANCES PDB, PAY_BALANCE_DIMENSIONS PBD WHERE (PBT.LEGISLATION_CODE IS NULL OR PBT.LEGISLATION_CODE = 'GB') AND PBT.balance_type_id = PDB.BALANCE_TYPE_ID AND PBD.balance_dimension_id = PDB.BALANCE_DIMENSION_ID AND EXISTS ( SELECT NULL FROM PAY_RUN_RESULT_VALUES PRRV , PAY_RUN_RESULTS PRR , PAY_BALANCE_FEEDS_F FEED , PAY_ASSIGNMENT_ACTIONS PAA2 , PAY_PAYROLL_ACTIONS PPA WHERE PBT.BALANCE_TYPE_ID = FEED.BALANCE_TYPE_ID AND PRR.RUN_RESULT_ID = PRRV.RUN_RESULT_ID AND FEED.INPUT_VALUE_ID = PRRV.INPUT_VALUE_ID AND PPA.PAYROLL_ACTION_ID = PAA2.PAYROLL_ACTION_ID AND PPA.TIME_PERIOD_ID = PTP.TIME_PERIOD_ID AND PAA2.ASSIGNMENT_ACTION_ID = PRR.ASSIGNMENT_ACTION_ID AND PAA2.ASSIGNMENT_ID = PAF.ASSIGNMENT_ID)

The query calculates balances using the hr_gbbal.calc_all_balances function from the GB Balance User Exit. This functionality is UK specific, in other regions you should check if similar functionality exists. Where it does this query should only be considered an example of using Discoverer custom SQL folders.

12

Custom Complex Folders Custom complex folders allow the administrator to group together items of related information. This enables the administrator to present related information to the user as though it is one entity. Figure 4 shows an expanded custom complex folder for these examples.

Figure 4 - An expanded custom complex folder. The Employee Information and Assignments folder in Figure 4 shows items from different tables grouped together in one folder. The greyed out items will be hidden from the user, this ensures that their workbooks will not contain unnecessary items. However they are still available to the administrator for use in calculations or conditions. The last three items in the folder are conditions. Conditions allow restrictions to be imposed by the administrator on the items returned when a user reports on this folder. When a condition is created on a particular item in a folder it can be either mandatory or optional. A mandatory condition will be enforced in every users workbook that reports on this folder. This type of condition is useful when spurious results would otherwise be reported. In this example a condition has been placed on the employee effective s end date. This ensures that only the employee most up to date s

13

information will be displayed in a report on this folder. The folder in Figure 4 does not contain any joins. It is possible to create joins in a complex folder, but normally this would not be done. This is because Discoverer manages the joins between items within a complex folder. It determines what these joins are by only allowing certain items to be added to the complex folder. Items can only be added from multiple database folders, if a join has already been defined between those database folders. Therefore items from multiple folders cannot be added to a complex folders until the necessary joins have been created between the source folders. The consequence of this is that joins between complex folders are also deduced by Discoverer.

Discoverer Drill Hierarchies


Within Discoverer there are two types of drills, drill downs and drill to details. To establish the suitability of these hierarchies for a given task their features will be considered first. This will provide the foundation for the creation of the hierarchies used in this section. Drill Down Hierarchies Although drill down hierarchies provide excellent data formatting and exploration facilities. In some instances they must be used with caution. This is because they can not be used to limit a query or pinpoint a specific value. However they do allow the results of a report to be view at a number of different levels of abstraction. What this means is that when a drill down hierarchy is used all the values are calculated from the outset. The hierarchy just determines at which level of detail those figures will be viewed. Therefore drill down hierarchies are extremely useful when a user wishes to view summary information in a number of different ways. To consider a real life use of a drill down hierarchy the payroll balance example will be briefly put to one side. It is required that the sales figures for a change of shops can be view by regions, by cities, or by shops. The drill down hierarchy bases the results of the report on each shops sales figures. The database does not contain sales figures for cities or regions. Discoverer uses the hierarchy that the administrator creates to determine how to calculate figures for regions and cities. The hierarchy allows the user to drill between these levels. Where caution must be taken is if the number of shops is large. This is because if we are viewing the results by region, the report would not appear to return many rows. However the region figures are based on the sum of the shop figures. If the number of shops was large the report could take excessive time to compute. The reason for this would not be apparent to the user as they only see a single row for each region.

14

Drill to Detail Hierarchies Drill to detail hierarchies are extremely useful when the user wants to limit a report based on the hierarchy. They allow the user to drill to more detailed information based on a given criteria. What this means is that at each level of the hierarchy only a limited number of rows are returned. The selection of which rows is determined by the row drilled from in the higher level. In the context of the above sales figure example, the report would function differently. At the region level of abstraction just a list of region names would be listed. Drilling on a given region name would produce a list of cities. Drilling on a given city would produce the sales figures for shops in that city. What this means is that values from the lowest level of the hierarchy are only returned when that level is being viewed. This is opposite to a drill down hierarchy which returns them from the outset. An understanding of this concept then makes it clear that drill to detail hierarchies will need to be used when the number of rows at the lowest level is large. Drill Hierarchy Example In the context of payroll balances it will be necessary to use a drill to detail hierarchy. In these examples it is required to be able to drill between. 1. A list of Business Groups. 2. To a list of Employees and Assignments for a given business group. 3. To a list of payroll time periods for a given assignment of an employee. 4. To a list of balances for a given assignment and payroll time period. In this example the number of balances for a standard business group could be large. Therefore it is necessary to use a drill to detail hierarchy. This is because performance would be unsatisfactory if a drill down hierarchy were used for the reasons discussed above. Moreover drill down hierarchies are simple to create. Hence these examples will concentrate on the more complex drill to detail hierarchies. The hierarchies that were created for these examples are shown in Figure 5. These hierarchies were created under the Item classes tab in Discoverer Administrator Edition.

15

Figure 5 - Drill hierarchies for examples. In Figure 5 there are four drill hierarchy item classes defined. These enable drill up and down through the hierarchy, from business groups, to employee assignments, to payroll time periods and finally balances. In Figure 6 one of the hierarchies has been expanded. It shows the three items that have been added to the hierarchy, and which folders that they have been added from. This hierarchy determines the relationship between the Assignment ID at the lowest three levels. These items need not necessarily be called the same thing. However conventionally this would be the case as it would not normally be sensible to relate items that do not represent the same thing.

16

Figure 6 - An expanded drill hierarchy Creating a New Hierarchy To create a summary to detail hierarchy use the Insert menu, Item Class option. This will bring up the Item Class Wizard.

1. At step one the Drill to detail check box should be checked the others unchecked. 2. At step two the items that are required in the new hierarchy need to be added. In Figure 7 the items added that would create the hierarchy that was expanded in Figure 6. 3. At step three the new hierarchy is given a name and description.

17

Figure 7 - Item class wizard: Step 2.

18

User Edition
Once a drill hierarchy has been created by the administrator it is a simple task to make use of it in a user workbook. When creating a s new workbook, items that have hierarchies associated with them can be included. Discoverer will then automatically enable the ability for users to drill from these items.

Creating a Drilled Workbook


To continue the payroll balance hierarchy example a new workbook will be created. This will display the business groups within the organization. 1. Start the workbook wizard by select File menu, New. Then select the type of workbook layout that is required. For these examples Page-Detail table layout has been used. 2. Step 2 allows the items that need to be display in the workbook to be selected. Figure 8 shows that the Business Group Names folder has been selected.

Figure 8 - New workbook wizard step 2

19

3. Step 3 allows the workbook layout to be altered. Figure 9 shows that the default layout has been used in this example.

Figure 9 - New workbook wizard step 3. 4. Step 4 allows conditions to be defined on the rows returned to the workbook. For example it would be possible to see only business groups with ID between a given range, or names that s start with a given letter. For this example all rows will be returned. 5. Step 5 allows the workbook to be sorted by a given column, or columns. The add button is used to select a new column to sort by, adjustments can then be made to the sort criteria. Figure 10 shows the sorts created in the example workbook.

20

Figure 10 - New workbook wizard step 5. 6. The final step allows calculated items to be created in the workbook. For example averages or sums of two columns that already exist in the workbook. In the example no calculated items have been defined.

Using a Drilled Workbook


Once the workbook has been created Discoverer will query the database and return the rows that have been requested. For the example above a workbook looking similar that given in Figure 11 will be produced.

21

Figure 11 - Workbook listing business groups.

To drill on a given business group it is necessary to double click on it business group ID. This will launch the drill dialogue box as s shown in Figure 12. This dialogue box shows the item that is being drilled from, in this case Business Group ID. It also lists the possible items that can be drilled to, in this case the Employee Information and Assignments folder. It is also possible to customise the new worksheet before the query is executed. To do this use the options button. In this example the default layout will be used, so the report was executed using the OK button.

22

Figure 12 - Drill dialogue box. After the drill in Figure 12 has been executed a new sheet (Sheet 2) is created in the workbook as shown in Figure 13. The new sheet contains the items from the Employee Information and Assignments folder. The example shows that Business Group Name is displayed as a page item. The default position for each item can be set using the Edit menu, Properties option in Discoverer Administrator Edition. The page item allows the user to see that the current worksheet is displaying only employees from the Netcam Corporation. This shows the user that the drill successfully limited the new query to only return employees from that business group. Discoverer achieves this by limiting the query to only employees with a given Business Group ID. The Business Group ID value is determined by the business group was double clicked on in Figure 11.

23

Figure 13 - Drilled worksheets of employees. The user is then able to drill down through the rest of the hierarchies. Figure 14 shows the worksheet created by Discoverer when a user drills from an employee to their time periods. As the final step a user is able to drill from a time period to inspect the balances. The worksheet generated is shown in Figure 15.

24

Figure 14 - Drilled worksheet of time periods.

Figure 15 - Drilled worksheet of payroll balances.

25

Fundamentals of Drilling
To use a drill to detail effectively it is essential to understand what Discoverer does to produce a new drilled sheet. When an item is drilled on the goal is to determine more detailed information for that item. In Figure 11 and Figure 13 a drill was shown on Business Group ID. Figure 13 was the report showing the Employees and their Assignments for that business group. Discoverer only returned the related rows in the new sheet. It achieved this by creating a condition on the new sheet. This limited the query to only return employees of the given business group. The condition that Discoverer created can be viewed in the edit sheet conditions dialogue as shown in Figure 16.

Figure 16 - Edit sheet conditions dialogue. The condition in Figure 16 is created on the Business Group ID as that item was drilled from. The condition limits the query to return employees with a Business Group ID equal to 631. Discoverer has automatically generated the required condition. This feature is what make drill to details so powerful. They give the user the ability to limit queries to specific values without the need to understand conditions. Had the drill to detail not been created the user would need to do this manually.

26

Multiple Hierarchy Drills.


Often it would be useful to have the ability to drill from one folder to another based on more than one criteria. Discoverer does allow for this although there are a number of issues to consider. In Figure 17 two drill to detail hierarchies have been expanded. Notice that these hierarchies contain different items from the same folder. The first allows drilling on Assignment ID, the second allows drilling on Time Period ID.

Figure 17 - Multiple Drill Hierarchies. Hierarchies can include items from more than two folders, so long as it makes sense for them to be drilled upon. In Figure 17 Assignment ID is included in the hierarchy of three folders. This ensures it is possible to drill from an employees assignments, to the time periods of that assignment, to the payroll balances of that assignment. The Time Period ID hierarchy enables drilling from assignment time periods to payroll balances. This second hierarchy is required to limit the balances returned to only the required time periods. These two hierarchies enable the required balances to be obtained, based on a given Assignment ID and Time Period ID. It is important that for a given folder multiple items can be

27

members of hierarchies. This is because if a user drills on such an item, they may wish two possible things to happen. 1. They wish to drill on only one of these items drill hierarchies 2. They wish to drill on all of them. Discoverer allows the user to select the option they require from the drill dialogue box as shown in Figure 18.

Figure 18 - Drilling on multiple hierarchies. This dialogue was displayed when the user double clicked on the Time Period ID, for period 7091. They can now drill to Payroll Balances in two ways: 1. Drill on Time Period ID; or 2. Drill on both the Time Period ID and Assignment ID.

28

Option one would return the balances for that time period for all assignments. This is not what is required as we are focusing in on a particular employees assignments. However the dialogue box by default indicates that Discoverer will drill on the Time Period ID. If the user wants to drill on both items then they must select All Items from the Where do you want to drill from? List box. Had the user chosen option one the edit sheet conditions dialogue in Figure 19 shows that the query was only restricted by Time Period ID.

Figure 19 - Query limited by one condition. By selecting All Items in Figure 18 notice that the conditions change to those shown in Figure 20.

29

Figure 20 - Query limited by both conditions.

30

Conclusion
This document has explained the use of Oracle Discoverer Administrator and User Editions in the context of creating drill hierarchies. These hierarchies provide a powerful and intuitive interface to users for accessing any form of hierarchical data. The examples given show how drills can be used to access Oracle HRMS payroll balances in the UK. However these techniques could be used to exploit hierarchical data in other Oracle Applications.

31

Das könnte Ihnen auch gefallen