Bridging the gap to Fusion through our PeopleSoft Solutions Extenders
Grey Sparling PeopleSoft Expert's Corner
Oracle Blogs
 Subscribe Now!

Thursday, October 11, 2007

Re-Posted yesterday's item.

Well, I guess that I should have done a little more testing prior to publishing last night's posting. In order to figure out what pages and components to look at when adding my code, I opened them up and used PSIDE helper to drill into the definitions.

Unfortunately, I didn't realize that there were global variables that drove the logic on the pages that I was working with (and those vairables prevented me from finding a couple of design flaws in my approach).

Well, I discovered the error of my ways and realized that I needed to move one component back in the chain with my entry-point (which meant that I needed to add code to two pages instead of one). Try the code on the posting now.

Labels: , ,

Wednesday, October 10, 2007

Opening up a Performance or Development Document from a URL

I've recently been spending a bit of time working in HR on a Co-Presentation with Business Objects for their upcoming conference this week. One of the things I wanted to show was how to open up a performance review or a development plan from a report. Unfortunately, the pages in HCM don't allow you to pass in an EMPLID or a Review Type to open it up.

The Solution

The solution is similar in nature to what I did for navigating to values in the Journal Entry page. I used the %Request.GetParameter() function to allow the URL to navigate to the page to contain the extra parameters I needed. I then used the parameters to find the document I wanted to open, and opened it. I ended up need needing to add code to two different locations to make it work (mainly because the performance documents were written as several different components that transfer the user around):

  • The first was to add Page.Activate PeopleCode to the EP_LAUNCH page. This code accepts the parameters passed on the URL. Because those parameters will be lost after a transfer event, it puts them into global variables to be used later.
  • The second is to modify the Page.Activate PeopleCode of the EP_APPR_SELECT page to use the parameters passed on the command line to walk through the list of documents and open the appropriate one.

In case you were wondering what the navigation would look like, here are a couple of URLS that would open up the appropriate documents.

The first is a URL to open an annual performance document (for employee KU0065): http://www.gsdemo.com/psp/ps/EMPLOYEE/HRMS/c/ROLE_MANAGER.EP_CURRENT_MY_PRF.GBL?&PAGE=EP_APPR_SELECT&EMPLID=KU0065&EP_REVIEW_TYPE=K0ANNUAL

The second URL opens up a development document (for employee KU0119): http://www.gsdemo.com/psp/ps/EMPLOYEE/HRMS/c/ROLE_MANAGER.EP_CURRENT_MY_DVL.GBL?&PAGE=EP_APPR_SELECT&EMPLID=KU0119

Here's the code needed on the Page.Activate program within the EP_LAUNCH page:

Because this page doesn't already have PeopleCode here, you can simply copy and paste the following code(tested against HCM 8.9).

/* ********************************************************** */
/* Grey Sparling - Add Code to Open up an item passed on URL */
/* ********************************************************** */

rem Grey Sparling - Retrieve Parameters to open up employee;
Global string &gsEmplID;
Global string &gsRevType;

&gsEmplID = RTrim(%Request.GetParameter("EMPLID"));
&gsRevType = RTrim(%Request.GetParameter("EP_REVIEW_TYPE"));

Here's the code needed on the Page.Activate program within the EP_APPR_SELECT page:

The first step is to declare the global variables near the top of the program. It already contains the declaration for &EP_GBLKEYS_WRK. You should put the following lines above it.

/* Grey Sparling - Declare Globals */
Global string &gsEmplID;
Global string &gsRevType;

The rest of the code should be appended to the end of the page activate peoplecode on the EP_APPR_SELECT page.

/* ********************************************************** */
/* Grey Sparling - Add Code to Open up an item passed on URL */
/* ********************************************************** */

If None(&gsEmplID) Then

    &gsEmplID = RTrim(%Request.GetParameter("EMPLID"));

End-If;
If None(&gsRevType) Then
    &gsRevType = RTrim(%Request.GetParameter("EP_REVIEW_TYPE"));
End-If;

rem Grey Sparling - If EMPLID is passed, walk through the rowset to find it;
If All(&gsEmplID) Then
    Local Rowset &rsEPApprSelect = GetLevel0().GetRow(1).GetRowset(Scroll.EP_APPR_SEL_VW);

    Local number &j;
    For &j = 1 To &rsEPApprSelect.ActiveRowCount

      Local Row &rowTest = &rsEPApprSelect.GetRow(&j);

      rem Grey Sparling - Test passed in parameter against current row's emplid;
      If &rowTest.GetRecord(Record.EP_APPR_SEL_VW).GetField(Field.EMPLID).Value = &gsEmplID Then
        Local string &rsRevType = RTrim(&rowTest.GetRecord(Record.EP_APPR_SEL_VW).GetField(Field.EP_REVIEW_TYPE).Value);

        rem Grey Sparling - If there's no reivew type parameter or if there is and parameter matches for current row, open up document;
        If None(&gsRevType) Or
          &rsRevType = &gsRevType Then

          /* Transfer the user to the selected review sub-document */
          &EP_GBLKEYS_WRK.EMPLID.Value = &rowTest.GetRecord(Record.EP_APPR_SEL_VW).GetField(Field.EMPLID).Value;
          &EP_GBLKEYS_WRK.EP_APPRAISAL_ID.Value = &rowTest.GetRecord(Record.EP_APPR_SEL_VW).GetField(Field.EP_APPRAISAL_ID).Value;
          TransferPage(Page.EP_APPR_DETAIL);
          Break;

        End-If;
      End-If;
    End-For;
End-If;

In case you saw this post prior to October 12, 2007, you may have noticed that it's different (and the original posting didn't work). I apologize for that, and now that I understood the way that global variables worked in the design of the application, I was able to figure out that I needed to test by establishing completely new sessions to ensure that prior runs didn't utilize previously set global variables.

Labels: , ,

Wednesday, January 10, 2007

Flash Demo of HCM Reporting

Over the past 24 hours, I've had lots of folks wanting to learn more about the HCM reporting examples in yesterday's post. I decided to record a flash demo that shows how one would use the queries as well as the nVision reports (and drills).

In order to simplify the navigation in the demo, I did use the nVision Drilling Snap-on (which is separately licensable, but is not required to use the queries and nVision objects in the project). However, it does make it much easier to find and use them together.

Click here to watch the HCM Reporting in action...

Labels: , , , , ,

Tuesday, January 09, 2007

Query and nVision Reporting in HCM

This posting goes in the category of "why the $#%$^&$% didn't I do this earlier?!?!".

Yes, I finally spent some time getting myself up to speed on PeopleSoft HCM. One of our loyal blog readers was looking at using nVision to do some analysis without paying the significant costs of purchasing a BI tool and asked for recommendations for reporting against PeopleSoft HR. My only excuse as to why I didn't dig into this earlier was that I had a very strong Financials background (Cullinet Purchasing, followed by Millenium Financials, and finally working with version 1 of PeopleSoft financials and the beta version of AR and AP... I was one of the first 4 Financials consultants at PeopleSoft). Unfortunately, I never got to it.

Yeah... You made your point... You've been busy... But why do it now???

Good (but very cynical) question. Coming off of the success of our Open World presentations, we're gearing up to present at several other conferences this year. In order to make the presentations interesting to both mystelf and those who may have already been to one of our sessions, I decided to switch the subject matter to be HCM. When I got started, I was really excited about this. Then I with the person who put together the reporting demos that the Oracle/PeopleSoft salespeople use. Apparently, she did this years ago.

Oh well, I guess the difference is that I did the work myself, and that I'm making it available to all of you (so you may thank me now... or curse me now for not doing it earlier).

Queries

Let's start with Queries (because although I created some very cool nVision examples, I'm afraid I'll lose many of you HR junkies without hooking you first). I started putting together queries that focused on getting employee lists based on different attributes, such as JobCode, Deptid, and Supervisor.

Here are the queries that are included in the project (again, most of which are built against the JOB and PERSONAL_DATA records.

One of the things that France Lampron, founder of NuvoSoft taught me when we brought her in for use case development for nVision 9 was the importance of analyzing the HR actions in HCM reporting (this tells you whether you need to be worried about a manager that has a large number of termination actions for his employees). In honor of her, I created a query that lists the actions for a given employee. Here is what the results look like prompting against a given employee:

Attached in the Zip file below is a project that includes all these queries for your personal use. Keep in mind that I hadn't focused on whether you want to provide security for the data in them (query security will handle that in general. However, if there are users who should have access to some of the data in these records, you should create views that only show the pertinent fields, grant access to them by adding them to the tree, and build the appropriate queries, using these as a guideline).

nVision Reporting against HCM


For me, this is probably the most important part of this posting. I am going to prove, once and for all, that nVision does work for doing analysis against HCM, and that there are a lot of good reasons to use this tool. As with many other things in this blog, had I spent the time on this earlier, PeopleSoft customer probably would have had much better reporting delivered out of the box (and I'm truly sorry for that).

When looking at nVision reporting in HCM, I focused on three main areas:

  • Generating a report that shows headcount and salary information at the organization level. This was based on a delivered nVision report (that hadn't been tested in many PeopleSoft releases).
  • Generating a report that shows headcount and salary information by salary grade. Again, this was based on a report delivered as part of HCM, but was also broken.
  • Generating a report that shows a benefits summary. This required less work to fix up.

The data in the standard HCM database has good data in the US006 business unit, that's what I used:


Here's what the departmental headcount and salary report looks like:



Drilldown Layouts

One of the key features to nVision is drilling. It allows you to take slices or list out details that support the data shown in a summary report (sometimes called analysis). The most important drills you can include in HCM are ones that list out employee information (either personal data or job information depending what you're looking for). There are also drills that allow you to see how FTE or Salary information is broken out by different atrributes (such as the department tree, jobcode, or location). Here is the list of drills I developed as part of this effort:


When drilling from the Department Salary report to the Employee Salary details (from the Job record), this is what you would see:


Other Information that might be Useful

One thing that is important to note is that all these examples perform analysis as of the date that the report or drill is run. This means that there is no time series analysis (i.e. tell me who's enrolled in benefits right now). For time series analysis, you will need to create a view that segregates the effective dates of the data into categories (such as month and year) for doing that type of analysis. That may come in a future posting.

Excellent! How can I get a copy???


I'm glad you asked. I've put together a zip file that contains the nVision definitions as well as the query definitions discussed above. The nVision reports require the query definitions, because the delivered ones by HCM are broken.


Download the zip file from here.

Copy the .xnv files from the nVision directory to your nVision directory, and copy the projects directory to your projects directory (and use app designer to import the project).

Taking it to the Next Level

One of the other things that I did as part of this effort was to pull all these objects together with our nVision Drilling Snapon. This allows you to organize your nVision drills better as well as enable drilling from your nVision reports to Queries and pages to either get additional information or take action on the contents of your reports.

Here is an example of what the drill menu could look like:

I plan to put together a flash demo that shows how you can drill from a departmental report to attributes, drill to employee detail, query on attributes of the employee, and maintain employee information, all from one place. As my daughter would say, "FANTABULOUS!!".

Labels: , , , , ,