CreateStubDetailRecords

Create Stub Detail Records

Minor Business Rule

Object Name: B0700001

Parent DLL: CPAY

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this function is to create records in the Stub Information (F07352) file.

Setup Notes and Prerequisites

PDBA Print Rules:  There are specific PDBA Print rules that determine how Timecard and PDBA records 

should be summarized when written to the Stub Information File (F07352).  The print method codes for 

Timecards and Deductions, Benefits and Accruals are listed below:


Timecards 

Y  Print on paystub; default (no special summarization, one entry per timecard)
S  Print on a separate check; one item per check (no special summarization, one entry per timecard) 

C  Print on separate check, C types combined 

N  Do not print on paystub (no record will be written to the Paystub Detail file)


Deductions, Benefits and Accruals 

Y- Print as total deductions; default (these records will be summarized by PDBA type, and Print 
Method.  The summarized record will be written to the Paystub Detail file.

S- Print on separate check, one item per check (no special summarization, one  entry per DBA)

C- Print separate check (no special summarization, one entry per DBA)

N- Do not print on paystub (no record will be written to the Paystub Detail file)

I- Print individual transactions (no special summarization, one entry per DBA)

T- Print by DBA Print Group (summarization occurs on PDBA Type, Print Method, and DBA Print Group)


Special Logic


Technical Specification


Parameters:
Data Item  Data Structure Description  I/O  RequiredNotes
PAYD     Payroll ID                  I    Y         This is the Payroll ID

AN8     Address Number              I    Y         This is the address number for an employee

PID     Check Control Cache Name    I    Y         This is the unique name of the check control 

cache.

PID1     Time Card Cache Name        I    Y         This is the unique name of the time card cache.

PID2     DBA Cache Name              I    Y         This is the unique name of the DBA cache.

PID3     Deduction Cache Name        I    Y         This is the deduction cache.

UPMJ     Date Updated                I    Y         This is the date the stub was updated

UPMT     Time Last Updated           I    Y         This is the time the stub was updated.

PID4     Program ID                  I    Y         This is the program that updated the stub file.

JOBN     Workstation ID              I    Y         This is the computer name that updated the stub 

file.

USER       User ID                     I    Y         This is the user ID that updated the stub file.

NPYM       Number of Payments          O    Y         Total number of payments in this Payroll ID.

NCKS     Number of Checks            O    Y         Total number of checks in this Payroll ID.

NCIC       Number of Comp.Int Checks   O    Y         Total number of computer interim checks in this 

Payroll

NMIC     Number Manual Int. Checks   O    Y         Total number of manual interim checks in this 

Payroll.

NAUD     Number of Auto Deposits     O    Y         Total number of auto deposits in this Payroll.

ALPH     NameAlpha                   I    Y         This is the Alpha Name for the employee being 

processed.


Related Tables 

Table      Table Description
F07352     Stub Information File

F07353     Tax Detail File


Related Business Functions

Source Name     Function Name
N0500017        Retrieve PDBA Description and Type

N0500024        Retrieve SVH Available Hours

N0700002        Retrieve Tax Area Description

N0800031        Get UDC Description

B0700002        CreatePaymentDistribution Records

B0700003        Create PrePayroll Caches


Processing 
Create Paystub records (pseudo code):


CheckControlNumberFlag = 'N';

CheckControlNumberFlag = Read CheckControlNumberCache('85.);


While (CheckControlNumberFlag == 'Y')















































































^

Data Structure

D0700001 - DS for Create Stub Detail Records

Parameter NameData ItemData TypeReq/OptI/O/Both
szPayrollIDPAYDcharOPTNONE

A code that identifies a group of employees for whom you are processing payroll. Use this ID to process each step of the payroll 
cycle. This code is also used to identify the interim ID that you select when you enter interim payments.

mnAddressNumberAN8MATH_NUMERICOPTNONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCheckControlCacheNamePIDcharOPTNONE

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.

szTimecardCacheNamePID1charOPTNONE

Program ID - 01

szDBACacheNamePID2charOPTNONE

Program ID - 02

szDeductionCacheNamePID3charOPTNONE

Program ID - 03

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

mnTimeLastUpdatedUPMTMATH_NUMERICOPTNONE

The time that specifies when the program executed the last update to this record.

szProgramIDPID4charOPTNONE

Program ID - 04

szWorkStationIDJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

szUserIDUSERcharOPTNONE

The code that identifies a user profile.

cPayFrequencyPFRQcharOPTNONE

A user defined code (07/PF) that indicates how often an employee is paid. Valid codes are: B Biweekly   W Weekly   S Semimonthly  
M Monthly   A Annually   C European Annualized  The system uses the value in the Description-2 field on user defined codes to calculate the amount per 
pay period for a salaried employee.

cPayPeriodWeeklyPPM1charOPTNONE

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.

cPayPeriodBiWeeklyPPM2charOPTNONE

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.

cPayPeriodSemiMonthlyPPM3charOPTNONE

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.

cPayPeriodMonthlyPPM4charOPTNONE

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.

jdDatePayCheckCKDTJDEDATEOPTNONE

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.

cAutoDepositOverrideADOFcharOPTNONE

A code that specifies whether to override auto deposits. A Y turns off auto deposit for all employees in this pre-payroll processing version 
and prints checks instead of automatic deposit advice slips. This field lets you override auto deposit instructions in one place instead of 
changing auto deposit instructions individually for each employee in the version. Valid values are:    Y Yes, override auto deposit instructions. Use 
this code for regular payment processing.    N No, do not override auto deposit instructions.    P Override auto deposit instructions during 
interim payment processing.

cAutoDepositPreNoteADPNcharOPTNONE

A code that lets you test the deposit instructions for one pay period before actually processing a deposit. Adding an employee to this form 
automatically activates this person in the automated deposit system. The system prenotes this employee in the next applicable payroll run 
to test the auto deposit instructions you have set up before actually depositing a check. In the prenote test, the system creates a no-dollar 
entry for this employee and sends it to the employee's bank account. In addition, the employee receives a check for this amount. After the test, 
the system changes this field to N. To repeat this test, enter P in this field. If you leave this field blank, the system uses the default value of P. If 
you change an employee's automatic deposit instructions, the system creates a prenote. If you do not want a prenote, you must change the 
value in the Prenote Flag field to N. You cannot use this field for Canadian employees.

szGLBankAccountGLBAcharOPTNONE

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.

idPPATWorkfieldGENLNGIDOPTNONE

General purpose ID variable.

mnNumberPaymentsNPYMMATH_NUMERICOPTNONE

The total number of payments in this Payroll ID.

mnNumberChecksNCKSMATH_NUMERICOPTNONE

The total number of checks in this Payroll ID.

mnNumberAutoDepositsNAUDMATH_NUMERICOPTNONE

The total number of auto deposits in this Payroll ID.

mnTotalNumberEmployeesPaidTNEPMATH_NUMERICOPTNONE

The total number of employees being processed in this Payroll ID.

szNameAlphaALPHcharOPTNONE

The text that names or describes an address. This 40-character alphabetic field appears on a number of forms and reports. You can enter 
dashes, commas, and other special characters, but the system cannot search on them when you use this field to search for a name.

cGrossNetErrorFlagEV02charOPTNONE

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

cVoidFlagEV01charOPTINPUT

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

szSickVacationCachePIDcharOPTNONE

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.

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.

szTaxDetailCachePID3charOPTNONE

Program ID - 03

cLeaveBalanceRollFlag_EV01EV01charOPTNONE

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

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

B0700002 Create Payment Distribution Records
B0700003 Create PrePayroll Caches
N0500017 Retrieve PDBA Description & PDBA Type
N0500024 Retrieve SVH Available Hours
N0700002 Retrieve Tax Area Description
N0800031 Get UDC Description

Related Tables

F07350 Payment File
F07352 Stub Information File
F07353 Tax Detail File