!!Retrieve the ID of a pay period for an employee

!Functionality:
This function retrieves the ID for a pay period given the assignment ID of an employee and a date

!Parameters:

|EAS ID        | The ID of the employee's assignment
|AS OF        | ''Optional''. Provides a date frame to retrieve the data. If it is not provided, the current system date will be used.

!Returns: 
Numeric

!Errors:  
* None.  If no record can be found (due to bad parameters or missing pay calendar information) NULL is returned

!Example: 

{{p2k_pu.get_ppp(eas_id,'31-Dec-2012')}} 

;:will return the ID of the pay period for the employee's payroll that contains 31 Dec 2012

You can then use the [P2K_PU.GC] function to get information from the [P2K_PR_PAY_CALENDARS] table based on the ID return.  For example:

{{{p2k_pu.gc('PPP','PAY_PERIOD_START_DATE',p2k_pu.get_ppp(eas_id,'31-Dec-2012'))}}}

You could also use [P2K_PU.GET_EASD] if you didn't know the EAS_ID and work back to get it, using the GC function.

----
![Notes|Edit:Internal.P2K_PU.GET_PPP]
[{InsertPage page='Internal.P2K_PU.GET_PPP' default='Click to create a new notes page'}]