P 2 K_PU.EIN_CODE

Get Federal/State EIN Code#

Functionality:#

This function retrieves the GOVT_REGIST_NUMBER from IDGV for the matching GOVT_REGIST_TYPE, for the government registration set indicated by the level.

Parameters:#

REGIST_TYPE is a value from the lexicon GOVT_REGIST_TYPE
DGR_ID is a group ID that will identify a specific registration set, and will give us a specific registration, or 0 (zero)
EEM_ID is an employment ID that will be used to identify the group by finding the primary assignment, or 0 (zero)
LEVEL is one of 'FED' (federal), 'STA' (state), to determine which registration set to pursue for registration numbers
REF_CODE is one of the Country Code or State Code to match the levels above
AS_OF is the effective date that will be used to find the correct group detail / assignment detail record. defaults to current date.

Returns: #

Varchar2 (regardless of the type of data being requested)

Errors: #

Error: No DGR/EEM Error: Bad Level Error: Bad Type Error: Cannot find DGR/EEM Error: Bad Data finding DGR/EEM Error: No Registration Set at that level Error: Cannot find Registration

Example: #

P2K_PU.EIN_CODE('0251',~,0,'STA','MD')

Will return the EIN for State Unemployment, for the state of Maryland for the employee whose ID is replaced by the !

P2K_PU.EIN_CODE('0261',~,0,'STA',[320221])

When used in UPPHF/UEEF interface definition will get the EIN for State Disability for the state identified in the employee's pay header.

Notes#

One of DGR_ID or EEM_ID above must be supplied. If both are supplied, the DGR_ID parameter will take precedence

Notes#

Click to create a new notes page