EmployeeLockoutFunction

Employee Lockout Function

Minor Business Rule

Object Name: B0700021

Parent DLL: CPAY

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of the Employee Lockout Function business function is to write a record to the Employee 
Lockout Code (F07300) file to signify that the employee has been locked to the Payroll being processed.


Setup Notes and Prerequisites

This function should be called during Pre-Payroll from the Pre-Payroll Driver (R07200) program.  You 

must call InitializePrePayrollCaches (B0700003) before calling this function in order to retrieve the 

appropriate cache names.


Special Logic

None


Technical Specification

Function calls GetPayrollLockoutStatus (N0500021) to determine whether employee has been locked to another
payroll.  If so, the cErrorFlag output parameter is set to '1' and the function returns to the calling program.


Function Reads Employee Multiple Jobs (F060118) file using Address Number, Job Code and Job Step.


For each Employee Multiple Jobs record  determine whether Job Qualifies  Compares Payroll Beginning   and Ending dates to Start (PSDT) and Stop 
Dates (PTDT) on F060118


Provided Job Qualifies:

Write record to Multiple Jobs Cache

Determine whether Pay Cycle Group or Payroll Company not equal to blank

If Condition is True  either not equal to blank 

Determine whether Salaried Employee

If Salaried Employee

Determine whether Employee Payroll Company EQ Home Company

Employee Home Business Unit in Pay Cycle Group Code


 If Condition True, Set cEmployeeLockoutFlag  to '1'


If not Salaried Employee

Call Lock Timecards Function (B0700019) to determine whether to lock employee

If Condition is False  both are equal to blank

Set cEmployeeLockoutFlag  to '1'

Write record to Employee Lockout Code (F07300)

If Job does not Qualify:

ErrorFlag output parameter is set to '1' and the function returns to the calling program.


Data Structure

D0700021 - DS for Employee Lockout Function

Parameter NameData ItemData TypeReq/OptI/O/Both
szPayrollCompanyCOcharREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

szPayCycleGroupCodeCYGRcharREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

cPayCycleGroupTypePCGTcharREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

jdPayrollEndingDateEFTEJDEDATEREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

jdPayrollBeginningDateEFTBJDEDATEREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

szPayrollIDPAYDcharREQINPUT

Special Input Expected
Value from Pay Cycle Parameters (F07210).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

mnAddressNumberAN8MATH_NUMERICREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned
^

jdDateEmploymentStartDSTJDEDATEREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

mnPayCycleBypassCountPYCBMATH_NUMERICREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szHomeCompanyHMCOcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szHomeBusinessUnitHMCUcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szPositionIDPOScharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szJobCodeJBCDcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szJobStepJBSTcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szUnionCodeUNcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

jdNextRaiseDateNRDTJDEDATEREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

mnNextHourlyRateHRTNMATH_NUMERICREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

cPayFrequencyPFRQcharREQINPUT

Special Input Expected
Value from Employee Master (F060116).

THIS IS A REQUIRED FIELD.


Special Value Returned


^

szCheckControlCachePIDcharREQINPUT

Special Input Expected
Name of the cache - returned from InitializePrePayrollCaches (B0700003).

THIS IS A REQUIRED FIELD.


Special Value Returned
^

szTimecardCachePID1charREQINPUT

Special Input Expected
Name of the cache - returned from InitializePrePayrollCaches (B0700003).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

szMultipleJobsCachePID2charREQINPUT

Special Input Expected
Name of the cache - returned from InitializePrePayrollCaches (B0700003).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

szPayCycleCachePID3charREQINPUT

Special Input Expected
Name of the cache - returned from InitializePrePayrollCaches (B0700003).

THIS IS A REQUIRED FIELD.


Special Value Returned

^

jdDateUpdatedUPMJJDEDATEOPTINPUT

Special Input Expected
Value from GetAuditInformation (B9800100).


Special Value Returned
^

mnTimeLastUpdatedUPMTMATH_NUMERICOPTINPUT

Special Input Expected
Value from GetAuditInformation (B9800100).


Special Value Returned
^

szProgramIDPID4charOPTINPUT

Special Input Expected
Value from GetAuditInformation (B9800100).


Special Value Returned
^

szWorkStationIDJOBNcharOPTINPUT

Special Input Expected
Value from GetAuditInformation (B9800100).


Special Value Returned
^

szUserIDUSERcharOPTINPUT

Special Input Expected
Value from GetAuditInformation (B9800100).


Special Value Returned
^

mnNumberJobsMATH01MATH_NUMERICOPTOUTPUT

Special Input Expected
None

Special Value Returned
[FUTURE]  Will return number of jobs processed.
^

cErrorFlagEV01charOPTOUTPUT

Special Input Expected
None


Special Value Returned
Returns a '1' if Employee being processed is locked to another payroll;  otherwise, will return a 
'0'.

^

cPayTypeHSPSALYcharREQINPUT

Special Input Expected
Value from Employee Transactions Detail File (F06116).

THIS IS A REQUIRED FIELD.


Special Value Returned
^

szNameAlphaALPHcharREQINPUT

Special Input Expected
Value from Employee Transactions Detail File (F06116).

THIS IS A REQUIRED FIELD.


Special Value Returned
^

cEELockedAnotherPayrollFlagEV03charOPTOUTPUT

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cPayPeriodNumber1PPM1charOPTINPUT

The number of the pay period, within the month, for employees who are paid weekly. This field is used in conjunction with the Pay Period to 
Calculate field on the DBA Setup form to determine which deductions, benefits, and accruals the system will calculate during the current 
payroll cycle.

cPayPeriodNumber2PPM2charOPTINPUT

The number of the pay period, within the month, for employees who are paid biweekly. The system uses this value and the Pay Period to 
Calculate, from the DBA Setup form, to determine which deductions, benefits, and accruals to calculate during the current payroll cycle.

cPayPeriodNumber3PPM3charOPTINPUT

The number of the pay period, within the month, for employees paid semimonthly. The system uses this value and the Pay Period to 
Calculate, from the DBA Setup form, to determine which deductions, benefits, and accruals to calculate for the current payroll processing cycle.

cPayPeriodNumber4PPM4charOPTINPUT

The number of the pay period within the month, for employees who are paid monthly. This field is used in conjunction with the Pay Period to 
Calculate field on the DBA Setup form to determine which deductions, benefits, and accruals are to be calculated during this payroll cycle.

cPayPeriodNumber5PPM5charOPTINPUT

The number of the pay period for employees who are paid annually. This field is used in conjunction with the Pay Period to Calculate field 
on the DBA Setup form to determine which deductions, benefits, and accruals are to be calculated during this payroll cycle.

cPayPeriodNumber6PPM6charOPTINPUT

The number of the pay period, within the month, that is used in conjunction with the Pay Period to Calculate field on the DBA Setup form to 
determine which deductions, benefits, and accruals are to be calculated during this payroll cycle.

cEELockoutUpdateFlagUFLGcharOPTNONE

This indicator in the employee master is under program control. It is set to Y when anything is added, changed or deleted related to the 
employee including the master file itself, the employee's pay/deduction/benefit/accrual transaction profile, his current time and pay detail 
transactions or interim check information. The principal use of this indicator is to determine whether the employee needs to be reprocessed during 
a pre-payroll rerun. The pre-payroll process automatically resets this flag to blank.

szAAIJournalsCache_PIDPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

Related Functions

B0700003 Create PrePayroll Caches
B0700019 Lock Timecards Function
N0500021 Get Payroll Lockout Status
N0700105 F07355 Write Pre-Payroll Error Record

Related Tables

F060118 Employee Jobs
F07300 Employee Lockout Code File