LockTimecardsFunction

Lock Timecards Function

Minor Business Rule

Object Name: B0700019

Parent DLL: CPAY

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of the Lock Timecards Function business function is to lock all Timecards of a given 
employee 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



'b7Function calls internal function (I_B0700019_Process_Employee_Timecards) to process all 
Timecards for employee


'b7I_B0700019_Process_Employee_Timecards Logic:


'b7Fetches ALL Employee Timecards that are:


• Not Interims (ICC != 'I')
• Where Date Worked (DWK) is greater than or equal to Payroll Beginning Date and 
Date Worked (DWK) is less than or equal to Payroll Ending Date.

• Where Timecard Company is equal to Company passed to function  provided company is 
not blank;  otherwise all companies are selected.

• Where Timecard Lockout Code (USR) is blank or equal to Payroll ID being processed
• Where Pay Cycle Group (PGRP) is equal to blank or if Timecard is in Pay Cycle 
Group being processed


'b7For each Timecard Fetched:

• Determine whether Check Control Number on Timecard is equal to zero

• If Check Control Number Not Equal to Zero

• Use Timecard Check Control Number

• If Check Control Number Equal to Zero, 

• Determine Print Method

• Get from Next Numbers or 

• Get from Check Control Number Cache 

• Write record to Check Control Number Cache

• Update Timecard (F06116)  Move Payroll ID to Lockout Field (USR) to lock 
Timecard to Payroll


• Write record to Timecard Cache

• Update Multiple Jobs Cache if Effect on Gross (PAYG) is equal to '+'












^

Data Structure

D0700019 - DS for Lock Timecards 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 to calling program.
^

cTimecardsLockedFlagEV01charOPTOUTPUT

Special Input Expected
None

Special Value Returned
[FUTURE]  Will return value of '1' if any Timecards locked;  '0' if not locked.
^

cPayPeriodNumber1PPM1charOPTNONE

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.

cPayPeriodNumber2PPM2charOPTNONE

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.

cPayPeriodNumber3PPM3charOPTNONE

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.

cPayPeriodNumber4PPM4charOPTNONE

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.

cPayPeriodNumber5PPM5charOPTNONE

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.

cPayPeriodNumber6PPM6charOPTNONE

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.

szCountryCTRcharOPTNONE

A user defined code (00/CN) that identifies a country. The country code has no effect on currency conversion. The Address Book system 
uses the country code for data selection and address formatting.

cEmployeeClassificationECNTcharOPTNONE

Employee classification determines the type of employee to the system.  It identifies them as an independent contractor, a regular 
employee, or a Step Progression employee.  Values are:  Y Independent Contractor  N Regular Employee  S  Employee using Step Progression 

cStepProgressionAutomationCCUFcharOPTNONE

This code specifies whether you want the system to process job step progression information during payroll cycle processing or whether 
you want to process the information as a stand-alone feature outside of the payroll cycle. Be aware that processing job step progression 
during the payroll cycle might significantly increase pay cycle processing time.  Note: This field works in conjunction with the Step Progression 
Process field on the Company Options form. In order to process job step progression information, the Step Progression History Update field 
must be set to 1 or 2. Also, this field is initially populated with the value from the Company Options setup. You can override the value here. 
However, if you change the value in the Company Options, the system does not change the value in this field. Valid values are: Y Process job step 
progression information during payroll processing. N Process job step progression as a stand-alone feature. (default)  

cStepProgressionProcessCCDOWcharOPTNONE

A code that specifies whether the Step Progresssion History files are updated and the level of detail in which the update occurs.  If you 
choose 1, you must set up job step progression parameter tables for each union for which you want to process step progression information. If 
you choose 2, you must set up job step progression parameter tables for each business unit and union combination for which you want to 
process step progression information. If you choose 1 or 2, it is not mandatory that companies within your organization process step progression 
information. However, if you choose N, no companies in your organization can process step progression information.  Valid values 
are: 1 Update using Union, Job Type, and Job Step. 2 Update using Home Business Unit, Union, Job Type, and Job Step. N Do not update Step 
Progression History tables.

szOverrideGLBankAccount_GLBAGLBAcharOPTNONE

The number of the bank account (general ledger account) to be updated automatically when receipts or disbursements are entered. The 
bank account number is assumed to be the same for every document in a batch. Therefore, it is not cleared from entry to entry. However, if 
you leave the bank account number blank, the system retrieves a default bank account number from the Automatic Accounting Instructions file 
(F0012), item number RB for Accounts Receivable and PB for Accounts Payable.

cTimecardHomeCompanyFlagTCOcharOPTNONE

A code that determines whether the system overrides the value in the Home Company field on employee timecards with the Home 
Company from the Employee Master. If you choose to override the value on the timecard, the system performs the override at different times 
depending on how the timecard is entered into the system. The following examples illustrate when the override would occur if you set this option to 0 
and you enter a timecard with a home company that is different than the home company in the Employee Master: If you enter a regular 
timecard, the system overrides the home company when the timecard is processed in pre-payroll. If you enter a timecard using the Time Entry 
Interim Generator, the system overrides the home company when you exit the row in the detail area of the time entry form. If you enter timecards 
for interim payments using the Interim Payment Workbench, and if the Company field on the Interim Entry form is blank, the system overrides 
the home company when you click OK during interim entry. Note: The system never overrides the home company on timecards that are 
entered using the Interim Entry form if there is a value in the Company if Different than Home Company field, which is also on the Interim Entry form. 
The Company if Different than Home Company field is intended to be used as an override to this functionality. The Interim Entry form does not 
consider the value in this field when determining whether to override the home company for the interim payment.   Caution: If your 
organization has multiple home companies with the same Corporate Tax ID, and those companies use the same bank account for payroll payments, 
set this option to 0. Setting this option to 1 might cause undesirable results. Valid values are: 0 Override the Home Company field on the 
timecard with the Home Company from the Employee Master table (F060116). This is the default. 1 Do not override the Home Company field on the 
timecard with the Home Company from the Employee Master table (F060116).

cMergeInterimPaymentsEV02charOPTNONE

An option that specifies the type of processing for an event.

jdDatePayCheck_CKDTCKDTJDEDATEOPTNONE

The date associated with the various types of net pay instructions. This date relates to a payroll check, an interim payment, a bank 
automatic-deposit advice slip, a payslip (cash), or a claim reimbursement.

szVersionTimeEntryVERSTEcharOPTNONE

Use this processing option to indicate the version of the Time Entry Master Business Function (P050002A) that you want to use to process 
timecards. If you leave this processing option blank, the system uses the default version, ZJDE0001. A version is a user-defined set of 
specifications. These specifications control how applications and reports run. You use versions to group and save a set of user-defined processing 
option values, data selection options, and data sequencing options. Interactive versions are associated with applications (usually as menu 
selections). Batch versions are associated with batch jobs or reports. To run a batch process, you must choose a version.

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
B0700018 Pay Cycle Group Function
B0700920 Retrieve AAI for Journals
B0701180 Retrieve Corporate Tax ID
N0500012 Get AAI For Timecard Journals

Related Tables

F06116 Employee Transaction Detail File
F069096 Payroll General Constants
F069116 Payroll Transaction Constants