Tuesday, December 19, 2006

Data being added conflicts with existing data

If users are encountering this error, chances are that your sequence no. table is out of synch with your main transaction table. For e.g. this can happen while hiring a new employee and a new employee id needs to be generated. PeopleSoft delivered code uses SQLExec approach to

  • First Update the Sequence to next number
  • Selecting the sequence from the table
  • Assign this to page field

This method works fine, except where you are calling this function conditionally in Saveprechange event and Subsequent workflow or savepostchange event errors out and PeopleSoft issues rollback and all changes to database are rolled back. This results in Sequence no table not being updated to next value. However the actual page field is updated with this new value. If the user is able to correct the error and save the page again, the peoplecode to update the sequence does not fire due to it's conditional execution. (for e.g. EMPLID = 'NEW' as emplid is already equal to a new value). Remember, error does not clear the page values only rolls back database changes. This results in your emplid in person table higher than last employee id in installation table. Now when the users trying to hire new employees it gives the above error.

The best way to avoid this is to use GetNextNumberWithGaps peoplecode function, which automatically increments the counter and commits the value to database. This also improves the database locking.

If for some reason you can not use this function, you can still use GetNextNumber or SQLExec and make sure that this gets executed all the time, even after the error has occurred in Workflow or savepostchange event. Instead of evaluating the current value of emplid = 'NEW' , store the value when the user enters the component in a component variable and use that variable for comparison. This will ensure that your update logic is firing all the time.

Here is the Old PeopleCode

Function assign_employee_id(&EMPLID);
&LENGTH = INSTALLATION.EMPLID_LENGTH;
&CHECK = Rept("9", &LENGTH);
SQLExec("Update PS_INSTALLATION Set EMPLID_LAST_EMPL = EMPLID_LAST_EMPL + 1");
SQLExec("Select EMPLID_LAST_EMPL From PS_INSTALLATION", &EMPLID);
If Value(&EMPLID) > Value(&CHECK) Then
SQLExec("Update PS_INSTALLATION Set EMPLID_LAST_EMPL = EMPLID_LAST_EMPL - 1");
Error MsgGet(1000, 74, "The maximum Employee ID of %1 has been assigned.", &CHECK);
Else
&EMPLID = Rept("0", &LENGTH - Len(&EMPLID)) | &EMPLID;
End-If;
End-Function;

Here is the new PeopleCode

Function assign_employee_id(&EMPLID);
&LENGTH = INSTALLATION.EMPLID_LENGTH;
&CHECK = Rept("9", &LENGTH);
&EMPLID = GetNextNumberWithGaps(INSTALLATION.EMPLID_LAST_EMPL,&CHECK,1);
Evaluate &EMPLID
When = %GetNextNumber_SQLFailure
/* Do Error processing */
break;
When = %GetNextNumber_TooBig
Error MsgGet(1000, 74, "The maximum Employee ID of %1 has been assigned.", &CHECK);
break;
When = %GetNextNumber_NotFound
/* Do Error processing */
break;
When-other
&EMPLID = Rept("0", &LENGTH - Len(&EMPLID)) | &EMPLID;
End-Evaluate;
End-Function;

Friday, December 15, 2006

Search PeopleSoft Customer Connection for Solutions to most common issues

PeopleSoft customer connection website has been recently enhanced with a new feature : Knowledge browser. This will allow you to look for most common resolutions easily. You can also download a spreadsheet containing solutions by product area.

Navigation : Support -> Online Support -> Knowledge Browser -> Peoplesoft Enterprise

Direct URL : http://urlic.com/knowledgebrowser (Enter your customer connection Userid and password). Following High level topics are available.

Monday, December 11, 2006

Download Oracle OpenWorld Presentations for Peoplesoft

You can download Oracle OpenWorld Presentations at http://urlic.com/openworld2006

Enter the following in the popup dialog box.
Username: cboracle
Password: oraclec6

There are lot of useful presentations on PeopleSoft Upgrade. To search for peopleSoft technology related presentations, use following
Search In: Sessions
Key Topics: All
Track: Application Technology
Special Interests: PeopleSoft Enterprise

or go to this URL at PeopleSoft Technology Presentations - Oracle Open World 2006

This returns total of 59 records.

Thursday, October 19, 2006

Search Customer Connection Effectively

Type following Keyword : SPOTLIGHT and any other keyword to find most important resolutions. For e.g. To search for Crystal Relate issues, search for
SPOTLIGHT crystal

These resolutions are specially created to address specific issues. I just learned it today in Advisor webcast : PeopleTools 8.48 : Integration broker overview.

Friday, October 06, 2006

Impact of U.S. Daylight Saving Time Changes in 2007 on peoplesoft

US DST changes may require updating the JRE used in Web/App/Batch servers. More information can be found in these links

http://java.sun.com/developer/technicalArticles/In...

http://www.hp.com/products1/unix/java/DST-US.html

Do you think it will also impact peopletools release as well. I do not see any documents on this on customer connection. Please share your thoughts on this issue.

I think this PeopleSoft Page and associated data stored in PSTIMEZONE and PSDSTTIME must be updated. I have seen one other record PSTZOFFSET which may need to be updated, if you are using this in your environment. The data in this table is not required by peoplesoft and can be used in query to simplify the access to timezone data. This makes the time zone information available in a format that can be easily accessed with SQL. (Exception : May be used by Time and Labor. Check your installation). You may also want to update only for the period 2007 and onwards after applying the updated timezone information.

PeopleTools -> Utilities -> International -> TimeZones and Hit the button Generate Query Offsets and enter the start and end date for which you want to generate the information. This will delete the old data and enter the new data. You may want to update the data only for the year 2007 onwards only.

Here is a link to peoplebooks -> Unserstanding Time Zones

Navigation for PeopleTools 8.4x

PeopleTools -> Utilities -> International -> Time zones
Menu: Utilities
Component: TIMEZONEPNLGRP
Page: TIMEZONEDATA, DSTDATA
Record: PSTIMEZONE, PSDSTTIME

Here is the SQL to update the record.

INSERT INTO PSDSTTIME VALUES ( '2FirstSunNov', 'N', '11', 1, '0', 2, 0, 'First Sunday in Nov, 2:00am' )
INSERT INTO PSDSTTIME VALUES ( '22ndSunMar', 'N', '3', 2, '0', 2, 0, 'Second Sunday in March, 2:00am' )
UPDATE PSTIMEZONE SET DSTSTART='22ndSunMar' WHERE TIMEZONE IN ('AKST','CST','EST','MST','PST');
UPDATE PSTIMEZONE SET DSTEND='2FirstSunNov' WHERE TIMEZONE IN ('AKST','CST','EST','MST','PST');

Tuesday, October 03, 2006

Define Optional Query Prompt/Criteria in PeopleSoft Query

To create a optional query criteria, in Peoplesoft Query create a prompt as expression as shown below
:1 OR :1 = ' '
Note their is a single space between two quotes. This will make query run with or without prompt. User can either provide the prompt value to return results for a specific value or leave it blank to return rows for all values.

Tuesday, September 26, 2006

Execute query from Lefthand Portal Navigation

You can run PeopleSoft Query from Lefthand Portal Navigation. This helps the end user to navigate to remember the query name easily.

Go to Portal -> Structure and Content

Navigate to  the folder under which you want to create the content reference.

Add a new content reference and fill following fields as follows

Check No Template check box. This will remove the portal Header and Left hand menu navigation.

URL information

Node Name : Always use Local or appropriate remote node name

URL Type : PeopleSoft Generic URL

Portal URL : q/?ICAction=ICQryNameURL=PUBLIC.YOUR_QUERY_NAME

Content Reference Attributes

Name: NAVNEWWIN

Uncheck Translate check box.

Attribute value: true

This will open the query results in a new window.

Go to Security Tab and add appropriate permission list and save the content reference.

You may have to refresh the homepage to be able to see this new portal content reference in Left hand  Navigation menu.

This is applicable for PeopleTools 8.4x only.