Wednesday, May 29, 2013

How to run PTO Carryover process for one employee

In Oracle HRMS, if we run the PTO Carryover process, it runs for all employees. But as a developer you might need to run carryover for one employee or set of employees for testing purposes. Below are the steps to follow to achieve the same. This method involves changing Oracle supplied package so please make sure to revert back your changes once your testing is complete.
  • Open the package PAY_US_PTO_CO_PKG and go to the function PTO_CARRY_OVER_FOR_PLAN.
  • Go to the cursor CSR_GET_ASSIGNMENT and add a condition to filter based on assignment id as asg.assignment_id = <assignment_id> or asg.assignment_id IN (<assignment_id1>, <asignment_id2>, etc)
  • Optional: Turn on Logging by inserting/updating a row into PAY_ACTION_PARAMETERS table with LOGGING parameter with a value G. It means that, when you run the PTO Carryover process, the log messages in the package are displayed as Concurrent program log messages which can be viewed by clicking on View Log button after the Carryover process is completed. You can even add more log messages in the package but make sure you remove them once your testing is complete.
  • Run PTO Carryover process as normal but now it runs only for one employee. Check the log messages if you enable logging
  • Don't forget to remove your changes once the testing is done.

FYI: Oracle has already published a Note#261617.1 on how to run carryover for one employee. In this note, they haven't mentioned about the package which needs to be changed but about a file where the package resides. So we need to open that file and get the package name and then follow the other instructions as mentioned in the note.

Please let me know if I miss any points. I am happy to add here if it's relevant.