P 2 K_PU.GET_BBR
Back to current versionRestore this version

Get Employee GET_BBR#

Functionality:#

The purpose of this function is to capture the BBR_ID from the P2K_BE_RECIPIENTS table. Given a specific benefit PLAN_CODE and an as of date determine if an contact is set up as a recipient in the specified plan.

If they are then return the ID from the P2K_BE_RECIPIENTS table. If they are not, then null will be returned.

Parameters:#

ECT_ID Required. The ID from the P2K_HR_CONTACTS table for the person in which to the Employment ID in which the pay info is to be recovered
LEAVE_TYPE Required. Leave type code from IAPT
AC_CODE Required. AC_CODE as defined on IAAC (ie, A050, A700, A900, etc.)
WHEN Optional. The as of date to be used (DD-MON-YYYY). Only the 'MON' portion of the date will be used. This date will be converted to the last day of the month for the query (The month from the Sysdate will be used if left blank).

Returns: #

Numeric

Errors: #

Example: #

FUNCTION ALA_LAST(~,'VACATION','A700','01-Jan-2017')

Using the EEM_ID as the parameter, this will return the value from the last leave line to be processed in the month of January, linked to the leave type 'VACATION' and the AC_CODE A700.

Notes#