!!!P2K_PPAMTS.SPELTOT

!Functionality
This database function will return the to-date value of the pay components included in the indicated element for the specified employee.

!Parameters:
|EEM_ID          |The ID for the employee’s employment record
|PEL_ID          |The ID for the pay component (see [P2K_SPGETPEL])
|TODATE_TYPE     |The type of “to-date” records you want to the data for (see below)
|CALENDAR_PERIOD |The specific period you are interested in 

!Returns:
Numeric

!Errors:
If an invalid parameter is passed, then zero  is returned
	
!Example:

{{P2K_PPAMTS.SPELTOT(EEM_ID,P2K_PPAMTS.SPGETPEL('TOTAL FRINGE'),'Q','200404')}}

!Operation
The format of Calendar period should match the to-date type according to the following table.  In this example, we assume that the fiscal year starts in March, so that is the first month of the fiscal year:
||To-Date_Type ||Meaning                         ||Calendar Period
|‘Y’           | Year To Date for 2004           | 2004
|‘Q’           | Quarter to date for 2nd Quarter | 200402
|‘M’           | Month to date for May           | 200405
|‘F’           | Fiscal Month to Date for May    | 200403
|‘A            | Assignment to date              | [EAS_ID] (Assignment ID) for the employee's assignment

%%information Note that ''FISCAL TO DATE'' is not fiscal Year-to-Date but is fiscal __Month-To-Date__ following the fiscal months as defined in the fiscal calendar on [IDCL] %%