CreatePaymentDistributionRecords

Create Payment Distribution Records

Major Business Rule

Object Name: B0700002

Parent DLL: CPAY

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this function is to create Payment Distribution (F07351) records based on the Auto 
Deposit Instructions (F065016) defined for an employee.

Setup Notes and Prerequisites

It is a requirement that you have Payment Records created for employees.  Most of the time you will 

also have Auto Deposit Instructions setup for an employee as well.  This will allow the function to 

split the Net Pay from the Payment Record according to how the Auto Deposit Instructions are defined for 

a particular employee.  If no Auto Deposit Instructions are setup for a particular employee then they 

will receive a check for the full Net Amount from the F07350 record and this will be represented as 

one F07351 record.

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

CKCN        Check Control Number       I   Y          This is the check control number

NPAY        Net Pay Amount from Stub   I   Y          This is the net pay calculated from the stub 

detail.

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.

PID3        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.

PFRQ        Pay Frequency              I   Y          This is the Pay Frequency. 

PPM1        Pay Period Weekly          I   Y          This is the Weekly pay period.

PPM2        Pay Period Bi-Weekly       I   Y          This is the Bi-Weekly pay period.

PPM3        Pay Period Semi-Monthly    I   Y          This is the Semi-Monthly pay period.

PPM4        Pay Period Monthly         I   Y          This is the Monthly pay period.

CKDT        Paycheck Date              I   Y          This is the Paycheck Date.

ADOF        Auto Deposit Override Flag I   Y          This is the Auto Deposit Override Flag.

ADPN        Auto Deposit PreNote       I   Y          This is the Auto Deposit PreNote.

GLBA        GL Bank Account            I   Y          This is the GL Bank Account.

GENLNG      PPAT Workfield             I   Y          This is the PPAT Workfield name.

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.

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

ID.

TNEP        Total Number of Emp Paid   O   Y          Total number of employees paid in this Payroll 

ID.

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


Related Tables 

Table       Table Description
F07350      Payment File

F07351      Payment Distribution File

F07210      Pay Cycle Parameters File

F065016     Auto Deposit Instructions File


Related Business Functions

Source NameFunction Name
n0500012    Get AAI for Timecard Journals

b0100011    Error Message Processor to PPAT System

b0100025    Initialize PPAT Error Message API

blm0094     Set Payment Gross to Net Error


Processing

^

Data Structure

D0700002 - DS Create Payment Distribution 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.

mnCheckControlNumberCKCNMATH_NUMERICOPTNONE

A number used to group all payroll transactions for each payment or individual interim payment. This number is carried into the accounting 
journal entries and facilitates the update of the actual check number after payment printing is complete. This number is also used for 
automatically voiding payments. The payment work table contains both the actual check number and the check control number. All associated 
payment transactions are automatically reversed using the check control number. This is not the actual check number.

mnAmountNetPayNPAYMATH_NUMERICOPTNONE

The net amount of the payment. Before the net-deduction phase of the pre-payroll process runs, this amount equals gross pay, less taxes, 
less deductions that are based on gross pay. After the net-deduction phase, this amount represents the true net pay. For additional information 
that is related to this calculation process, see data items NPY1 and DESQ.

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.

szProgramIDPID3charOPTNONE

Program ID - 03

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.

szNameAlphaALPHcharOPTINPUT

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.

cGrossNetErrorFlagEV01charOPTNONE

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

mnPrePayrollErrorLineIDLIIDMATH_NUMERICOPTNONE

A system-assigned line ID that uniquely identifies the records in this table. The line ID determines the print order of the records on the stub or 
register.

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

B0700920 Retrieve AAI for Journals
N0500012 Get AAI For Timecard Journals
N0700105 F07355 Write Pre-Payroll Error Record
N0800031 Get UDC Description

Related Tables

F0005 User Defined Codes
F065016 Automatic Bank Deposit Master
F07210 Pay Cycle Parameters File
F07350 Payment File
F07351 Payment Distribution File
F07355 Pre-Payroll Error File