P2K_PPAMTS.SPELTOT#

Functionality#

This database function will return the to-date value of the pay components in the identified element for the specified employee, also applying any of the optional filters indicated.

Parameters:#

EEM_ID The ID for the employee’s employment record
PEL_ID The ID for the pay component (see P2K_PPAMTS.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
EAS_ID If specifying “Assignment ToDate” you can narrow down to a specific assignment
DGR_ID The ID of the group (which implies Unit, and Government EINs) from IDGR
DSP_ID_HOME The ID of the State/Prov of their home (IEPI)
DSP_ID_WORK The ID of the State/Prov that they work in (IEAS)
DSD_ID The ID of their School District (IEPI)
DTX_ID_HOME The ID of the Tax Jurisdiction of their home (IEPI)
DTX_ID_WORK The ID of the Tax Jurisdiction of their work (IEAS)

Returns:#

Numeric

Errors:#

If an invalid parameter is passed, then zero is returned

Example:#

P2K_PPAMTS.SPELTOT(EEM_ID,P2K_PPAMTS.SPGETPEL('SUI EARNS'),'Q','200404',null,null,33))

This example will get the QTD value for the SUI EARNS element for the fourth quarter of 2004, but only for those values that were for the employee's home state (where the state has an ID of 33).

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
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